[Interest] QGLWidget problem with Qt 5.5 and MSVC 2015 (Should QT_OPENGL_ES_2 be defined?)

Björn Piltz bjornpiltz at gmail.com
Wed Oct 7 15:52:32 CEST 2015


I'm trying to compile some legacy QGLWidget code with Qt 5.5 and MSVC 2015
and I am running into problems. The same code compiles with Qt 5.5 and MSVC
2013.

The problem is I get a "C3861: identifier not found" for basic gl functions
like glMatrixMode. The reason seems to be that the 2015 build
defines QT_OPENGL_ES_2 and gets its GL through the <qopengl.h> block:
   #   include <GLES2/gl2.h>

whereas 2013 gets its through the block

    #  define GL_GLEXT_LEGACY // Prevents GL/gl.h from #including system
glext.h
    #  include <GL/gl.h>
    #  include <QtGui/qopenglext.h>

I can make it compile by directly adding '#include <GL/gl.h>' to my code
but then the widgets remain black and I suspect QT_OPENGL_ES_2  should not
have been defined, right?

Cheers,
Björn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151007/75c8c48d/attachment.html>


More information about the Interest mailing list