diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-02-20 15:19:49 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-02-26 20:06:07 +0000 |
commit | 5bb4d064945db43d62ea24b5d23bf4b0b4420e38 (patch) | |
tree | c9f01a6beec73a040d03445a4e34b94f4b9e4ddd /src/widgets/kernel/qopenglwidget.h | |
parent | 931e4ae66504f5d0be9d097565b4e9f49a92c69a (diff) |
Add support for custom texture format in QOpenGLWidget
...in order to support sRGB framebuffers.
Add a --srgb option to the qopenglwidget example to allow testing.
[ChangeLog][QtWidgets][QOpenGLWidget] Added support for specifying
custom internal texture formats in QOpenGLWidget in order to make it
possible to have the widget backed by an sRGB-capable framebuffer.
Task-number: QTBUG-50987
Change-Id: I112e2f0ab0b1478c69e601031aa0bafaa87fa847
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/widgets/kernel/qopenglwidget.h')
-rw-r--r-- | src/widgets/kernel/qopenglwidget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/kernel/qopenglwidget.h b/src/widgets/kernel/qopenglwidget.h index b60d79bedb..c0a6e41522 100644 --- a/src/widgets/kernel/qopenglwidget.h +++ b/src/widgets/kernel/qopenglwidget.h @@ -72,6 +72,9 @@ public: void setFormat(const QSurfaceFormat &format); QSurfaceFormat format() const; + GLenum textureFormat() const; + void setTextureFormat(GLenum texFormat); + bool isValid() const; void makeCurrent(); |