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
QOpenGLTexturePrivate Class Reference

#include <qopengltexture_p.h>

+ Collaboration diagram for QOpenGLTexturePrivate:

Public Member Functions

 QOpenGLTexturePrivate (QOpenGLTexture::Target textureTarget, QOpenGLTexture *qq)
 
 ~QOpenGLTexturePrivate ()
 
void resetFuncs (QOpenGLTextureHelper *funcs)
 
void initializeOpenGLFunctions ()
 
bool create ()
 
void destroy ()
 
void bind ()
 
void bind (uint unit, QOpenGLTexture::TextureUnitReset reset=QOpenGLTexture::DontResetTextureUnit)
 
void release ()
 
void release (uint unit, QOpenGLTexture::TextureUnitReset reset=QOpenGLTexture::DontResetTextureUnit)
 
bool isBound () const
 
bool isBound (uint unit) const
 
void allocateStorage (QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)
 
void allocateMutableStorage (QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)
 
void allocateImmutableStorage ()
 
void setData (int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void *data, const QOpenGLPixelTransferOptions *const options)
 
void setData (int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void *data, const QOpenGLPixelTransferOptions *const options)
 
void setCompressedData (int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, const void *data, const QOpenGLPixelTransferOptions *const options)
 
void setWrapMode (QOpenGLTexture::WrapMode mode)
 
void setWrapMode (QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode)
 
QOpenGLTexture::WrapMode wrapMode (QOpenGLTexture::CoordinateDirection direction) const
 
QOpenGLTexturecreateTextureView (QOpenGLTexture::Target target, QOpenGLTexture::TextureFormat viewFormat, int minimumMipmapLevel, int maximumMipmapLevel, int minimumLayer, int maximumLayer) const
 
int evaluateMipLevels () const
 
int maximumMipLevelCount () const
 
bool isUsingImmutableStorage () const
 

Static Public Member Functions

static int mipLevelSize (int mipLevel, int baseLevelSize)
 

Public Attributes

QOpenGLTextureq_ptr
 
QOpenGLContextcontext
 
QOpenGLTexture::Target target
 
QOpenGLTexture::BindingTarget bindingTarget
 
GLuint textureId
 
QOpenGLTexture::TextureFormat format
 
QOpenGLTexture::TextureFormatClass formatClass
 
int dimensions [3]
 
int requestedMipLevels
 
int mipLevels
 
int layers
 
int faces
 
int samples
 
bool fixedSamplePositions
 
int baseLevel
 
int maxLevel
 
QOpenGLTexture::SwizzleValue swizzleMask [4]
 
QOpenGLTexture::DepthStencilMode depthStencilMode
 
QOpenGLTexture::ComparisonFunction comparisonFunction
 
QOpenGLTexture::ComparisonMode comparisonMode
 
QOpenGLTexture::Filter minFilter
 
QOpenGLTexture::Filter magFilter
 
float maxAnisotropy
 
QOpenGLTexture::WrapMode wrapModes [3]
 
QVariantList borderColor
 
float minLevelOfDetail
 
float maxLevelOfDetail
 
float levelOfDetailBias
 
bool textureView
 
bool autoGenerateMipMaps
 
bool storageAllocated
 
QOpenGLTextureHelpertexFuncs
 
QOpenGLFunctionsfunctions
 
QOpenGLTexture::Features features
 

Detailed Description

Definition at line 40 of file qopengltexture_p.h.

Constructor & Destructor Documentation

◆ QOpenGLTexturePrivate()

◆ ~QOpenGLTexturePrivate()

QOpenGLTexturePrivate::~QOpenGLTexturePrivate ( )

Definition at line 102 of file qopengltexture.cpp.

References destroy().

+ Here is the call graph for this function:

Member Function Documentation

◆ allocateImmutableStorage()

◆ allocateMutableStorage()

void QOpenGLTexturePrivate::allocateMutableStorage ( QOpenGLTexture::PixelFormat pixelFormat,
QOpenGLTexture::PixelType pixelType )

◆ allocateStorage()

