Skip to content

PythonQt.QtGui.QOpenGLTexture · declarations 007

Back to PythonQt.QtGui.QOpenGLTexture

TextureUnitReset instance-attribute

TextureUnitReset: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

UInt16 instance-attribute

UInt16: Any

UInt16_R5G6B5 instance-attribute

UInt16_R5G6B5: Any

UInt16_R5G6B5_Rev instance-attribute

UInt16_R5G6B5_Rev: Any

UInt16_RGB5A1 instance-attribute

UInt16_RGB5A1: Any

UInt16_RGB5A1_Rev instance-attribute

UInt16_RGB5A1_Rev: Any

UInt16_RGBA4 instance-attribute

UInt16_RGBA4: Any

UInt16_RGBA4_Rev instance-attribute

UInt16_RGBA4_Rev: Any

UInt32 instance-attribute

UInt32: Any

UInt32_D24S8 instance-attribute

UInt32_D24S8: Any

UInt32_RG11B10F instance-attribute

UInt32_RG11B10F: Any

UInt32_RGB10A2 instance-attribute

UInt32_RGB10A2: Any

UInt32_RGB10A2_Rev instance-attribute

UInt32_RGB10A2_Rev: Any

UInt32_RGB9_E5 instance-attribute

UInt32_RGB9_E5: Any

UInt32_RGBA8 instance-attribute

UInt32_RGBA8: Any

UInt32_RGBA8_Rev instance-attribute

UInt32_RGBA8_Rev: Any

UInt8 instance-attribute

UInt8: Any

UInt8_RG3B2 instance-attribute

UInt8_RG3B2: Any

UInt8_RG3B2_Rev instance-attribute

UInt8_RG3B2_Rev: Any

WrapMode instance-attribute

WrapMode: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

ZeroValue instance-attribute

ZeroValue: Any

allocateStorage

allocateStorage(pixelFormat: Any, pixelType: Any) -> None

X.allocateStorage(pixelFormat, pixelType)

Supplemental documentation: Qt 5 reference:

void QOpenGLTexture::allocateStorage()

Allocates server-side storage for this texture object taking into account, the format, dimensions, mipmap levels, array layers and cubemap faces.

Once storage has been allocated it is no longer possible to change these properties.

If supported QOpenGLTexture makes use of immutable texture storage.

Once storage has been allocated for the texture then pixel data can be uploaded via one of the setData() overloads.

Note: If immutable texture storage is not available, then a default pixel format and pixel type will be used to create the mutable storage. You can use the other allocateStorage() overload to specify exactly the pixel format and the pixel type to use when allocating mutable storage; this is particulary useful under certain OpenGL ES implementations (notably, OpenGL ES 2), where the pixel format and the pixel type used at allocation time must perfectly match the format and the type passed to any subsequent setData() call.

See also isStorageAllocated() and setData().

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

Allocates server-side storage for this texture object taking into account, the format, dimensions, mipmap levels, array layers and cubemap faces.

Once storage has been allocated it is no longer possible to change these properties.

If supported QOpenGLTexture makes use of immutable texture storage. However, if immutable texture storage is not available, then the specified pixelFormat and pixelType will be used to allocate mutable storage; note that in certain OpenGL implementations (notably, OpenGL ES 2) they must perfectly match the format and the type passed to any subsequent setData() call.

Once storage has been allocated for the texture then pixel data can be uploaded via one of the setData() overloads.

This function was introduced in Qt 5.5.

See also isStorageAllocated() and setData().

Upstream PySide2 reference signatures (binding differences may apply):

allocateStorage(self) -> None
allocateStorage(self, pixelFormat: PySide2.QtGui.QOpenGLTexture.PixelFormat, pixelType: PySide2.QtGui.QOpenGLTexture.PixelType) -> None

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#allocateStorage

bind

bind(unit: Any, reset: Any) -> None

X.bind(unit, reset)

