![]() |
Qt 6.x
The Qt SDK
|
Classes | |
struct | Program |
Public Types | |
enum | TextureMatrixUniform { User , Identity , IdentityFlipped } |
enum | ProgramIndex { TEXTURE_2D , TEXTURE_EXTERNAL_OES , TEXTURE_RECTANGLE } |
Public Member Functions | |
QOpenGLTextureBlitterPrivate (QOpenGLTextureBlitter *q_ptr) | |
bool | buildProgram (ProgramIndex idx, const char *vs, const char *fs) |
bool | ensureProgram (ProgramIndex idx) |
void | blit (GLuint texture, const QMatrix4x4 &targetTransform, const QMatrix3x3 &sourceTransform) |
void | blit (GLuint texture, const QMatrix4x4 &targetTransform, QOpenGLTextureBlitter::Origin origin) |
QMatrix3x3 | toTextureCoordinates (const QMatrix3x3 &sourceTransform) const |
bool | prepareProgram (const QMatrix4x4 &vertexTransform) |
Public Attributes | |
QOpenGLTextureBlitter * | q |
QOpenGLBuffer | vertexBuffer |
QOpenGLBuffer | textureBuffer |
struct QOpenGLTextureBlitterPrivate::Program | programs [3] |
bool | swizzle |
float | opacity |
QScopedPointer< QOpenGLVertexArrayObject > | vao |
GLenum | currentTarget |
Definition at line 188 of file qopengltextureblitter.cpp.
Enumerator | |
---|---|
TEXTURE_2D | |
TEXTURE_EXTERNAL_OES | |
TEXTURE_RECTANGLE |
Definition at line 197 of file qopengltextureblitter.cpp.
Enumerator | |
---|---|
User | |
Identity | |
IdentityFlipped |
Definition at line 191 of file qopengltextureblitter.cpp.
|
inline |
Definition at line 203 of file qopengltextureblitter.cpp.
void QOpenGLTextureBlitterPrivate::blit | ( | GLuint | texture, |
const QMatrix4x4 & | targetTransform, | ||
const QMatrix3x3 & | sourceTransform | ||
) |
Definition at line 318 of file qopengltextureblitter.cpp.
References QOpenGLContext::currentContext(), currentTarget, QOpenGLContext::functions(), QOpenGLFunctions::glDrawArrays(), prepareProgram(), sourceTransform(), targetToProgramIndex(), targetTransform(), toTextureCoordinates(), and User.
void QOpenGLTextureBlitterPrivate::blit | ( | GLuint | texture, |
const QMatrix4x4 & | targetTransform, | ||
QOpenGLTextureBlitter::Origin | origin | ||
) |
Definition at line 335 of file qopengltextureblitter.cpp.
References QOpenGLContext::currentContext(), currentTarget, QOpenGLContext::functions(), QOpenGLFunctions::glDrawArrays(), Identity, IdentityFlipped, QOpenGLTextureBlitter::OriginTopLeft, prepareProgram(), sourceTransform(), targetToProgramIndex(), targetTransform(), and toTextureCoordinates().
bool QOpenGLTextureBlitterPrivate::buildProgram | ( | ProgramIndex | idx, |
const char * | vs, | ||
const char * | fs | ||
) |
Definition at line 363 of file qopengltextureblitter.cpp.
References QOpenGLShader::Fragment, QOpenGLTextureBlitterPrivate::Program::glProgram, qWarning, QScopedPointer< T, Cleanup >::reset(), and QOpenGLShader::Vertex.
Referenced by ensureProgram().
bool QOpenGLTextureBlitterPrivate::ensureProgram | ( | ProgramIndex | idx | ) |
Definition at line 394 of file qopengltextureblitter.cpp.
References buildProgram(), QSurfaceFormat::CoreProfile, QOpenGLContext::currentContext(), QOpenGLContext::format(), fragment_shader150_rectangle, fragment_shader_external_oes, fragment_shader_rectangle, qMakePair(), TEXTURE_EXTERNAL_OES, TEXTURE_RECTANGLE, vertex_shader, and vertex_shader150.
Referenced by prepareProgram().
bool QOpenGLTextureBlitterPrivate::prepareProgram | ( | const QMatrix4x4 & | vertexTransform | ) |
Definition at line 268 of file qopengltextureblitter.cpp.
References QOpenGLBuffer::bind(), currentTarget, ensureProgram(), GL_FLOAT, opacity, QOpenGLBuffer::release(), swizzle, targetToProgramIndex(), textureBuffer, and vertexBuffer.
Referenced by blit(), and blit().
QMatrix3x3 QOpenGLTextureBlitterPrivate::toTextureCoordinates | ( | const QMatrix3x3 & | sourceTransform | ) | const |
Definition at line 301 of file qopengltextureblitter.cpp.
References QOpenGLContext::currentContext(), currentTarget, GL_TEXTURE_HEIGHT, GL_TEXTURE_RECTANGLE, GL_TEXTURE_WIDTH, QMatrix4x4::scale(), sourceTransform(), and QMatrix4x4::toGenericMatrix().
Referenced by blit(), and blit().
GLenum QOpenGLTextureBlitterPrivate::currentTarget |
Definition at line 250 of file qopengltextureblitter.cpp.
Referenced by blit(), blit(), prepareProgram(), and toTextureCoordinates().
float QOpenGLTextureBlitterPrivate::opacity |
Definition at line 248 of file qopengltextureblitter.cpp.
Referenced by prepareProgram().
struct QOpenGLTextureBlitterPrivate::Program QOpenGLTextureBlitterPrivate::programs[3] |
QOpenGLTextureBlitter* QOpenGLTextureBlitterPrivate::q |
Definition at line 221 of file qopengltextureblitter.cpp.
bool QOpenGLTextureBlitterPrivate::swizzle |
Definition at line 247 of file qopengltextureblitter.cpp.
Referenced by prepareProgram().
QOpenGLBuffer QOpenGLTextureBlitterPrivate::textureBuffer |
Definition at line 223 of file qopengltextureblitter.cpp.
Referenced by prepareProgram().
QScopedPointer<QOpenGLVertexArrayObject> QOpenGLTextureBlitterPrivate::vao |
Definition at line 249 of file qopengltextureblitter.cpp.
QOpenGLBuffer QOpenGLTextureBlitterPrivate::vertexBuffer |
Definition at line 222 of file qopengltextureblitter.cpp.
Referenced by prepareProgram().