void QOpenGLTexturePrivate::allocateStorage ( QOpenGLTexture::PixelFormat pixelFormat,
QOpenGLTexture::PixelType pixelType )

Definition at line 472 of file qopengltexture.cpp.

References allocateImmutableStorage(), allocateMutableStorage(), evaluateMipLevels(), isUsingImmutableStorage(), and mipLevels.

+ Here is the call graph for this function:

◆ bind() [1/2]

void QOpenGLTexturePrivate::bind ( )

Definition at line 211 of file qopengltexture.cpp.

References functions, QOpenGLFunctions::glBindTexture(), and textureId.

+ Here is the call graph for this function:

◆ bind() [2/2]

void QOpenGLTexturePrivate::bind ( uint unit,
QOpenGLTexture::TextureUnitReset reset = QOpenGLTexture::DontResetTextureUnit )

Definition at line 216 of file qopengltexture.cpp.

References functions, GL_ACTIVE_TEXTURE, GL_TEXTURE0, QOpenGLTextureHelper::glActiveTexture(), QOpenGLFunctions::glBindTexture(), QOpenGLFunctions::glGetIntegerv(), GLint(), QOpenGLTexture::ResetTextureUnit, texFuncs, and textureId.

+ Here is the call graph for this function:

◆ create()

bool QOpenGLTexturePrivate::create ( )

Definition at line 124 of file qopengltexture.cpp.

References context, QOpenGLContext::currentContext(), features, functions, QOpenGLFunctions::glGenTextures(), QOpenGLTexture::hasFeature(), QOpenGLTexture::ImmutableStorage, initializeOpenGLFunctions(), QOpenGLTexture::MaxFeatureFlag, qWarning, and textureId.

+ Here is the call graph for this function:

◆ createTextureView()

QOpenGLTexture * QOpenGLTexturePrivate::createTextureView ( QOpenGLTexture::Target target,
QOpenGLTexture::TextureFormat viewFormat,
int minimumMipmapLevel,
int maximumMipmapLevel,
int minimumLayer,
int maximumLayer ) const

Definition at line 1836 of file qopengltexture.cpp.

