How do i draw using opengl offscreen into a QImage without using a QOGLWidget
-
I need to be able to draw offscreen using opengl commands into a QImage.
In looking at the Qt documentation, it seems like i should be doing my opengl drawing into a QGLPixelBuffer, and then using that to generate a Qimage via the toimage() call.
The Qt opengl demo examples all seem to use QOGLWidgets and draw onto the screen.
Is there a simple code sample that just does something simple like draws an opengl triangle into an offscreen OGLPixelBuffer without using a QOGLWidget as a part of the process that someone could post that explains how to do what i want to do.
I think with that i can get going with what i want to do.
thanks