For now, I assume we are talking about Qt4.
Is it possible to fully display the screen in a QGLWidget
Off-screen rendering is not a window system-specific task at all. The only problem with WGL (at least) and GLX in most toolboxes is that you cannot have a surfaceless context, i.e. A context that is not related to the drawing capability provided by the window system. In other words, you will always have a window system provided by default to the framebuffer, which is unchanged as long as the current context exists.
There are tools for creating a context that does not require a window manually with X11, but this is usually not worth the trouble. For example, for EGL and OpenGL ES this problem does not exist, because there is an extension that aims exactly at this problem, that is, off-screen rendering.
However, you can simply hide the QGLWidget after the actual context has been configured and use framebuffer objects to do everything without the intervention of the default fader.
Can I avoid the monitor refresh rate in my QGLWidget?
No, as far as I know, the Qt4 OpenGL module does not have any vsync programming tool. You can refer to SDL or GLFW for something similar (not sure about FreeGLUT).
However, you can always disable the material in the settings of your driver. This will also affect the QGLWidget (or better place, the swap behavior of the base window system).
Is it possible to speed up frame-by-frame rendering?
In the end, it shouldn't matter. You will want the image data to be somewhere else than VRAM, so after you have provided the current FBO frame, you need to get the image anyway. You either mix the results with the front buffer (or the rear buffer if you need double buffering and swap), or you need to reload the material before further processing your current frame.
However, like everything related to OpenGL and performance, do not guess - profile !
How to fully render a framebuffer without slow paintGL () calls?
Once the context is configured, you donβt need a widget at all. You can do all the magic yourself without Qt intervention. The only reason paintGL() exists is to provide the user with an easy-to-use interface that is guaranteed to be called when the widget is updated.
EDIT . As for your request in the comments, see this minimal code example that should work cross-platform without changes.
#include <iostream>
On my current computer, the programs print:
ATI Technologies Inc.
AMD Radeon HD 7900 Series
1.4 (2.1 (4.2.12337 Context profile compatibility 13.101))
Note how QGLWidget never becomes visible and event processing does not occur. The Qt OpenGL library is used only to create context. Everything else is done without Qt's intervention. Just remember to set the viewport and more to suit your needs.
Please note:. If you need a convenient way of setting up the context, you can switch to some set of tools that will be easier than Qt4, for example FreeGLUT. Personally, I found that FreeGLUT will be much more reliable when it comes to setting the actual context exactly the way I want on some hardware, for example. Sandy Bridge processors.