References QObject::d_ptr, format, formatClass, QOpenGLTexture::FormatClass_128Bit, QOpenGLTexture::FormatClass_16Bit, QOpenGLTexture::FormatClass_24Bit, QOpenGLTexture::FormatClass_32Bit, QOpenGLTexture::FormatClass_48Bit, QOpenGLTexture::FormatClass_64Bit, QOpenGLTexture::FormatClass_8Bit, QOpenGLTexture::FormatClass_96Bit, QOpenGLTexture::FormatClass_BPTC_Float, QOpenGLTexture::FormatClass_BPTC_Unorm, QOpenGLTexture::FormatClass_RGTC1_R, QOpenGLTexture::FormatClass_RGTC2_RG, QOpenGLTexture::FormatClass_S3TC_DXT1_RGB, QOpenGLTexture::FormatClass_S3TC_DXT1_RGBA, QOpenGLTexture::FormatClass_S3TC_DXT3_RGBA, QOpenGLTexture::FormatClass_S3TC_DXT5_RGBA, QOpenGLTexture::FormatClass_Unique, QOpenGLTextureHelper::glTextureView(), QOpenGLTexture::NoFormatClass, qWarning, QOpenGLTexture::R16_SNorm, QOpenGLTexture::R16_UNorm, QOpenGLTexture::R16F, QOpenGLTexture::R16I, QOpenGLTexture::R16U, QOpenGLTexture::R32F, QOpenGLTexture::R32I, QOpenGLTexture::R32U, QOpenGLTexture::R8_SNorm, QOpenGLTexture::R8_UNorm, QOpenGLTexture::R8I, QOpenGLTexture::R8U, QOpenGLTexture::R_ATI1N_SNorm, QOpenGLTexture::R_ATI1N_UNorm, QOpenGLTexture::RG11B10F, QOpenGLTexture::RG16_SNorm, QOpenGLTexture::RG16_UNorm, QOpenGLTexture::RG16F, QOpenGLTexture::RG16I, QOpenGLTexture::RG16U, QOpenGLTexture::RG32F, QOpenGLTexture::RG32I, QOpenGLTexture::RG32U, QOpenGLTexture::RG8_SNorm, QOpenGLTexture::RG8_UNorm, QOpenGLTexture::RG8I, QOpenGLTexture::RG8U, QOpenGLTexture::RG_ATI2N_SNorm, QOpenGLTexture::RG_ATI2N_UNorm, QOpenGLTexture::RGB10A2, QOpenGLTexture::RGB16_SNorm, QOpenGLTexture::RGB16_UNorm, QOpenGLTexture::RGB16F, QOpenGLTexture::RGB16I, QOpenGLTexture::RGB16U, QOpenGLTexture::RGB32F, QOpenGLTexture::RGB32I, QOpenGLTexture::RGB32U, QOpenGLTexture::RGB8_SNorm, QOpenGLTexture::RGB8_UNorm, QOpenGLTexture::RGB8I, QOpenGLTexture::RGB8U, QOpenGLTexture::RGB9E5, QOpenGLTexture::RGB_BP_SIGNED_FLOAT, QOpenGLTexture::RGB_BP_UNorm, QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT, QOpenGLTexture::RGB_DXT1, QOpenGLTexture::RGBA16_SNorm, QOpenGLTexture::RGBA16_UNorm, QOpenGLTexture::RGBA16F, QOpenGLTexture::RGBA16I, QOpenGLTexture::RGBA16U, QOpenGLTexture::RGBA32F, QOpenGLTexture::RGBA32I, QOpenGLTexture::RGBA32U, QOpenGLTexture::RGBA8_SNorm, QOpenGLTexture::RGBA8_UNorm, QOpenGLTexture::RGBA8I, QOpenGLTexture::RGBA8U, QOpenGLTexture::RGBA_DXT1, QOpenGLTexture::RGBA_DXT3, QOpenGLTexture::RGBA_DXT5, QOpenGLTexture::SRGB8, QOpenGLTexture::SRGB8_Alpha8, QOpenGLTexture::SRGB_Alpha_DXT1, QOpenGLTexture::SRGB_Alpha_DXT3, QOpenGLTexture::SRGB_Alpha_DXT5, QOpenGLTexture::SRGB_BP_UNorm, QOpenGLTexture::SRGB_DXT1, QOpenGLTexture::Target1D, QOpenGLTexture::Target1DArray, QOpenGLTexture::Target2D, QOpenGLTexture::Target2DArray, QOpenGLTexture::Target2DMultisample, QOpenGLTexture::Target2DMultisampleArray, QOpenGLTexture::Target3D, QOpenGLTexture::TargetBuffer, QOpenGLTexture::TargetCubeMap, QOpenGLTexture::TargetCubeMapArray, QOpenGLTexture::TargetRectangle, texFuncs, textureId, and view.

+ Here is the call graph for this function:

◆ destroy()

◆ evaluateMipLevels()

int QOpenGLTexturePrivate::evaluateMipLevels ( ) const

Definition at line 268 of file qopengltexture.cpp.

References maximumMipLevelCount(), qMax(), qMin(), requestedMipLevels, QOpenGLTexture::Target1D, QOpenGLTexture::Target1DArray, QOpenGLTexture::Target2D, QOpenGLTexture::Target2DArray, QOpenGLTexture::Target2DMultisample, QOpenGLTexture::Target2DMultisampleArray, QOpenGLTexture::Target3D, QOpenGLTexture::TargetBuffer, QOpenGLTexture::TargetCubeMap, QOpenGLTexture::TargetCubeMapArray, and QOpenGLTexture::TargetRectangle.

Referenced by allocateStorage().

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

◆ initializeOpenGLFunctions()

void QOpenGLTexturePrivate::initializeOpenGLFunctions ( )

Definition at line 107 of file qopengltexture.cpp.

References context, funcs, and texFuncs.

Referenced by create().

+ Here is the caller graph for this function:

◆ isBound() [1/2]

bool QOpenGLTexturePrivate::isBound ( ) const

