[Qt-interest] GLEW library
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Mon Feb 23 10:15:48 CET 2009
ami guru wrote on Sunday, February 22, 2009 6:54 PM:
> ..
> I have subclassed the glwidget and included the glew header file
> before the inclusion of QGLWidget
I also once compared the GLEW vs GLEE (http://elf-stone.com/glee.php) which basically provide the same functionality and ended up using GLEE.
The following compiles without problems within my Qt OpenGL app:
// MyViewer.h
#include <GL/GLee.h>
...
#include <QtOpenGL/QGLWidget>
class MyViewer : public QGLWidget {
...
};
// MyViewer.cpp
#include <GL/GLee.h>
...
#include <QtOpenGL/QGLWidget>
MyViewer::MyViewer(QWidget *parent)
: QGLWidget(parent) {
...
}
Note that I always #included the GLee.h library first - maybe you can derive some useful hints from that for your case (GLEW) as well. Or switch to GLEE ;) (which also provides "lazy-init", that is, you don't need to call any "init" method explicitly - the only dependency on GLEE in your code is the #include <GL/GLee.h> statement :)
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list