Supplemental documentation: Qt 5 reference:

void QOpenGLTexture::bind()

Binds this texture to the currently active texture unit ready for rendering. Note that you do not need to bind QOpenGLTexture objects in order to modify them as the implementation makes use of the EXT_direct_state_access extension where available and simulates it where it is not.

See also release().

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

Binds this texture to texture unit unit ready for rendering. Note that you do not need to bind QOpenGLTexture objects in order to modify them as the implementation makes use of the EXT_direct_state_access extension where available and simulates it where it is not.

If parameter reset is true then this function will restore the active unit to the texture unit that was active upon entry.

See also release().

Upstream PySide2 reference signatures (binding differences may apply):

bind(self) -> None
bind(self, unit: int, reset: PySide2.QtGui.QOpenGLTexture.TextureUnitReset=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#bind

borderColor

borderColor(border: Any) -> Any

X.borderColor(border) -> PythonQt.QtGui.QColor

Supplemental documentation: Qt 5 reference:

QColor QOpenGLTexture::borderColor() const

Returns the borderColor of this texture.

See also setBorderColor().

void QOpenGLTexture::borderColor(float *border) const

Writes the texture border color into the first four elements of the array pointed to by border.

See also setBorderColor().

void QOpenGLTexture::borderColor(int *border) const

Writes the texture border color into the first four elements of the array pointed to by border.

This is an overloaded function.

void QOpenGLTexture::borderColor(unsigned int *border) const

Writes the texture border color into the first four elements of the array pointed to by border.

This is an overloaded function.

Upstream PySide2 reference signatures (binding differences may apply):

borderColor(self) -> PySide2.QtGui.QColor

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#borderColor

boundTextureId

boundTextureId(unit: Any, target: Any) -> int

X.boundTextureId(unit, target) -> int

Supplemental documentation: Qt 5 reference:

[static] GLuint QOpenGLTexture::boundTextureId(QOpenGLTexture::BindingTarget target)

Returns the textureId of the texture that is bound to the target of the currently active texture unit.

[static] GLuint QOpenGLTexture::boundTextureId(uint unit, QOpenGLTexture::BindingTarget target)

Returns the textureId of the texture that is bound to the target of the texture unit unit.

Upstream PySide2 reference signatures (binding differences may apply):

boundTextureId(target: PySide2.QtGui.QOpenGLTexture.BindingTarget) -> int
boundTextureId(unit: int, target: PySide2.QtGui.QOpenGLTexture.BindingTarget) -> int

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#boundTextureId

comparisonFunction

comparisonFunction() -> Any

X.comparisonFunction()

Supplemental documentation: Qt 5 reference:

QOpenGLTexture::ComparisonFunction QOpenGLTexture::comparisonFunction() const

Returns the texture comparison operator set on this texture. By default, a texture has a CompareLessEqual comparison function.

This function was introduced in Qt 5.5.

See also setComparisonFunction().

Upstream PySide2 reference signatures (binding differences may apply):

comparisonFunction(self) -> PySide2.QtGui.QOpenGLTexture.ComparisonFunction

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#comparisonFunction

comparisonMode

comparisonMode() -> Any

X.comparisonMode()

Supplemental documentation: Qt 5 reference:

QOpenGLTexture::ComparisonMode QOpenGLTexture::comparisonMode() const

Returns the texture comparison mode set on this texture. By default, a texture has a CompareNone comparison mode (i.e. comparisons are disabled).

This function was introduced in Qt 5.5.

See also setComparisonMode().

Upstream PySide2 reference signatures (binding differences may apply):

comparisonMode(self) -> PySide2.QtGui.QOpenGLTexture.ComparisonMode

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#comparisonMode

create

create() -> bool

X.create() -> bool

Supplemental documentation: Qt 5 reference:

bool QOpenGLTexture::create()

Creates the underlying OpenGL texture object. This requires a current valid OpenGL context. If the texture object already exists, this function does nothing.

Once the texture object is created you can obtain the object name from the textureId() function. This may be useful if you wish to make some raw OpenGL calls related to this texture.

Normally it should not be necessary to call this function directly as all functions that set properties of the texture object implicitly call create() on your behalf.

Returns true if the creation succeeded, otherwise returns false.

See also destroy(), isCreated(), and textureId().

Upstream PySide2 reference signatures (binding differences may apply):

create(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#create

createTextureView

createTextureView(target: Any, viewFormat: Any, minimumMipmapLevel: int, maximumMipmapLevel: int, minimumLayer: int, maximumLayer: int) -> Any

X.createTextureView(target, viewFormat, minimumMipmapLevel, maximumMipmapLevel, minimumLayer, maximumLayer) -> PythonQt.QtGui.QOpenGLTexture

Supplemental documentation: Qt 5 reference:

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

Attempts to create a texture view onto this texture. A texture view is somewhat analogous to a view in SQL in that it presents a restricted or reinterpreted view of the original data. Texture views do not allocate any more server-side storage, insted relying on the storage buffer of the source texture.

Texture views are only available when using immutable storage. For more information on texture views see http://www.opengl.org/wiki/Texture_Storage#Texture_views.

The target argument specifies the target to use for the view. Only some targets can be used depending upon the target of the original target. For e.g. a view onto a Target1DArray texture can specify either Target1DArray or Target1D but for the latter the number of array layers specified with minimumLayer and maximumLayer must be exactly 1.

Simpliar constraints apply for the viewFormat. See the above link and the specification for more details.

The minimumMipmapLevel, maximumMipmapLevel, minimumLayer, and maximumLayer arguments serve to restrict the parts of the texture accessible by the texture view.

If creation of the texture view fails this function will return 0. If the function succeeds it will return a pointer to a new QOpenGLTexture object that will return true from its isTextureView() function.

See also isTextureView().

Upstream PySide2 reference signatures (binding differences may apply):

createTextureView(self, target: PySide2.QtGui.QOpenGLTexture.Target, viewFormat: PySide2.QtGui.QOpenGLTexture.TextureFormat, minimumMipmapLevel: int, maximumMipmapLevel: int, minimumLayer: int, maximumLayer: int) -> PySide2.QtGui.QOpenGLTexture

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#createTextureView

depth

depth() -> int

X.depth() -> int

Supplemental documentation: Qt 5 reference:

int QOpenGLTexture::depth() const

Returns the depth of a 3D texture.

See also width(), height(), and setSize().

Upstream PySide2 reference signatures (binding differences may apply):

depth(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#depth

depthStencilMode

depthStencilMode() -> Any

X.depthStencilMode()

Supplemental documentation: Qt 5 reference:

QOpenGLTexture::DepthStencilMode QOpenGLTexture::depthStencilMode() const

Returns the depth stencil mode for textures using a combined depth/stencil format.

This function was introduced in Qt 5.4.

See also setDepthStencilMode().

Upstream PySide2 reference signatures (binding differences may apply):

depthStencilMode(self) -> PySide2.QtGui.QOpenGLTexture.DepthStencilMode

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#depthStencilMode

destroy

destroy() -> None

X.destroy()

Supplemental documentation: Qt 5 reference:

void QOpenGLTexture::destroy()

Destroys the underlying OpenGL texture object. This requires a current valid OpenGL context.

See also create(), isCreated(), and textureId().

Upstream PySide2 reference signatures (binding differences may apply):

destroy(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#destroy

faces

faces() -> int

X.faces() -> int

Supplemental documentation: Qt 5 reference:

int QOpenGLTexture::faces() const

Returns the number of faces for this texture. For cubemap and cubemap array type targets this will be 6.

For non-cubemap type targets this will return 1.

Upstream PySide2 reference signatures (binding differences may apply):

faces(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#faces

format

format() -> Any

X.format()

Supplemental documentation: Qt 5 reference:

QOpenGLTexture::TextureFormat QOpenGLTexture::format() const

Returns the format of this texture object.

See also setFormat().

Upstream PySide2 reference signatures (binding differences may apply):

format(self) -> PySide2.QtGui.QOpenGLTexture.TextureFormat

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#format

generateMipMaps

generateMipMaps(baseLevel: Any, resetBaseLevel: Any) -> None

X.generateMipMaps(baseLevel, resetBaseLevel)

Supplemental documentation: Qt 5 reference:

void QOpenGLTexture::generateMipMaps()

Generates mipmaps for this texture object from mipmap level 0. If you are using a texture target and filtering option that requires mipmaps and you have disabled automatic mipmap generation then you need to call this function or the overload to create the mipmap chain.

Note: Mipmap generation is not supported for compressed textures with OpenGL ES.

See also setAutoMipMapGenerationEnabled(), setMipLevels(), and mipLevels().

void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel \= true)

Generates mipmaps for this texture object from mipmap level baseLevel. If you are using a texture target and filtering option that requires mipmaps and you have disabled automatic mipmap generation then you need to call this function or the overload to create the mipmap chain.

The generation of mipmaps to above baseLevel is achieved by setting the mipmap base level to baseLevel and then generating the mipmap chain. If resetBaseLevel is true, then the baseLevel of the texture will be reset to its previous value.

See also setAutoMipMapGenerationEnabled(), setMipLevels(), and mipLevels().

Upstream PySide2 reference signatures (binding differences may apply):

generateMipMaps(self) -> None
generateMipMaps(self, baseLevel: int, resetBaseLevel: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#generateMipMaps

hasFeature

hasFeature(feature: Any) -> bool

X.hasFeature(feature) -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QOpenGLTexture::hasFeature(QOpenGLTexture::Feature feature)

Returns true if your OpenGL implementation and version supports the texture feature feature.

Upstream PySide2 reference signatures (binding differences may apply):

hasFeature(feature: PySide2.QtGui.QOpenGLTexture.Feature) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#hasFeature

height

height() -> int

X.height() -> int

Supplemental documentation: Qt 5 reference:

int QOpenGLTexture::height() const

Returns the height of a 2D or 3D texture.

See also width(), depth(), and setSize().

Upstream PySide2 reference signatures (binding differences may apply):

height(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#height

isAutoMipMapGenerationEnabled

isAutoMipMapGenerationEnabled() -> bool

X.isAutoMipMapGenerationEnabled() -> bool

Supplemental documentation: Qt 5 reference:

bool QOpenGLTexture::isAutoMipMapGenerationEnabled() const

Returns whether auto mipmap generation is enabled for this texture object.

See also setAutoMipMapGenerationEnabled() and generateMipMaps().

Upstream PySide2 reference signatures (binding differences may apply):

isAutoMipMapGenerationEnabled(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#isAutoMipMapGenerationEnabled

isBound

isBound(unit: Any) -> bool

X.isBound(unit) -> bool

Supplemental documentation: Qt 5 reference:

bool QOpenGLTexture::isBound() const

Returns true if this texture is bound to the corresponding target of the currently active texture unit.

See also bind() and release().

bool QOpenGLTexture::isBound(uint unit)

Returns true if this texture is bound to the corresponding target of texture unit unit.

See also bind() and release().

Upstream PySide2 reference signatures (binding differences may apply):

isBound(self) -> bool
isBound(self, unit: int) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#isBound

isCreated

isCreated() -> bool

X.isCreated() -> bool

Supplemental documentation: Qt 5 reference:

bool QOpenGLTexture::isCreated() const

Returns true if the underlying OpenGL texture object has been created.

See also create(), destroy(), and textureId().

Upstream PySide2 reference signatures (binding differences may apply):

isCreated(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qopengltexture.html#isCreated