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
QOpenGLTextureBlitterPrivate Class Reference
+ Collaboration diagram for QOpenGLTextureBlitterPrivate:

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

QOpenGLTextureBlitterq
 
QOpenGLBuffer vertexBuffer
 
QOpenGLBuffer textureBuffer
 
struct QOpenGLTextureBlitterPrivate::Program programs [3]
 
bool swizzle
 
float opacity
 
QScopedPointer< QOpenGLVertexArrayObjectvao
 
GLenum currentTarget
 

Detailed Description

Definition at line 188 of file qopengltextureblitter.cpp.

Member Enumeration Documentation

◆ ProgramIndex

Enumerator
TEXTURE_2D 
TEXTURE_EXTERNAL_OES 
TEXTURE_RECTANGLE 

Definition at line 197 of file qopengltextureblitter.cpp.

◆ TextureMatrixUniform

Enumerator
User 
Identity 
IdentityFlipped 

Definition at line 191 of file qopengltextureblitter.cpp.

Constructor & Destructor Documentation

◆ QOpenGLTextureBlitterPrivate()

QOpenGLTextureBlitterPrivate::QOpenGLTextureBlitterPrivate ( QOpenGLTextureBlitter * q_ptr)
inline

Definition at line 203 of file qopengltextureblitter.cpp.

Member Function Documentation

◆ blit() [1/2]

void QOpenGLTextureBlitterPrivate::blit ( GLuint texture,
const QMatrix4x4 & targetTransform,
const QMatrix3x3 & sourceTransform )

Definition at line 318 of file qopengltextureblitter.cpp.

References QOpenGLContext::currentContext(), currentTarget, prepareProgram(), sourceTransform(), targetToProgramIndex(), targetTransform(), toTextureCoordinates(), and User.

+ Here is the call graph for this function:

◆ blit() [2/2]

void QOpenGLTextureBlitterPrivate::blit ( GLuint texture,
const QMatrix4x4 & targetTransform,
QOpenGLTextureBlitter::Origin origin )

Definition at line 335 of file qopengltextureblitter.cpp.

References QOpenGLContext::currentContext(), currentTarget, Identity, IdentityFlipped, QOpenGLTextureBlitter::OriginTopLeft, prepareProgram(), sourceTransform(), targetToProgramIndex(), targetTransform(), and toTextureCoordinates().

+ Here is the call graph for this function:

◆ buildProgram()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toTextureCoordinates()

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, and sourceTransform().

Referenced by blit(), and blit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ currentTarget

GLenum QOpenGLTextureBlitterPrivate::currentTarget

Definition at line 250 of file qopengltextureblitter.cpp.

Referenced by blit(), blit(), prepareProgram(), and toTextureCoordinates().

◆ opacity

float QOpenGLTextureBlitterPrivate::opacity

Definition at line 248 of file qopengltextureblitter.cpp.

Referenced by prepareProgram().

◆ programs

struct QOpenGLTextureBlitterPrivate::Program QOpenGLTextureBlitterPrivate::programs[3]

◆ q

QOpenGLTextureBlitter* QOpenGLTextureBlitterPrivate::q

Definition at line 221 of file qopengltextureblitter.cpp.

◆ swizzle

bool QOpenGLTextureBlitterPrivate::swizzle

Definition at line 247 of file qopengltextureblitter.cpp.

Referenced by prepareProgram().

◆ textureBuffer

QOpenGLBuffer QOpenGLTextureBlitterPrivate::textureBuffer

Definition at line 223 of file qopengltextureblitter.cpp.

Referenced by prepareProgram().

◆ vao

QScopedPointer<QOpenGLVertexArrayObject> QOpenGLTextureBlitterPrivate::vao

Definition at line 249 of file qopengltextureblitter.cpp.

◆ vertexBuffer

QOpenGLBuffer QOpenGLTextureBlitterPrivate::vertexBuffer

Definition at line 222 of file qopengltextureblitter.cpp.

Referenced by prepareProgram().


The documentation for this class was generated from the following file: