[Interest] QGLWidget problem with Qt 5.5 and MSVC 2015 (Should QT_OPENGL_ES_2 be defined?)
Björn Piltz
bjornpiltz at gmail.com
Mon Oct 12 09:17:40 CEST 2015
I just want to add that this problem isn't confined to QGLWidget, but the
compiler detection for 2015 seems to be broke somewhere. The simple program
https://github.com/TReed0803/QtOpenGL/tree/9990c8dd9ac5899289b28efaaaf5a1d1a97fab48/0_OpenGLWindow
outputs
OpenGL 3.3.0 NVIDIA 353.82 ( CoreProfile )
when compiled with MSVC2013 and
OpenGL ES OpenGL ES 3.0 (ANGLE 2.1.99f075dade7c) ( CoreProfile )
when compiled with MSVC2015.
Cheers,
Björn
2015-10-07 15:52 GMT+02:00 Björn Piltz <bjornpiltz at gmail.com>:
> 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/20151012/7a4a3fd7/attachment.html>
More information about the Interest
mailing list