What do you mean when you say "sharing a QGLWidget"?
What do you mean when you say "sharing a QGLWidget"?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
When creating a QGLWidget you can pass its constructor a pointer to another QGLWidget to mutually share a context.
Qt Code:
To copy to clipboard, switch view to plain text mode
What does it mean to pass in a QGLContext and another QGLWidget, as in the following constructor.
Qt Code:
QGLWidget::QGLWidget ( QGLContext * context, QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0 )To copy to clipboard, switch view to plain text mode
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):
And a context is: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().
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?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Wali (17th October 2009)
Ok I think I understand thanks.
Bookmarks