[Qt-interest] Fwd: GLEW library
ami guru
dosto.walla at gmail.com
Mon Feb 23 15:40:14 CET 2009
Helllo Oliver,
I have included the glew.h first.
Now it compiles fine. But now i get the following error saying that my
graphics card do not support OpenGL 2.0 and that is not true.
I have put the glewInit() inside the GLWidget constructor() and i think it
is wrong.
Where should i put the glewInit() ?
Inside initializeGL() / paintGL() / resizeGL()
Regards
Sajjad
Regards
Sajjad
---------- Forwarded message ----------
From: <Oliver.Knoll at comit.ch>
Date: Mon, Feb 23, 2009 at 10:15 AM
Subject: Re: [Qt-interest] GLEW library
To: qt-interest at trolltech.com
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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090223/1654108d/attachment.html
More information about the Qt-interest-old
mailing list