<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
just thought I would post a quick update on where we stand with
this set of features:<br>
<br>
On 18/12/2012 13:34, Sean Harmer wrote:<br>
</div>
<blockquote cite="mid:2939055.z5s2BGQotF@titan" type="cite">
<pre wrap="">Hi,
I would like to start a discussion on the future level of support for OpenGL
enablers in Qt for those that are interested. So here goes...
I would like to add in a bunch more OpenGL enablers but am not sure on where
to best put them. Some things I have in mind are:
1) Classes that contain member functions for all OpenGL functions of a given
version and profile. E.g. no need to use GLEW or similar. WIP version of this
at</pre>
</blockquote>
This is now in. You can obtain a pointer to an object containing a
member function for every version of the requested OpenGL version by
calling QOpenGLContext::versionFunctions<T>() where T is the
type of object you wish e.g. QOpenGLFunctions_4_3_Core.<br>
<br>
The OpenGL extension classes have been put into a new static library
which requires QT+=openglextensions to be added to your .pro file.<br>
<br>
With these I think Qt provides everything that GLEW, GLEE and
similar provide.<br>
<blockquote cite="mid:2939055.z5s2BGQotF@titan" type="cite">
<pre wrap="">
2) An QOpenGLVertexArrayObject class. This would be just a thin wrapper around
a VAO with possibly some API to make it easier to use with QOpenGLBuffer and
QOpenGLShaderProgram. </pre>
</blockquote>
There is now a QOpenGLVertexArrayObject class.<br>
<br>
<blockquote cite="mid:2939055.z5s2BGQotF@titan" type="cite">
<pre wrap="">
3) OpenGL occlusion and timing query objects. Again these are good candidates
for QtGui I think but if people object they could go into Qt3D again. The
timing query object in particular would be valuable for profiling the GPU time
spent in rendering QtQuick 2 scenes. Iirc then right now only the CPU time is
available in qtdeclarative but that is only half the story for profiling this
stuff.</pre>
</blockquote>
Timer queries and a higher-level helper are up for review at
<a class="moz-txt-link-freetext" href="https://codereview.qt-project.org/#change,44788">https://codereview.qt-project.org/#change,44788</a><br>
<br>
I hope to add occlusion queries for 5.2.<br>
<blockquote cite="mid:2939055.z5s2BGQotF@titan" type="cite">
<pre wrap="">
4) Transform feedback object. Another small but useful candidate for inclusion
in QtGui. These objects allow you to perform calculations on the GPU and write
the results to a bound buffer object before the rasterisation stage. This can
be used to perform animation updates for particles or physical simulations on
the GPU for example. The output buffer is then used in a second pass to render
with the calculated parameters. Would be very nice to integrate with
QOpenGLBuffer and QOpenGLShaderProgram again.</pre>
</blockquote>
Not had enough bandwidth to work on this yet but again will
hopefully make it in for 5.2.<br>
<blockquote cite="mid:2939055.z5s2BGQotF@titan" type="cite">
<pre wrap="">
5) Provide support for Geometry, Tessellation Control, Tessellation Evaluation
and Compute Shader support in QOpenGLShaderProgram. I don't see anything
contentious with these. They are just extending QOpenGLShader and/or
QOpenGLShaderProgram.</pre>
</blockquote>
QOpenGLShaderProgram and QOpenGLShader now support all programmable
shader stages offered by OpenGL including compute shaders. The
underlying requirements still apply of course so for example compute
shaders require an OpenGL 4.3 context (which Qt also makes easy if
the platform supports it).<br>
<blockquote cite="mid:2939055.z5s2BGQotF@titan" type="cite">
<pre wrap="">
6) Integrate support for the GL_ARB_debug_output extension into the Qt debug
message system. Peppe has said he will start to look at this shortly and I
think this would be an awesome feature to have available where the extension
is supported.</pre>
</blockquote>
My colleague and friend peppe was kind enough to take this on which
has resulted in a very useful QOpenGLDebugLogger. See
<a class="moz-txt-link-freetext" href="https://codereview.qt-project.org/#change,48660">https://codereview.qt-project.org/#change,48660</a>
<meta charset="utf-8">
<blockquote cite="mid:2939055.z5s2BGQotF@titan" type="cite">
<pre wrap="">
7) More enabler classes for textures, samplers, and higher-level abstractions.
I think these would be good candidates for a Qt3D library, unless someone
would really like to see a subset in QtGui.</pre>
</blockquote>
These will also have to wait for 5.2.<br>
<br>
So all things considered, Qt 5.2 is shaping up to be a nice release
with respect to support for OpenGL.<br>
<br>
Cheers,<br>
<br>
Sean<br>
<br>
</body>
</html>