[Development] Use of official OpenGL/ES2 headers
Sean Harmer
sean.harmer at kdab.com
Tue Jul 24 14:18:44 CEST 2012
Hi,
I would like to tidy up some more of the OpenGL support in Qt5. Throughout
Qt5's OpenGL support classes there are a large number of #defines copy and
pasted from upstream OpenGL/ES headers. We now have quite a significant number
of such defines in the Qt code base.
The following WIP patch changes the need for this by using the official
glext.h (or gl2ext.h) headers on the build system.
https://codereview.qt-project.org/#change,28334
This is fine on Mac OSX, most (all?) Linux distros and embedded devices with
SDKs that support GL ES2, but on windows it causes an issue as Microsoft only
ships gl.h for OpenGL 1.1 by default, leaving developers to download glext.h
from khronos.org if they want to do OpenGL development.
To make this patch workable I see a couple of possible solutions:
1) We make glext/gl2ext.h header a build-time requirement for building Qt5 if
OpenGL support is enabled.
2) We ship and distribute the official glext.h header with Qt and use this on
Windows if a version can not be found on the system.
I would like to gather thoughts on these approaches or any alternatives.
If we go for option 1) then the CI system build slaves and developers will
need to ensure that a suitable glext.h is available.
If we go for option 2) then someone with enough fu will need to import glext.h
into qtbase and we will need to decide how best to handle this header -
perhaps install it along with QtGui headers as an option detected at configure
time?
Cheers,
Sean
--
Dr Sean Harmer | sean.harmer at kdab.com | Senior Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
More information about the Development
mailing list