Definition at line 247 of file qopengltexture.cpp.

References bindingTarget, functions, QOpenGLFunctions::glGetIntegerv(), GLint(), GLuint, and textureId.

+ Here is the call graph for this function:

◆ isBound() [2/2]

bool QOpenGLTexturePrivate::isBound ( uint unit) const

Definition at line 254 of file qopengltexture.cpp.

References bindingTarget, functions, GL_ACTIVE_TEXTURE, GL_TEXTURE0, QOpenGLTextureHelper::glActiveTexture(), QOpenGLFunctions::glGetIntegerv(), GLint(), GLuint, texFuncs, and textureId.

+ Here is the call graph for this function:

◆ isUsingImmutableStorage()

bool QOpenGLTexturePrivate::isUsingImmutableStorage ( ) const

Definition at line 461 of file qopengltexture.cpp.

References features, QOpenGLTexture::ImmutableMultisampleStorage, QOpenGLTexture::ImmutableStorage, isSizedTextureFormat(), and isTextureTargetMultisample().

Referenced by allocateStorage(), and setCompressedData().

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

◆ maximumMipLevelCount()

int QOpenGLTexturePrivate::maximumMipLevelCount ( ) const
inline

Definition at line 87 of file qopengltexture_p.h.

References dimensions, and qMax().

Referenced by evaluateMipLevels().

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

◆ mipLevelSize()

static int QOpenGLTexturePrivate::mipLevelSize ( int mipLevel,
int baseLevelSize )
inlinestatic

Definition at line 92 of file qopengltexture_p.h.

References qMax().

Referenced by allocateMutableStorage(), setCompressedData(), and setData().

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

◆ release() [1/2]

void QOpenGLTexturePrivate::release ( )

Definition at line 229 of file qopengltexture.cpp.

References functions, and QOpenGLFunctions::glBindTexture().

+ Here is the call graph for this function:

◆ release() [2/2]

void QOpenGLTexturePrivate::release ( uint unit,
QOpenGLTexture::TextureUnitReset reset = QOpenGLTexture::DontResetTextureUnit )

Definition at line 234 of file qopengltexture.cpp.

References functions, GL_ACTIVE_TEXTURE, GL_TEXTURE0, QOpenGLTextureHelper::glActiveTexture(), QOpenGLFunctions::glBindTexture(), QOpenGLFunctions::glGetIntegerv(), GLint(), QOpenGLTexture::ResetTextureUnit, and texFuncs.

+ Here is the call graph for this function:

◆ resetFuncs()

void QOpenGLTexturePrivate::resetFuncs ( QOpenGLTextureHelper * funcs)

◆ setCompressedData()

◆ setData() [1/2]

◆ setData() [2/2]

◆ setWrapMode() [1/2]

◆ setWrapMode() [2/2]

◆ wrapMode()

Member Data Documentation

◆ autoGenerateMipMaps

bool QOpenGLTexturePrivate::autoGenerateMipMaps

Definition at line 133 of file qopengltexture_p.h.

Referenced by destroy(), setCompressedData(), setData(), and setData().

◆ baseLevel

int QOpenGLTexturePrivate::baseLevel

Definition at line 115 of file qopengltexture_p.h.

Referenced by destroy().

◆ bindingTarget

◆ borderColor

QVariantList QOpenGLTexturePrivate::borderColor

Definition at line 127 of file qopengltexture_p.h.

◆ comparisonFunction

QOpenGLTexture::ComparisonFunction QOpenGLTexturePrivate::comparisonFunction

Definition at line 120 of file qopengltexture_p.h.

◆ comparisonMode

QOpenGLTexture::ComparisonMode QOpenGLTexturePrivate::comparisonMode

Definition at line 121 of file qopengltexture_p.h.

◆ context

QOpenGLContext* QOpenGLTexturePrivate::context

Definition at line 100 of file qopengltexture_p.h.

Referenced by create(), destroy(), and initializeOpenGLFunctions().

◆ depthStencilMode

QOpenGLTexture::DepthStencilMode QOpenGLTexturePrivate::depthStencilMode

