There is that grate lib I want to use called libCinder, I looked thru its docs but do not get if it is possible and how to render something with out showing it first?
Say we want to create a simple random color 640×480 canvas with 3 red white blue circles on it, and get RGB\HSL\any char * to raw image data out of it with out ever showing any windows to user. (say we have console application project type). I want to use such feaure for server side live video stream generation and for video streaming I would prefer to use ffmpeg so that is why I want a pointer to some RGB\HSV or what ever buffer with actuall image data. How to do such thing with libCInder?
You will have to use off-screen rendering.
libcinderseems to be just a wrapper forOpenGL, as far as graphics go, so you can useOpenGLcode to achieve this.Since
OpenGLdoes not have a native mechanism for off-screen rendering, you’ll have to use an extension. A tutorial for using such an extension, called Framebuffer Rendering, can be found here. You will have to modifyrenderer.cppto use this extension’s commands.An alternative to using such an extension is to use
Mesa 3D, which is an open-source implementation ofOpenGL.Mesahas a software rendering engine which allows it to render into memory without using a video card. This means you don’t need a video card, but on the other hand the rendering might be slow.Mesahas an example of rendering to a memory buffer atsrc/osdemos/in the Demoszipfile. This solution will probably require you to write a completeRendererclass, similar toRenderer2dandRendererGlwhich will useMesa‘s intrusctions instead ofWindows‘s orMac‘s.