| CMakeLists.txt |
|
5375 |
- |
| compat |
|
|
- |
| doc |
|
|
- |
| qopengl2pexvertexarray.cpp |
|
4611 |
- |
| qopengl2pexvertexarray_p.h |
|
3574 |
- |
| qopenglbuffer.cpp |
!
\class QOpenGLBuffer
\brief The QOpenGLBuffer class provides functions for creating and managing OpenGL buffer objects.
\since 5.0
\ingroup painting-3D
\inmodule QtOpenGL
Buffer objects are created in the OpenGL server so that the
client application can avoid uploading vertices, indices,
texture image data, etc every time they are needed.
QOpenGLBuffer objects can be copied around as a reference to the
underlying OpenGL buffer object:
\snippet code/src_gui_opengl_qopenglbuffer.cpp 0
QOpenGLBuffer performs a shallow copy when objects are copied in this
manner, but does not implement copy-on-write semantics. The original
object will be affected whenever the copy is modified.
\warning All data consumed by QOpenGLBuffer is expected to be trusted
content. Buffer data is passed on to the underlying OpenGL implementation.
Application developers are advised to carefully consider the potential
implications before passing in user-provided content to functions such as
allocate() and write().
|
18951 |
- |
| qopenglbuffer.h |
|
3373 |
- |
| qopenglcompositor.cpp |
!
\class QOpenGLCompositor
\brief A generic OpenGL-based compositor
\since 5.4
\internal
\ingroup qpa
This class provides a lightweight compositor that maintains the
basic stacking order of windows and composites them by drawing
textured quads via OpenGL.
It it meant to be used by platform plugins that run without a
windowing system.
It is up to the platform plugin to manage the lifetime of the
compositor (instance(), destroy()), set the correct destination
context and window as early as possible (setTarget()),
register the composited windows as they are shown, activated,
raised and lowered (addWindow(), moveToTop(), etc.), and to
schedule repaints (update()).
\note To get support for QWidget-based windows, just use
QOpenGLCompositorBackingStore. It will automatically create
textures from the raster-rendered content and trigger the
necessary repaints.
|
12372 |
- |
| qopenglcompositor_p.h |
|
3101 |
- |
| qopenglcompositorbackingstore.cpp |
!
\class QOpenGLCompositorBackingStore
\brief A backing store implementation for OpenGL
\since 5.4
\internal
\ingroup qpa
This implementation uploads raster-rendered widget windows into
textures. It is meant to be used with QOpenGLCompositor that
composites the textures onto a single native window using OpenGL.
This means that multiple top-level widgets are supported without
creating actual native windows for each of them.
\note It is important to call notifyComposited() from the
corresponding platform window's endCompositing() callback
(inherited from QOpenGLCompositorWindow).
\note When implementing QOpenGLCompositorWindow::textures() for
windows of type RasterSurface, simply return
the list provided by this class' textures().
|
9191 |
- |
| qopenglcompositorbackingstore_p.h |
|
2081 |
- |
| qopenglcustomshaderstage.cpp |
|
2872 |
- |
| qopenglcustomshaderstage_p.h |
|
1272 |
- |
| qopengldebug.cpp |
!
\class QOpenGLDebugMessage
\brief The QOpenGLDebugMessage class wraps an OpenGL debug message.
\inmodule QtOpenGL
\reentrant
\since 5.1
\ingroup shared
\ingroup painting-3D
Debug messages are usually created by the OpenGL server and then read by
OpenGL clients (either from the OpenGL internal debug log, or logged in real-time).
A debug message has a textual representation, a vendor-specific numeric id,
a source, a type and a severity.
It's also possible for applications or third-party libraries and toolkits
to create and insert messages in the debug log. In order to do so, you can use
the createApplicationMessage() or the createThirdPartyMessage() static functions.
\sa QOpenGLDebugLogger
|
64917 |
- |
| qopengldebug.h |
|
6676 |
- |
| qopenglengineshadermanager.cpp |
Rather than having the shader source array statically initialised, it is initialised
here instead. This is to allow new shader names to be inserted or existing names moved
around without having to change the order of the glsl strings. It is hoped this will
make future hard-to-find runtime bugs more obvious and generally give more solid code.
|
39666 |
- |
| qopenglengineshadermanager_p.h |
|
18691 |
- |
| qopenglengineshadersource_p.h |
|
36497 |
- |
| qopenglframebufferobject.cpp |
!
\class QOpenGLFramebufferObjectFormat
\brief The QOpenGLFramebufferObjectFormat class specifies the format of an OpenGL
framebuffer object.
\inmodule QtOpenGL
\since 5.0
\ingroup painting-3D
A framebuffer object has several characteristics:
\list
\li \l{setSamples()}{Number of samples per pixels.}
\li \l{setAttachment()}{Depth and/or stencil attachments.}
\li \l{setTextureTarget()}{Texture target.}
\li \l{setInternalTextureFormat()}{Internal texture format.}
\endlist
Note that the desired attachments or number of samples per pixels might not
be supported by the hardware driver. Call QOpenGLFramebufferObject::format()
after creating a QOpenGLFramebufferObject to find the exact format that was
used to create the frame buffer object.
\sa QOpenGLFramebufferObject
|
67245 |
- |
| qopenglframebufferobject.h |
|
5489 |
- |
| qopenglframebufferobject_p.h |
|
4077 |
- |
| qopenglfunctions_1_0.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
3234 |
- |
| qopenglfunctions_1_0.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
57846 |
- |
| qopenglfunctions_1_1.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
3984 |
- |
| qopenglfunctions_1_1.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
65442 |
- |
| qopenglfunctions_1_2.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
4734 |
- |
| qopenglfunctions_1_2.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
77285 |
- |
| qopenglfunctions_1_3.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
5484 |
- |
| qopenglfunctions_1_3.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
88813 |
- |
| qopenglfunctions_1_4.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
6234 |
- |
| qopenglfunctions_1_4.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
97897 |
- |
| qopenglfunctions_1_5.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
6588 |
- |
| qopenglfunctions_1_5.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
101905 |
- |
| qopenglfunctions_2_0.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
6942 |
- |
| qopenglfunctions_2_0.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
122539 |
- |
| qopenglfunctions_2_1.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
7296 |
- |
| qopenglfunctions_2_1.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
124601 |
- |
| qopenglfunctions_3_0.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
7650 |
- |
| qopenglfunctions_3_0.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
144686 |
- |
| qopenglfunctions_3_1.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
5949 |
- |
| qopenglfunctions_3_1.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
61426 |
- |
| qopenglfunctions_3_2_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
8584 |
- |
| qopenglfunctions_3_2_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
164155 |
- |
| qopenglfunctions_3_2_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
6403 |
- |
| qopenglfunctions_3_2_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
68209 |
- |
| qopenglfunctions_3_3_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
9334 |
- |
| qopenglfunctions_3_3_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
178344 |
- |
| qopenglfunctions_3_3_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
6757 |
- |
| qopenglfunctions_3_3_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
75444 |
- |
| qopenglfunctions_4_0_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
9688 |
- |
| qopenglfunctions_4_0_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
190810 |
- |
| qopenglfunctions_4_0_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
7110 |
- |
| qopenglfunctions_4_0_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
87420 |
- |
| qopenglfunctions_4_1_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
10042 |
- |
| qopenglfunctions_4_1_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
216945 |
- |
| qopenglfunctions_4_1_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
7465 |
- |
| qopenglfunctions_4_1_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
112687 |
- |
| qopenglfunctions_4_2_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
10396 |
- |
| qopenglfunctions_4_2_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
221691 |
- |
| qopenglfunctions_4_2_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
7819 |
- |
| qopenglfunctions_4_2_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
117249 |
- |
| qopenglfunctions_4_3_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
10750 |
- |
| qopenglfunctions_4_3_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
233684 |
- |
| qopenglfunctions_4_3_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
8173 |
- |
| qopenglfunctions_4_3_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
128870 |
- |
| qopenglfunctions_4_4_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
11105 |
- |
| qopenglfunctions_4_4_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
239709 |
- |
| qopenglfunctions_4_4_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
8527 |
- |
| qopenglfunctions_4_4_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
146495 |
- |
| qopenglfunctions_4_5_compatibility.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
11854 |
- |
| qopenglfunctions_4_5_compatibility.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
279989 |
- |
| qopenglfunctions_4_5_core.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
8881 |
- |
| qopenglfunctions_4_5_core.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
182051 |
- |
| qopenglfunctions_es2.cpp |
!
\class QOpenGLFunctions_ES2
\inmodule QtOpenGL
\since 5.1
\wrapper
\brief The QOpenGLFunctions_ES2 class provides all functions for OpenGL ES 2.
This class is a wrapper for OpenGL ES 2 functions. See reference pages on
\l {http://www.khronos.org/opengles/sdk/docs/man/}{khronos.org} for
function documentation.
\sa QAbstractOpenGLFunctions
|
1894 |
- |
| qopenglfunctions_es2.h |
|
31313 |
- |
| qopenglgradientcache.cpp |
|
8369 |
- |
| qopenglgradientcache_p.h |
|
2218 |
- |
| qopenglpaintdevice.cpp |
!
\class QOpenGLPaintDevice
\brief The QOpenGLPaintDevice class enables painting to an OpenGL context using QPainter.
\since 5.0
\inmodule QtOpenGL
\ingroup painting-3D
The QOpenGLPaintDevice uses the \b current QOpenGL context to render
QPainter draw commands. The context is captured upon construction. It
requires support for OpenGL (ES) 2.0 or higher.
\section1 Performance
The QOpenGLPaintDevice is almost always hardware accelerated and
has the potential of being much faster than software
rasterization. However, it is more sensitive to state changes, and
therefore requires the drawing commands to be carefully ordered to
achieve optimal performance.
\section1 Antialiasing and Quality
Antialiasing in the OpenGL paint engine is done using
multisampling. Most hardware require significantly more memory to
do multisampling and the resulting quality is not on par with the
quality of the software paint engine. The OpenGL paint engine's
strength lies in its performance, not its visual rendering
quality.
\section1 State Changes
When painting to a QOpenGLPaintDevice using QPainter, the state of
the current OpenGL context will be altered by the paint engine to
reflect its needs. Applications should not rely upon the OpenGL
state being reset to its original conditions, particularly the
current shader program, OpenGL viewport, texture units, and
drawing modes.
\section1 Mixing QPainter and OpenGL
When intermixing QPainter and OpenGL, it is important to notify
QPainter that the OpenGL state may have been cluttered so it can
restore its internal state. This is achieved by calling \l
QPainter::beginNativePainting() before starting the OpenGL
rendering and calling \l QPainter::endNativePainting() after
finishing.
\section1 Security Considerations
\warning All content rendered through QOpenGLPaintDevice is expected to be
trusted content. Vector geometry, images, and other drawing data are
processed, possibly modified, and passed on to the underlying OpenGL
implementation. Application developers are advised to carefully consider the
potential implications before rendering (passing on) user-provided content.
\sa {OpenGL Window Example}
|
8565 |
- |
| qopenglpaintdevice.h |
|
1548 |
- |
| qopenglpaintdevice_p.h |
|
1165 |
- |
| qopenglpaintengine.cpp |
When the active program changes, we need to update it's uniforms.
We could track state for each program and only update stale uniforms
- Could lead to lots of overhead if there's a lot of programs
We could update all the uniforms when the program changes
- Could end up updating lots of uniforms which don't need updating
Updating uniforms should be cheap, so the overhead of updating up-to-date
uniforms should be minimal. It's also less complex.
Things which _may_ cause a different program to be used:
- Change in brush/pen style
- Change in painter opacity
- Change in composition mode
Whenever we set a mode on the shader manager - it needs to tell us if it had
to switch to a different program.
The shader manager should only switch when we tell it to. E.g. if we set a new
brush style and then switch to transparent painter, we only want it to compile
and use the correct program when we really need it.
|
105246 |
- |
| qopenglpaintengine_p.h |
|
12208 |
- |
| qopenglpixeltransferoptions.cpp |
!
\class QOpenGLPixelTransferOptions
\inmodule QtOpenGL
\brief The QOpenGLPixelTransferOptions class describes the pixel storage
modes that affect the unpacking of pixels during texture upload.
|
5492 |
- |
| qopenglpixeltransferoptions.h |
|
1692 |
- |
| qopenglqueryhelper_p.h |
|
5460 |
- |
| qopenglshadercache_p.h |
|
1038 |
- |
| qopenglshaderprogram.cpp |
!
\class QOpenGLShaderProgram
\brief The QOpenGLShaderProgram class allows OpenGL shader programs to be linked and used.
\since 5.0
\ingroup painting-3D
\inmodule QtOpenGL
\section1 Introduction
This class supports shader programs written in the OpenGL Shading
Language (GLSL) and in the OpenGL/ES Shading Language (GLSL/ES).
QOpenGLShader and QOpenGLShaderProgram shelter the programmer from the details of
compiling and linking vertex and fragment shaders.
The following example creates a vertex shader program using the
supplied source \c{code}. Once compiled and linked, the shader
program is activated in the current QOpenGLContext by calling
QOpenGLShaderProgram::bind():
\snippet code/src_gui_qopenglshaderprogram.cpp 0
\section1 Writing Portable Shaders
Shader programs can be difficult to reuse across OpenGL implementations
because of varying levels of support for standard vertex attributes and
uniform variables. In particular, GLSL/ES lacks all of the
standard variables that are present on desktop OpenGL systems:
\c{gl_Vertex}, \c{gl_Normal}, \c{gl_Color}, and so on. Desktop OpenGL
lacks the variable qualifiers \c{highp}, \c{mediump}, and \c{lowp}.
The QOpenGLShaderProgram class makes the process of writing portable shaders
easier by prefixing all shader programs with the following lines on
desktop OpenGL:
\code
#define highp
#define mediump
#define lowp
\endcode
This makes it possible to run most GLSL/ES shader programs
on desktop systems. The programmer should restrict themselves
to just features that are present in GLSL/ES, and avoid
standard variable names that only work on the desktop.
\section1 Simple Shader Example
\snippet code/src_gui_qopenglshaderprogram.cpp 1
With the above shader program active, we can draw a green triangle
as follows:
\snippet code/src_gui_qopenglshaderprogram.cpp 2
\section1 Binary Shaders and Programs
Binary shaders may be specified using \c{glShaderBinary()} on
the return value from QOpenGLShader::shaderId(). The QOpenGLShader instance
containing the binary can then be added to the shader program with
addShader() and linked in the usual fashion with link().
Binary programs may be specified using \c{glProgramBinaryOES()}
on the return value from programId(). Then the application should
call link(), which will notice that the program has already been
specified and linked, allowing other operations to be performed
on the shader program. The shader program's id can be explicitly
created using the create() function.
\section2 Caching Program Binaries
As of Qt 5.9, support for caching program binaries on disk is built in. To
enable this, switch to using addCacheableShaderFromSourceCode() and
addCacheableShaderFromSourceFile(). With an OpenGL ES 3.x context or support
for \c{GL_ARB_get_program_binary}, this will transparently cache program
binaries under QStandardPaths::CacheLocation. When support is not
available, calling the cacheable function variants is equivalent to the
normal ones.
\note Some drivers do not have any binary formats available, even though
they advertise the extension or offer OpenGL ES 3.0. In this case program
binary support will be disabled.
\section1 Security Considerations
All data consumed by QOpenGLShaderProgram is expected to be trusted content.
Shader source code is passed, possibly after minimal modifications, on to
the underlying OpenGL implementation's compiler, which is a black box from
Qt's perspective.
\warning Application developers are advised to carefully consider the
potential implications before passing in user-provided content to functions
such as addShaderFromSourceFile().
\sa QOpenGLShader
|
120447 |
- |
| qopenglshaderprogram.h |
|
13004 |
- |
| qopengltexture.cpp |
|
172571 |
- |
| qopengltexture.h |
|
27501 |
- |
| qopengltexture_p.h |
|
4813 |
- |
| qopengltextureblitter.cpp |
!
\class QOpenGLTextureBlitter
\brief The QOpenGLTextureBlitter class provides a convenient way to draw textured quads via OpenGL.
\since 5.8
\ingroup painting-3D
\inmodule QtOpenGL
Drawing textured quads, in order to get the contents of a texture
onto the screen, is a common operation when developing 2D user
interfaces. QOpenGLTextureBlitter provides a convenience class to
avoid repeating vertex data, shader sources, buffer and program
management and matrix calculations.
For example, a QOpenGLWidget subclass can do the following to draw
the contents rendered into a framebuffer at the pixel position \c{(x, y)}:
\code
void OpenGLWidget::initializeGL()
{
m_blitter.create();
m_fbo = new QOpenGLFramebufferObject(size);
}
void OpenGLWidget::paintGL()
{
m_fbo->bind();
// update offscreen content
m_fbo->release();
m_blitter.bind();
const QRect targetRect(QPoint(x, y), m_fbo->size());
const QMatrix4x4 target = QOpenGLTextureBlitter::targetTransform(targetRect, QRect(QPoint(0, 0), m_fbo->size()));
m_blitter.blit(m_fbo->texture(), target, QOpenGLTextureBlitter::OriginBottomLeft);
m_blitter.release();
}
\endcode
The blitter implements GLSL shaders both for GLSL 1.00 (suitable
for OpenGL (ES) 2.x and compatibility profiles of newer OpenGL
versions) and version 150 (suitable for core profile contexts with
OpenGL 3.2 and newer).
|
25838 |
- |
| qopengltextureblitter.h |
|
1513 |
- |
| qopengltexturecache.cpp |
|
6516 |
- |
| qopengltexturecache_p.h |
|
2475 |
- |
| qopengltextureglyphcache.cpp |
|
16982 |
- |
| qopengltextureglyphcache_p.h |
|
4452 |
- |
| qopengltexturehelper.cpp |
|
35812 |
- |
| qopengltexturehelper_p.h |
|
49704 |
- |
| qopengltextureuploader.cpp |
|
15156 |
- |
| qopengltextureuploader_p.h |
|
1288 |
- |
| qopengltimerquery.cpp |
|
27738 |
- |
| qopengltimerquery.h |
|
1715 |
- |
| qopenglversionfunctions.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
13093 |
- |
| qopenglversionfunctions.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
110032 |
- |
| qopenglversionfunctions_p.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2012 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
1607 |
- |
| qopenglversionfunctionsfactory.cpp |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
10130 |
- |
| qopenglversionfunctionsfactory.h |
This file was generated by glgen version 0.1
* Command line was: glgen
*
* glgen is Copyright (C) 2012 Klaralvdalens Datakonsult AB (KDAB)
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*
************************************************************************** |
1284 |
- |
| qopenglversionprofile.cpp |
!
\class QOpenGLVersionProfile
\inmodule QtOpenGL
\since 5.1
\brief The QOpenGLVersionProfile class represents the version and if applicable
the profile of an OpenGL context.
An object of this class can be passed to QOpenGLContext::versionFunctions() to
request a functions object for a specific version and profile of OpenGL.
It also contains some helper functions to check if a version supports profiles
or is a legacy version.
|
4561 |
- |
| qopenglversionprofile.h |
|
1912 |
- |
| qopenglvertexarrayobject.cpp |
|
18349 |
- |
| qopenglvertexarrayobject.h |
|
1699 |
- |
| qopenglvertexarrayobject_p.h |
|
2585 |
- |
| qopenglwindow.cpp |
!
\class QOpenGLWindow
\inmodule QtOpenGL
\since 5.4
\brief The QOpenGLWindow class is a convenience subclass of QWindow to perform OpenGL painting.
QOpenGLWindow is an enhanced QWindow that allows easily creating windows that
perform OpenGL rendering using an API that is compatible with QOpenGLWidget
Unlike QOpenGLWidget, QOpenGLWindow has no dependency on the widgets module
and offers better performance.
A typical application will subclass QOpenGLWindow and reimplement the following
virtual functions:
\list
\li initializeGL() to perform OpenGL resource initialization
\li resizeGL() to set up the transformation matrices and other window size dependent resources
\li paintGL() to issue OpenGL commands or draw using QPainter
\endlist
To schedule a repaint, call the update() function. Note that this will not
immediately result in a call to paintGL(). Calling update() multiple times in
a row will not change the behavior in any way.
This is a slot so it can be connected to a \l QChronoTimer::timeout() signal to
perform animation. Note however that in the modern OpenGL world it is a much
better choice to rely on synchronization to the vertical refresh rate of the
display. See \l{QSurfaceFormat::setSwapInterval()}{setSwapInterval()} on a
description of the swap interval. With a swap interval of \c 1, which is the
case on most systems by default, the
\l{QOpenGLContext::swapBuffers()}{swapBuffers()} call, that is executed
internally by QOpenGLWindow after each repaint, will block and wait for
vsync. This means that whenever the swap is done, an update can be scheduled
again by calling update(), without relying on timers.
To request a specific configuration for the context, use setFormat()
like for any other QWindow. This allows, among others, requesting a
given OpenGL version and profile, or enabling depth and stencil
buffers.
\note It is up to the application to ensure depth and stencil buffers are
requested from the underlying windowing system interface. Without requesting
a non-zero depth buffer size there is no guarantee that a depth buffer will
be available, and as a result depth testing related OpenGL operations may fail
to function as expected.
Commonly used depth and stencil buffer size requests are 24 and 8,
respectively. For example, a QOpenGLWindow subclass could do this in its
constructor:
\code
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
setFormat(format);
\endcode
Unlike QWindow, QOpenGLWindow allows opening a painter on itself and perform
QPainter-based drawing.
QOpenGLWindow supports multiple update behaviors. The default,
\c NoPartialUpdate is equivalent to a regular, OpenGL-based QWindow. In
contrast, \c PartialUpdateBlit and \c PartialUpdateBlend are
more in line with QOpenGLWidget's way of working, where there is always an
extra, dedicated framebuffer object present. These modes allow, by
sacrificing some performance, redrawing only a smaller area on each paint and
having the rest of the content preserved from of the previous frame. This is
useful for applications than render incrementally using QPainter, because
this way they do not have to redraw the entire window content on each
paintGL() call.
Similarly to QOpenGLWidget, QOpenGLWindow supports the Qt::AA_ShareOpenGLContexts
attribute. When enabled, the OpenGL contexts of all QOpenGLWindow instances will share
with each other. This allows accessing each other's shareable OpenGL resources.
For more information on graphics in Qt, see \l {Graphics}.
|
23492 |
- |
| qopenglwindow.h |
|
1746 |
- |
| qtopenglglobal.h |
|
368 |
- |
| qvkconvenience.cpp |
!
\class QVkConvenience
\brief A collection of static helper functions for Vulkan support
\since 5.14
\internal
\ingroup qpa
|
12461 |
- |
| qvkconvenience_p.h |
|
796 |
- |