Definition at line 119 of file qopengltexture_p.h.

Referenced by destroy().

◆ dimensions

int QOpenGLTexturePrivate::dimensions[3]

◆ faces

int QOpenGLTexturePrivate::faces

Definition at line 110 of file qopengltexture_p.h.

Referenced by QOpenGLTexturePrivate(), and destroy().

◆ features

QOpenGLTexture::Features QOpenGLTexturePrivate::features

◆ fixedSamplePositions

bool QOpenGLTexturePrivate::fixedSamplePositions

Definition at line 113 of file qopengltexture_p.h.

Referenced by allocateImmutableStorage(), allocateMutableStorage(), and destroy().

◆ format

QOpenGLTexture::TextureFormat QOpenGLTexturePrivate::format

Definition at line 104 of file qopengltexture_p.h.

Referenced by createTextureView().

◆ formatClass

QOpenGLTexture::TextureFormatClass QOpenGLTexturePrivate::formatClass

Definition at line 105 of file qopengltexture_p.h.

Referenced by createTextureView(), and destroy().

◆ functions

QOpenGLFunctions* QOpenGLTexturePrivate::functions

Definition at line 137 of file qopengltexture_p.h.

Referenced by bind(), bind(), create(), destroy(), isBound(), isBound(), release(), and release().

◆ layers

int QOpenGLTexturePrivate::layers

Definition at line 109 of file qopengltexture_p.h.

◆ levelOfDetailBias

float QOpenGLTexturePrivate::levelOfDetailBias

Definition at line 130 of file qopengltexture_p.h.

Referenced by destroy().

◆ magFilter

QOpenGLTexture::Filter QOpenGLTexturePrivate::magFilter

Definition at line 124 of file qopengltexture_p.h.

Referenced by destroy().

◆ maxAnisotropy

float QOpenGLTexturePrivate::maxAnisotropy

Definition at line 125 of file qopengltexture_p.h.

Referenced by destroy().

◆ maxLevel

int QOpenGLTexturePrivate::maxLevel

Definition at line 116 of file qopengltexture_p.h.

Referenced by destroy().

◆ maxLevelOfDetail

float QOpenGLTexturePrivate::maxLevelOfDetail

Definition at line 129 of file qopengltexture_p.h.

Referenced by destroy().

◆ minFilter

QOpenGLTexture::Filter QOpenGLTexturePrivate::minFilter

Definition at line 123 of file qopengltexture_p.h.

Referenced by destroy().

◆ minLevelOfDetail

float QOpenGLTexturePrivate::minLevelOfDetail

Definition at line 128 of file qopengltexture_p.h.

Referenced by destroy().

◆ mipLevels

int QOpenGLTexturePrivate::mipLevels

◆ q_ptr

QOpenGLTexture* QOpenGLTexturePrivate::q_ptr

Definition at line 99 of file qopengltexture_p.h.

◆ requestedMipLevels

int QOpenGLTexturePrivate::requestedMipLevels

Definition at line 107 of file qopengltexture_p.h.

Referenced by destroy(), and evaluateMipLevels().

◆ samples

int QOpenGLTexturePrivate::samples

Definition at line 112 of file qopengltexture_p.h.

◆ storageAllocated

bool QOpenGLTexturePrivate::storageAllocated

Definition at line 134 of file qopengltexture_p.h.

Referenced by allocateImmutableStorage(), allocateMutableStorage(), and destroy().

◆ swizzleMask

QOpenGLTexture::SwizzleValue QOpenGLTexturePrivate::swizzleMask[4]

Definition at line 118 of file qopengltexture_p.h.

Referenced by QOpenGLTexturePrivate(), and destroy().

◆ target

QOpenGLTexture::Target QOpenGLTexturePrivate::target

Definition at line 101 of file qopengltexture_p.h.

◆ texFuncs

◆ textureId

◆ textureView

bool QOpenGLTexturePrivate::textureView

Definition at line 132 of file qopengltexture_p.h.

Referenced by destroy().

◆ wrapModes

QOpenGLTexture::WrapMode QOpenGLTexturePrivate::wrapModes[3]

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