Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qopengltextureblitter.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOPENGLTEXTUREBLITTER_H
5#define QOPENGLTEXTUREBLITTER_H
6
7#include <QtOpenGL/qtopenglglobal.h>
8
9#include <QtGui/qopengl.h>
10#include <QtGui/QMatrix3x3>
11#include <QtGui/QMatrix4x4>
12
14
16
17class Q_OPENGL_EXPORT QOpenGLTextureBlitter
18{
19public:
22
23 enum Origin {
25 OriginTopLeft
26 };
27
28 bool create();
29 bool isCreated() const;
30 void destroy();
31
32 bool supportsExternalOESTarget() const;
33 bool supportsRectangleTarget() const;
34
35 void bind(GLenum target = GL_TEXTURE_2D);
36 void release();
37
38 void setRedBlueSwizzle(bool swizzle);
39 void setOpacity(float opacity);
40
41 void blit(GLuint texture, const QMatrix4x4 &targetTransform, Origin sourceOrigin);
43
45 static QMatrix3x3 sourceTransform(const QRectF &subTexture, const QSize &textureSize, Origin origin);
46
47private:
48 Q_DISABLE_COPY(QOpenGLTextureBlitter)
49 Q_DECLARE_PRIVATE(QOpenGLTextureBlitter)
50 QScopedPointer<QOpenGLTextureBlitterPrivate> d_ptr;
51};
52
54
55#endif //QOPENGLTEXTUREBLITTER_H
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
The QOpenGLTextureBlitter class provides a convenient way to draw textured quads via OpenGL.
Origin
\value OriginBottomLeft Indicates that the data in the texture follows the OpenGL convention of coord...
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
Combined button and popup list for selecting options.
static QMatrix4x4 targetTransform(const QRectF &target, const QRect &viewport, bool invertY)
static QMatrix3x3 sourceTransform(const QRectF &subTexture, const QSize &textureSize, SourceTransformOrigin origin)
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
GLenum target
GLenum GLuint texture
GLuint GLenum swizzle
#define GLuint
sem release()
view viewport() -> scroll(dx, dy, deviceRect)
socketLayer bind(QHostAddress::Any, 4000)
view create()