path: root/util/glgen
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Link to external docs in QOpenGLFunctions_* classesTopi Reinio2013-09-091-1/+20
| | | | | | | | | | | These are wrapper classes that do not document their functions. This change adds links to docs on / where suitable, and changes the \brief commands to mention the correct OpenGL version/profile. Change-Id: I48154d5bce26f6753ca4400962939847c78a527d Reviewed-by: Jerome Pasion <> Reviewed-by: Sean Harmer <>
* Use BSD licensing for QtOpenGLExtensions instead of LGPLJonathan Liu2013-06-242-52/+50
| | | | | | | | | | | | | BSD licensing should be used for QtOpenGLExtensions instead of LGPL as it is a static library that is linked into applications. Using LGPL would impose additional requirements for application developers to provide object files to end users to be able to relink the application with a modified or updated QtOpenGLExtensions static library. Task-number: QTBUG-29918 Change-Id: I0bb80f8ba5158be0a71fe4c5e1c37787ce21337d Reviewed-by: Sean Harmer <> Reviewed-by: Lars Knoll <>
* Special case to work around upstream bug in gl.specSean Harmer2013-04-052-1/+7
| | | | | | | | | | | This commit fixes glTexImage3D to be non-deprecated. This function is incorrectly marked as deprecated in gl.spec. For more info see Change-Id: Ic9021b184a10d1b162158a3476b7272f4c6917fd Reviewed-by: James Turner <> Reviewed-by: Samuel Rødal <>
* Bring glgen into line with OpenGL functions and extensions codeSean Harmer2013-04-055-149/+40
| | | | | | | | | | | | This ensures that glgen outputs exactly what is included in src/gui/opengl/qopenglversionfunctions.* src/gui/opengl/qopenglfunctions_* src/openglextensions/* Change-Id: I7d41d9fc2bf6e5fedf11f58872c079339dac3649 Reviewed-by: James Turner <> Reviewed-by: Samuel Rødal <>
* OpenGL: Add code generator for OpenGL enabler classesSean Harmer2013-02-2522-0/+5261
This patch provides a code generator that can be executed offline to generate a few classes for enhancing Qt's support for OpenGL. The generated code effectively provides all the benefits of GLEW in its multi-context form but for all platforms and even for ES2. The code generator takes as input the official Khronos gl.spec specification and typemap files. These provide all of the information required to create the OpenGL Desktop related classes. The classes for ES2 are hand-crafted as no similar spec files have been published. The generated code supports all OpenGL extensions listed in the Khronos registry for both Desktop OpenGL and ES 2. There is a helper factory class generated which are used by QOpenGLContext::versionFunctions(). This allows code like the following to be written: QOpenGLFunctions_3_3_Core* m_funcs = 0; m_funcs = m_context->versionFunctions<QOpenGLFunctions_3_3_Core>(); if (!m_funcs) { qWarning() << "Could not obtain required OpenGL context version"; exit(1); } if (!m_funcs->initializeOpenGLFunctions()) { qWarning() << "Failed to resolve entry points"; exit(2); } // Get an extension object QOpenGLExtension_ARB_draw_buffers* ext = 0; if (m_context->hasExtension("GL_ARB_draw_buffers")) { ext = new QOpenGLExtension_ARB_draw_buffers(); ext->initializeOpenGLFunctions(m_context); } Such usage will allow much easier and rigorous use of features in modern OpenGL and extensions both in Qt itself and by users of Qt. Follow-up patches will import the generated files and then use these to reinstate OpenGL geometry shaders, add tessellation shaders, and other OpenGL constructs. Change-Id: Id0172e8aa1fd57eb4e6979a96d10fb5a34826426 Reviewed-by: Samuel Rødal <> Reviewed-by: James Turner <>