[Qt-interest] Where to initialize GLEW?

Joe Liu passer.by007gg at gmail.com
Sun Jun 28 14:02:05 CEST 2009


Hi,

I would like to implement my FBO class with GLEW; As you know, users should
invoke glewInit() after an OpenGL rendering context is created and before
calling any glew functions.

Since I use QGLWidget as the base class of my opengl window class, and my
GLWindow might have more than one instances, so if I put glewInit() in
function initializeGL(), it will be called for multiple times. I think that
is ugly.

What is the right manner to call glewInit() in a Qt OpenGL program? Is there
any way to check whether the GLEW is initialized or not?

BTW, what will glewInit() do exactly? Is it associated with GL Rendering
Context? And How does the QGLWidget manage the Rendering Context?

Thank for your time~~


Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090628/368e3dcd/attachment.html 


More information about the Qt-interest-old mailing list