Whats the difference in sharing a QGLContext and sharing a QGLWidget
Hi,
In the QGLWidget constructor
How is sharing a QGLContext different from sharing a QGLWidget? It seems to me that passing in a context is the same as sharing a widget. The shared widget and the newly constructed QGLWidget will be sharing the same context any way. So, why is there the option to pass in a context?
Thanks
Re: Whats the difference in sharing a QGLContext and sharing a QGLWidget
What do you mean when you say "sharing a QGLWidget"?
Re: Whats the difference in sharing a QGLContext and sharing a QGLWidget
When creating a QGLWidget you can pass its constructor a pointer to another QGLWidget to mutually share a context.
What does it mean to pass in a QGLContext and another QGLWidget, as in the following constructor.
Re: Whats the difference in sharing a QGLContext and sharing a QGLWidget
Here is what the docs say, maybe you can ask specifically what it is you don't understand in the following (for a shared QGLWidget):
Quote:
If shareWidget is a valid QGLWidget, this widget will share OpenGL display lists and texture objects with shareWidget. But if shareWidget and this widget have different formats, sharing might not be possible. You can check whether sharing is in effect by calling isSharing().
And a context is:
Quote:
An OpenGL rendering context is a complete set of OpenGL state variables.
As you can see, sharing openGL "resources" (as shared QGLWidget) and sharing "rendering state variables" is not the same.
Did I help you?
Re: Whats the difference in sharing a QGLContext and sharing a QGLWidget
Ok I think I understand thanks.