Struct qt_gui::QOpenGLTexture

source ·
#[repr(C)]
pub struct QOpenGLTexture { /* private fields */ }
Expand description

The QOpenGLTexture class encapsulates an OpenGL texture object.

C++ class: QOpenGLTexture.

C++ documentation:

The QOpenGLTexture class encapsulates an OpenGL texture object.

QOpenGLTexture makes it easy to work with OpenGL textures and the myriad features and targets that they offer depending upon the capabilities of your OpenGL implementation.

The typical usage pattern for QOpenGLTexture is

  • Instantiate the object specifying the texture target type
  • Set properties that affect the storage requirements e.g. storage format, dimensions
  • Allocate the server-side storage
  • Optionally upload pixel data
  • Optionally set any additional properties e.g. filtering and border options
  • Render with texture or render to texture

In the common case of simply using a QImage as the source of texture pixel data most of the above steps are performed automatically.

// Prepare texture QOpenGLTexture *texture = new QOpenGLTexture(QImage(fileName).mirrored()); texture->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear); texture->setMagnificationFilter(QOpenGLTexture::Linear); ... // Render with texture texture->bind(); glDrawArrays(...);

Note that the QImage is mirrored vertically to account for the fact that OpenGL and QImage use opposite directions for the y axis. Another option would be to transform your texture coordinates.

Implementations§

source§

impl QOpenGLTexture

source

pub unsafe fn allocate_storage_0a(&self)

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

Calls C++ function: void QOpenGLTexture::allocateStorage().

C++ documentation:

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

source

pub unsafe fn allocate_storage_2a( &self, pixel_format: PixelFormat, pixel_type: PixelType )

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

Calls C++ function: void QOpenGLTexture::allocateStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType).

C++ documentation:

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

source

pub unsafe fn bind_0a(&self)

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.

Calls C++ function: void QOpenGLTexture::bind().

C++ documentation:

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

source

pub unsafe fn bind_2a(&self, unit: c_uint, reset: TextureUnitReset)

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.

Calls C++ function: void QOpenGLTexture::bind(unsigned int unit, QOpenGLTexture::TextureUnitReset reset = …).

C++ documentation:

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

source

pub unsafe fn bind_1a(&self, unit: c_uint)

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.

Calls C++ function: void QOpenGLTexture::bind(unsigned int unit).

C++ documentation:

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

source

pub unsafe fn border_color(&self) -> CppBox<QColor>

Returns the borderColor of this texture.

Calls C++ function: QColor QOpenGLTexture::borderColor() const.

C++ documentation:

Returns the borderColor of this texture.

See also setBorderColor().

source

pub unsafe fn border_color_float(&self, border: *mut c_float)

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

Calls C++ function: void QOpenGLTexture::borderColor(float* border) const.

C++ documentation:

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

See also setBorderColor().

source

pub unsafe fn border_color_int(&self, border: *mut c_int)

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

Calls C++ function: void QOpenGLTexture::borderColor(int* border) const.

C++ documentation:

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

This is an overloaded function.

source

pub unsafe fn border_color_uint(&self, border: *mut c_uint)

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

Calls C++ function: void QOpenGLTexture::borderColor(unsigned int* border) const.

C++ documentation:

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

This is an overloaded function.

source

pub unsafe fn bound_texture_id_1a(target: BindingTarget) -> u32

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

Calls C++ function: static GLuint QOpenGLTexture::boundTextureId(QOpenGLTexture::BindingTarget target).

C++ documentation:

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

source

pub unsafe fn bound_texture_id_2a(unit: c_uint, target: BindingTarget) -> u32

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

Calls C++ function: static GLuint QOpenGLTexture::boundTextureId(unsigned int unit, QOpenGLTexture::BindingTarget target).

C++ documentation:

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

source

pub unsafe fn comparison_function(&self) -> ComparisonFunction

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

Calls C++ function: QOpenGLTexture::ComparisonFunction QOpenGLTexture::comparisonFunction() const.

C++ documentation:

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

source

pub unsafe fn comparison_mode(&self) -> ComparisonMode

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

Calls C++ function: QOpenGLTexture::ComparisonMode QOpenGLTexture::comparisonMode() const.

C++ documentation:

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

source

pub unsafe fn create(&self) -> bool

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

Calls C++ function: bool QOpenGLTexture::create().

C++ documentation:

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

source

pub unsafe fn create_texture_view( &self, target: Target, view_format: TextureFormat, minimum_mipmap_level: c_int, maximum_mipmap_level: c_int, minimum_layer: c_int, maximum_layer: c_int ) -> Ptr<QOpenGLTexture>

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.

Calls C++ function: QOpenGLTexture* QOpenGLTexture::createTextureView(QOpenGLTexture::Target target, QOpenGLTexture::TextureFormat viewFormat, int minimumMipmapLevel, int maximumMipmapLevel, int minimumLayer, int maximumLayer) const.

C++ documentation:

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

source

pub unsafe fn depth(&self) -> c_int

Returns the depth of a 3D texture.

Calls C++ function: int QOpenGLTexture::depth() const.

C++ documentation:

Returns the depth of a 3D texture.

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

source

pub unsafe fn depth_stencil_mode(&self) -> DepthStencilMode

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

Calls C++ function: QOpenGLTexture::DepthStencilMode QOpenGLTexture::depthStencilMode() const.

C++ documentation:

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

This function was introduced in Qt 5.4.

See also setDepthStencilMode().

source

pub unsafe fn destroy(&self)

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

Calls C++ function: void QOpenGLTexture::destroy().

C++ documentation:

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

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

source

pub unsafe fn faces(&self) -> c_int

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

Calls C++ function: int QOpenGLTexture::faces() const.

C++ documentation:

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.

source

pub unsafe fn format(&self) -> TextureFormat

Returns the format of this texture object.

Calls C++ function: QOpenGLTexture::TextureFormat QOpenGLTexture::format() const.

C++ documentation:

Returns the format of this texture object.

See also setFormat().

source

pub unsafe fn generate_mip_maps_0a(&self)

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.

Calls C++ function: void QOpenGLTexture::generateMipMaps().

C++ documentation:

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 2.0.

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

source

pub unsafe fn generate_mip_maps_2a( &self, base_level: c_int, reset_base_level: bool )

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.

Calls C++ function: void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel = …).

C++ documentation:

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

source

pub unsafe fn generate_mip_maps_1a(&self, base_level: c_int)

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.

Calls C++ function: void QOpenGLTexture::generateMipMaps(int baseLevel).

C++ documentation:

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

source

pub unsafe fn has_feature(feature: Feature) -> bool

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

Calls C++ function: static bool QOpenGLTexture::hasFeature(QOpenGLTexture::Feature feature).

C++ documentation:

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

source

pub unsafe fn height(&self) -> c_int

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

Calls C++ function: int QOpenGLTexture::height() const.

C++ documentation:

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

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

source

pub unsafe fn is_auto_mip_map_generation_enabled(&self) -> bool

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

Calls C++ function: bool QOpenGLTexture::isAutoMipMapGenerationEnabled() const.

C++ documentation:

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

See also setAutoMipMapGenerationEnabled() and generateMipMaps().

source

pub unsafe fn is_bound(&self) -> bool

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

Calls C++ function: bool QOpenGLTexture::isBound() const.

C++ documentation:

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

See also bind() and release().

source

pub unsafe fn is_bound_mut(&self, unit: c_uint) -> bool

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

Calls C++ function: bool QOpenGLTexture::isBound(unsigned int unit).

C++ documentation:

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

See also bind() and release().

source

pub unsafe fn is_created(&self) -> bool

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

Calls C++ function: bool QOpenGLTexture::isCreated() const.

C++ documentation:

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

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

source

pub unsafe fn is_fixed_sample_positions(&self) -> bool

Returns whether this texture uses a fixed pattern of multisample samples. If storage has not yet been allocated for this texture then this function returns the requested fixed sample position setting.

Calls C++ function: bool QOpenGLTexture::isFixedSamplePositions() const.

C++ documentation:

Returns whether this texture uses a fixed pattern of multisample samples. If storage has not yet been allocated for this texture then this function returns the requested fixed sample position setting.

For texture targets that do not support multisampling this will return true.

See also setFixedSamplePositions() and isStorageAllocated().

source

pub unsafe fn is_storage_allocated(&self) -> bool

Returns true if server-side storage for this texture as been allocated.

Calls C++ function: bool QOpenGLTexture::isStorageAllocated() const.

C++ documentation:

Returns true if server-side storage for this texture as been allocated.

The texture format, dimensions, mipmap levels and array layers cannot be altered once storage ihas been allocated.

See also allocateStorage(), setSize(), setMipLevels(), setLayers(), and setFormat().

source

pub unsafe fn is_texture_view(&self) -> bool

Returns true if this texture object is actually a view onto another texture object.

Calls C++ function: bool QOpenGLTexture::isTextureView() const.

C++ documentation:

Returns true if this texture object is actually a view onto another texture object.

See also createTextureView().

source

pub unsafe fn layers(&self) -> c_int

Returns the number of array layers for this texture. If storage has not yet been allocated for this texture then this function returns the requested number of array layers.

Calls C++ function: int QOpenGLTexture::layers() const.

C++ documentation:

Returns the number of array layers for this texture. If storage has not yet been allocated for this texture then this function returns the requested number of array layers.

For texture targets that do not support array layers this will return 1.

See also setLayers() and isStorageAllocated().

source

pub unsafe fn level_of_detail_range(&self) -> CppBox<QPairOfFloatFloat>

Returns the minimum and maximum level of detail parameters.

Calls C++ function: QPair<float, float> QOpenGLTexture::levelOfDetailRange() const.

C++ documentation:

Returns the minimum and maximum level of detail parameters.

See also setLevelOfDetailRange(), minimumLevelOfDetail(), and maximumLevelOfDetail().

source

pub unsafe fn levelof_detail_bias(&self) -> c_float

Returns the level of detail bias parameter.

Calls C++ function: float QOpenGLTexture::levelofDetailBias() const.

C++ documentation:

Returns the level of detail bias parameter.

See also setLevelofDetailBias().

source

pub unsafe fn magnification_filter(&self) -> Filter

Returns the magnification filter.

Calls C++ function: QOpenGLTexture::Filter QOpenGLTexture::magnificationFilter() const.

C++ documentation:

Returns the magnification filter.

See also setMagnificationFilter().

source

pub unsafe fn maximum_anisotropy(&self) -> c_float

Returns the maximum level of anisotropy to be accounted for when performing texture lookups. This requires the GL_EXT_texture_filter_anisotropic extension.

Calls C++ function: float QOpenGLTexture::maximumAnisotropy() const.

C++ documentation:

Returns the maximum level of anisotropy to be accounted for when performing texture lookups. This requires the GL_EXT_texture_filter_anisotropic extension.

See also setMaximumAnisotropy().

source

pub unsafe fn maximum_level_of_detail(&self) -> c_float

Returns the maximum level of detail parameter.

Calls C++ function: float QOpenGLTexture::maximumLevelOfDetail() const.

C++ documentation:

Returns the maximum level of detail parameter.

See also setMaximumLevelOfDetail(), minimumLevelOfDetail(), and levelOfDetailRange().

source

pub unsafe fn maximum_mip_levels(&self) -> c_int

Returns the maximum number of mipmap levels that this texture can have given the current dimensions.

Calls C++ function: int QOpenGLTexture::maximumMipLevels() const.

C++ documentation:

Returns the maximum number of mipmap levels that this texture can have given the current dimensions.

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

source

pub unsafe fn min_mag_filters(&self) -> CppBox<QPairOfFilterFilter>

Returns the current minification and magnification filters.

Calls C++ function: QPair<QOpenGLTexture::Filter, QOpenGLTexture::Filter> QOpenGLTexture::minMagFilters() const.

C++ documentation:

Returns the current minification and magnification filters.

See also setMinMagFilters().

source

pub unsafe fn minification_filter(&self) -> Filter

Returns the minification filter.

Calls C++ function: QOpenGLTexture::Filter QOpenGLTexture::minificationFilter() const.

C++ documentation:

Returns the minification filter.

See also setMinificationFilter().

source

pub unsafe fn minimum_level_of_detail(&self) -> c_float

Returns the minimum level of detail parameter.

Calls C++ function: float QOpenGLTexture::minimumLevelOfDetail() const.

C++ documentation:

Returns the minimum level of detail parameter.

See also setMinimumLevelOfDetail(), maximumLevelOfDetail(), and levelOfDetailRange().

source

pub unsafe fn mip_base_level(&self) -> c_int

Returns the mipmap base level used for all texture lookups with this texture. The default is 0.

Calls C++ function: int QOpenGLTexture::mipBaseLevel() const.

C++ documentation:

Returns the mipmap base level used for all texture lookups with this texture. The default is 0.

See also setMipBaseLevel(), mipMaxLevel(), and mipLevelRange().

source

pub unsafe fn mip_level_range(&self) -> CppBox<QPairOfIntInt>

Returns the range of mipmap levels that can be used for texture lookups with this texture.

Calls C++ function: QPair<int, int> QOpenGLTexture::mipLevelRange() const.

C++ documentation:

Returns the range of mipmap levels that can be used for texture lookups with this texture.

See also setMipLevelRange(), mipBaseLevel(), and mipMaxLevel().

source

pub unsafe fn mip_levels(&self) -> c_int

Returns the number of mipmap levels for this texture. If storage has not yet been allocated for this texture it returns the requested number of mipmap levels.

Calls C++ function: int QOpenGLTexture::mipLevels() const.

C++ documentation:

Returns the number of mipmap levels for this texture. If storage has not yet been allocated for this texture it returns the requested number of mipmap levels.

See also setMipLevels(), maximumMipLevels(), and isStorageAllocated().

source

pub unsafe fn mip_max_level(&self) -> c_int

Returns the mipmap maximum level used for all texture lookups with this texture.

Calls C++ function: int QOpenGLTexture::mipMaxLevel() const.

C++ documentation:

Returns the mipmap maximum level used for all texture lookups with this texture.

See also setMipMaxLevel(), mipBaseLevel(), and mipLevelRange().

source

pub unsafe fn from_target(target: Target) -> CppBox<QOpenGLTexture>

Creates a QOpenGLTexture object that can later be bound to target.

Calls C++ function: [constructor] void QOpenGLTexture::QOpenGLTexture(QOpenGLTexture::Target target).

C++ documentation:

Creates a QOpenGLTexture object that can later be bound to target.

This does not create the underlying OpenGL texture object. Therefore, construction using this constructor does not require a valid current OpenGL context.

source

pub unsafe fn from_q_image_mip_map_generation( image: impl CastInto<Ref<QImage>>, gen_mip_maps: MipMapGeneration ) -> CppBox<QOpenGLTexture>

Creates a QOpenGLTexture object that can later be bound to the 2D texture target and contains the pixel data contained in image. If you wish to have a chain of mipmaps generated then set genMipMaps to true (this is the default).

Calls C++ function: [constructor] void QOpenGLTexture::QOpenGLTexture(const QImage& image, QOpenGLTexture::MipMapGeneration genMipMaps = …).

C++ documentation:

Creates a QOpenGLTexture object that can later be bound to the 2D texture target and contains the pixel data contained in image. If you wish to have a chain of mipmaps generated then set genMipMaps to true (this is the default).

This does create the underlying OpenGL texture object. Therefore, construction using this constructor does require a valid current OpenGL context.

source

pub unsafe fn from_q_image( image: impl CastInto<Ref<QImage>> ) -> CppBox<QOpenGLTexture>

Creates a QOpenGLTexture object that can later be bound to the 2D texture target and contains the pixel data contained in image. If you wish to have a chain of mipmaps generated then set genMipMaps to true (this is the default).

Calls C++ function: [constructor] void QOpenGLTexture::QOpenGLTexture(const QImage& image).

C++ documentation:

Creates a QOpenGLTexture object that can later be bound to the 2D texture target and contains the pixel data contained in image. If you wish to have a chain of mipmaps generated then set genMipMaps to true (this is the default).

This does create the underlying OpenGL texture object. Therefore, construction using this constructor does require a valid current OpenGL context.

source

pub unsafe fn release_0a(&self)

Unbinds this texture from the currently active texture unit.

Calls C++ function: void QOpenGLTexture::release().

C++ documentation:

Unbinds this texture from the currently active texture unit.

See also bind().

source

pub unsafe fn release_2a(&self, unit: c_uint, reset: TextureUnitReset)

Unbinds this texture from texture unit unit.

Calls C++ function: void QOpenGLTexture::release(unsigned int unit, QOpenGLTexture::TextureUnitReset reset = …).

C++ documentation:

Unbinds this texture from texture unit unit.

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

source

pub unsafe fn release_1a(&self, unit: c_uint)

Unbinds this texture from texture unit unit.

Calls C++ function: void QOpenGLTexture::release(unsigned int unit).

C++ documentation:

Unbinds this texture from texture unit unit.

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

source

pub unsafe fn samples(&self) -> c_int

Returns the number of multisample sample points for this texture. If storage has not yet been allocated for this texture then this function returns the requested number of samples.

Calls C++ function: int QOpenGLTexture::samples() const.

C++ documentation:

Returns the number of multisample sample points for this texture. If storage has not yet been allocated for this texture then this function returns the requested number of samples.

For texture targets that do not support multisampling this will return 0.

See also setSamples() and isStorageAllocated().

source

pub unsafe fn set_auto_mip_map_generation_enabled(&self, enabled: bool)

If enabled is true, enables automatic mipmap generation for this texture object to occur whenever the level 0 mipmap data is set via setData().

Calls C++ function: void QOpenGLTexture::setAutoMipMapGenerationEnabled(bool enabled).

C++ documentation:

If enabled is true, enables automatic mipmap generation for this texture object to occur whenever the level 0 mipmap data is set via setData().

The automatic mipmap generation is enabled by default.

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

See also isAutoMipMapGenerationEnabled() and generateMipMaps().

source

pub unsafe fn set_border_color_q_color(&self, color: impl CastInto<Ref<QColor>>)

Sets the border color of the texture to color.

Calls C++ function: void QOpenGLTexture::setBorderColor(QColor color).

C++ documentation:

Sets the border color of the texture to color.

Note: This function has no effect on Mac and Qt built for OpenGL ES 2.

See also borderColor().

source

pub unsafe fn set_border_color_4_float( &self, r: c_float, g: c_float, b: c_float, a: c_float )

Sets the color red to r, green to g, blue to b, and a to the alpha value.

Calls C++ function: void QOpenGLTexture::setBorderColor(float r, float g, float b, float a).

C++ documentation:

Sets the color red to r, green to g, blue to b, and a to the alpha value.

This is an overloaded function.

source

pub unsafe fn set_border_color_4_int( &self, r: c_int, g: c_int, b: c_int, a: c_int )

Sets the color red to r, green to g, blue to b, and the alpha value to a.

Calls C++ function: void QOpenGLTexture::setBorderColor(int r, int g, int b, int a).

C++ documentation:

Sets the color red to r, green to g, blue to b, and the alpha value to a.

This is an overloaded function.

source

pub unsafe fn set_border_color_4_uint( &self, r: c_uint, g: c_uint, b: c_uint, a: c_uint )

Sets the color red to r, green to g, blue to b, and the alpha value to a.

Calls C++ function: void QOpenGLTexture::setBorderColor(unsigned int r, unsigned int g, unsigned int b, unsigned int a).

C++ documentation:

Sets the color red to r, green to g, blue to b, and the alpha value to a.

This is an overloaded function.

source

pub unsafe fn set_comparison_function(&self, function: ComparisonFunction)

See also comparisonFunction().

Calls C++ function: void QOpenGLTexture::setComparisonFunction(QOpenGLTexture::ComparisonFunction function).

C++ documentation:

See also comparisonFunction().

source

pub unsafe fn set_comparison_mode(&self, mode: ComparisonMode)

Sets the texture comparison mode on this texture to mode. The texture comparison mode is used by shadow samplers when sampling a depth texture.

Calls C++ function: void QOpenGLTexture::setComparisonMode(QOpenGLTexture::ComparisonMode mode).

C++ documentation:

Sets the texture comparison mode on this texture to mode. The texture comparison mode is used by shadow samplers when sampling a depth texture.

This function was introduced in Qt 5.5.

See also comparisonMode().

source

pub unsafe fn set_compressed_data_2_int_cube_map_face_int_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, data_size: c_int, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_compressed_data_3_int_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, layer: c_int, data_size: c_int, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int dataSize, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_compressed_data_2_int_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, data_size: c_int, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int dataSize, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_compressed_data_int_void_q_opengl_pixel_transfer_options( &self, data_size: c_int, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setCompressedData(int dataSize, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_compressed_data_2_int_cube_map_face_int_void_q_opengl_pixel_transfer_options2( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, data_size: c_int, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Uploads compressed pixel data to mipLevel, array layer, and cubeFace. The pixel transfer can optionally be controlled with options. The dataSize argument should specify the size of the data pointed to by data.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

Uploads compressed pixel data to mipLevel, array layer, and cubeFace. The pixel transfer can optionally be controlled with options. The dataSize argument should specify the size of the data pointed to by data.

If not using a compressed format() then you should use setData() instead of this function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_compressed_data_3_int_cube_map_face_int_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, layer: c_int, layer_count: c_int, cube_face: CubeMapFace, data_size: c_int, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

Parameter layerCount is the number of layers in a texture array that are being uploaded/populated by this call.

This function was introduced in Qt 5.9.

source

pub unsafe fn set_compressed_data_3_int_void_q_opengl_pixel_transfer_options2( &self, mip_level: c_int, layer: c_int, data_size: c_int, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int dataSize, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

source

pub unsafe fn set_compressed_data_2_int_void_q_opengl_pixel_transfer_options2( &self, mip_level: c_int, data_size: c_int, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int dataSize, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

source

pub unsafe fn set_compressed_data_int_void_q_opengl_pixel_transfer_options2( &self, data_size: c_int, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int dataSize, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

source

pub unsafe fn set_compressed_data_2_int_cube_map_face_int_void( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, data_size: c_int, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, void* data).

source

pub unsafe fn set_compressed_data_3_int_void( &self, mip_level: c_int, layer: c_int, data_size: c_int, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int dataSize, void* data).

source

pub unsafe fn set_compressed_data_2_int_void( &self, mip_level: c_int, data_size: c_int, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int dataSize, void* data).

source

pub unsafe fn set_compressed_data_int_void( &self, data_size: c_int, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setCompressedData(int dataSize, void* data).

source

pub unsafe fn set_compressed_data_2_int_cube_map_face_int_void2( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, data_size: c_int, data: *const c_void )

Uploads compressed pixel data to mipLevel, array layer, and cubeFace. The pixel transfer can optionally be controlled with options. The dataSize argument should specify the size of the data pointed to by data.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, const void* data).

C++ documentation:

Uploads compressed pixel data to mipLevel, array layer, and cubeFace. The pixel transfer can optionally be controlled with options. The dataSize argument should specify the size of the data pointed to by data.

If not using a compressed format() then you should use setData() instead of this function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_compressed_data_3_int_cube_map_face_int_void( &self, mip_level: c_int, layer: c_int, layer_count: c_int, cube_face: CubeMapFace, data_size: c_int, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, int dataSize, const void* data).

C++ documentation:

This is an overloaded function.

Parameter layerCount is the number of layers in a texture array that are being uploaded/populated by this call.

This function was introduced in Qt 5.9.

source

pub unsafe fn set_compressed_data_3_int_void2( &self, mip_level: c_int, layer: c_int, data_size: c_int, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int dataSize, const void* data).

C++ documentation:

This is an overloaded function.

source

pub unsafe fn set_compressed_data_2_int_void2( &self, mip_level: c_int, data_size: c_int, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int mipLevel, int dataSize, const void* data).

C++ documentation:

This is an overloaded function.

source

pub unsafe fn set_compressed_data_int_void2( &self, data_size: c_int, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setCompressedData(int dataSize, const void* data).

C++ documentation:

This is an overloaded function.

source

pub unsafe fn set_data_2_int_cube_map_face_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_data_2_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, layer: c_int, source_format: PixelFormat, source_type: PixelType, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_data_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, source_format: PixelFormat, source_type: PixelType, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_data_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, source_format: PixelFormat, source_type: PixelType, data: *mut c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Calls C++ function: void QOpenGLTexture::setData(QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data, const QOpenGLPixelTransferOptions* options = …).

source

pub unsafe fn set_data_2_int_cube_map_face_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options2( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Uploads pixel data for this texture object mipLevel, array layer, and cubeFace. Storage must have been allocated before uploading pixel data. Some overloads of setData() will set appropriate dimensions, mipmap levels, and array layers and then allocate storage for you if they have enough information to do so. This will be noted in the function documentation.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

Uploads pixel data for this texture object mipLevel, array layer, and cubeFace. Storage must have been allocated before uploading pixel data. Some overloads of setData() will set appropriate dimensions, mipmap levels, and array layers and then allocate storage for you if they have enough information to do so. This will be noted in the function documentation.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

If using a compressed format() then you should use setCompressedData() instead of this function.

This function was introduced in Qt 5.3.

See also setCompressedData().

source

pub unsafe fn set_data_3_int_cube_map_face_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, mip_level: c_int, layer: c_int, layer_count: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

Parameter layerCount is the number of layers in a texture array that are being uploaded/populated by this call.

This function was introduced in Qt 5.9.

source

pub unsafe fn set_data_2_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options2( &self, mip_level: c_int, layer: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_data_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options2( &self, mip_level: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_data_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options2( &self, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_data_q_image_mip_map_generation( &self, image: impl CastInto<Ref<QImage>>, gen_mip_maps: MipMapGeneration )

This overload of setData() will allocate storage for you. The pixel data is contained in image. Mipmaps are generated by default. Set genMipMaps to DontGenerateMipMaps to turn off mipmap generation.

Calls C++ function: void QOpenGLTexture::setData(const QImage& image, QOpenGLTexture::MipMapGeneration genMipMaps = …).

C++ documentation:

This overload of setData() will allocate storage for you. The pixel data is contained in image. Mipmaps are generated by default. Set genMipMaps to DontGenerateMipMaps to turn off mipmap generation.

This is an overloaded function.

source

pub unsafe fn set_data_2_int_cube_map_face_pixel_format_pixel_type_void( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data).

source

pub unsafe fn set_data_2_int_pixel_format_pixel_type_void( &self, mip_level: c_int, layer: c_int, source_format: PixelFormat, source_type: PixelType, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data).

source

pub unsafe fn set_data_int_pixel_format_pixel_type_void( &self, mip_level: c_int, source_format: PixelFormat, source_type: PixelType, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data).

source

pub unsafe fn set_data_pixel_format_pixel_type_void( &self, source_format: PixelFormat, source_type: PixelType, data: *mut c_void )

Calls C++ function: void QOpenGLTexture::setData(QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, void* data).

source

pub unsafe fn set_data_2_int_cube_map_face_pixel_format_pixel_type_void2( &self, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

Uploads pixel data for this texture object mipLevel, array layer, and cubeFace. Storage must have been allocated before uploading pixel data. Some overloads of setData() will set appropriate dimensions, mipmap levels, and array layers and then allocate storage for you if they have enough information to do so. This will be noted in the function documentation.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

Uploads pixel data for this texture object mipLevel, array layer, and cubeFace. Storage must have been allocated before uploading pixel data. Some overloads of setData() will set appropriate dimensions, mipmap levels, and array layers and then allocate storage for you if they have enough information to do so. This will be noted in the function documentation.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

If using a compressed format() then you should use setCompressedData() instead of this function.

This function was introduced in Qt 5.3.

See also setCompressedData().

source

pub unsafe fn set_data_3_int_cube_map_face_pixel_format_pixel_type_void( &self, mip_level: c_int, layer: c_int, layer_count: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, int layerCount, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

Parameter layerCount is the number of layers in a texture array that are being uploaded/populated by this call.

This function was introduced in Qt 5.9.

source

pub unsafe fn set_data_2_int_pixel_format_pixel_type_void2( &self, mip_level: c_int, layer: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, int layer, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_data_int_pixel_format_pixel_type_void2( &self, mip_level: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int mipLevel, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_data_pixel_format_pixel_type_void2( &self, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This function was introduced in Qt 5.3.

source

pub unsafe fn set_data_q_image(&self, image: impl CastInto<Ref<QImage>>)

This overload of setData() will allocate storage for you. The pixel data is contained in image. Mipmaps are generated by default. Set genMipMaps to DontGenerateMipMaps to turn off mipmap generation.

Calls C++ function: void QOpenGLTexture::setData(const QImage& image).

C++ documentation:

This overload of setData() will allocate storage for you. The pixel data is contained in image. Mipmaps are generated by default. Set genMipMaps to DontGenerateMipMaps to turn off mipmap generation.

This is an overloaded function.

source

pub unsafe fn set_data_6_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_7_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image. The mip map level the sub image we want to update is specified with mipLevel.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_8_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, layer: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, int layer, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image. The mip map level and layerof the sub image we want to update are specified with mipLevel and layer.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_8_int_cube_map_face_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image.The mip map level, layer and cube map face of the sub image we want to update are specified with mipLevel, layer and face.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_8_int_cube_map_face_int_pixel_format_pixel_type_void_q_opengl_pixel_transfer_options( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, layer_count: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void, options: impl CastInto<Ptr<QOpenGLPixelTransferOptions>> )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, int layerCount, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data, const QOpenGLPixelTransferOptions* options = …).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image.The mip map level, starting layer, cube map face and number of layers of the sub image we want to update are specified with mipLevel, layer, face and layerCount.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_6_int_pixel_format_pixel_type_void( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_7_int_pixel_format_pixel_type_void( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image. The mip map level the sub image we want to update is specified with mipLevel.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_8_int_pixel_format_pixel_type_void( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, layer: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, int layer, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image. The mip map level and layerof the sub image we want to update are specified with mipLevel and layer.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_8_int_cube_map_face_pixel_format_pixel_type_void( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image.The mip map level, layer and cube map face of the sub image we want to update are specified with mipLevel, layer and face.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_data_8_int_cube_map_face_int_pixel_format_pixel_type_void( &self, x_offset: c_int, y_offset: c_int, z_offset: c_int, width: c_int, height: c_int, depth: c_int, mip_level: c_int, layer: c_int, cube_face: CubeMapFace, layer_count: c_int, source_format: PixelFormat, source_type: PixelType, data: *const c_void )

Available on cpp_lib_version="5.14.0" only.

This is an overloaded function.

Calls C++ function: void QOpenGLTexture::setData(int xOffset, int yOffset, int zOffset, int width, int height, int depth, int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace, int layerCount, QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType, const void* data).

C++ documentation:

This is an overloaded function.

This overload is to be used to update a part of the texture. Parameters xOffset, yOffset, zOffset specify the texel offsets within the texture. Parameters width, height and depth specify the dimensions of the sub image.The mip map level, starting layer, cube map face and number of layers of the sub image we want to update are specified with mipLevel, layer, face and layerCount.

The structure of the pixel data pointed to by data is specified by sourceFormat and sourceType. The pixel data upload can optionally be controlled by options.

This function was introduced in Qt 5.14.

source

pub unsafe fn set_depth_stencil_mode(&self, mode: DepthStencilMode)

If using a texture that has a combined depth/stencil format this function sets which component of the texture is accessed to mode.

Calls C++ function: void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode).

C++ documentation:

If using a texture that has a combined depth/stencil format this function sets which component of the texture is accessed to mode.

When the parameter is set to DepthMode, then accessing it from the shader will access the depth component as a single float, as normal. But when the parameter is set to StencilMode, the shader will access the stencil component.

Note: This function has no effect on Mac and Qt built for OpenGL ES 2.

This function was introduced in Qt 5.4.

See also depthStencilMode().

source

pub unsafe fn set_fixed_sample_positions(&self, fixed: bool)

Sets whether the sample positions and number of samples used with a multisample capable texture target to fixed. If set to true the sample positions and number of samples used are the same for all texels in the image and will not depend upon the image size or internal format. This function should be called before storage is allocated for the texture.

Calls C++ function: void QOpenGLTexture::setFixedSamplePositions(bool fixed).

C++ documentation:

Sets whether the sample positions and number of samples used with a multisample capable texture target to fixed. If set to true the sample positions and number of samples used are the same for all texels in the image and will not depend upon the image size or internal format. This function should be called before storage is allocated for the texture.

For targets that do not support multisampling this function has no effect.

The default value is true.

See also isFixedSamplePositions() and isStorageAllocated().

source

pub unsafe fn set_format(&self, format: TextureFormat)

Sets the format of this texture object to format. This function must be called before texture storage is allocated.

Calls C++ function: void QOpenGLTexture::setFormat(QOpenGLTexture::TextureFormat format).

C++ documentation:

Sets the format of this texture object to format. This function must be called before texture storage is allocated.

Note that all formats may not be supported. The exact set of supported formats is dependent upon your OpenGL implementation and version.

See also format() and allocateStorage().

source

pub unsafe fn set_layers(&self, layers: c_int)

Sets the number of array layers to allocate storage for. This function should be called before storage is allocated for the texture.

Calls C++ function: void QOpenGLTexture::setLayers(int layers).

C++ documentation:

Sets the number of array layers to allocate storage for. This function should be called before storage is allocated for the texture.

For targets that do not support array layers this function has no effect.

See also layers() and isStorageAllocated().

source

pub unsafe fn set_level_of_detail_range(&self, min: c_float, max: c_float)

Sets the minimum level of detail parameters to min and the maximum level to max.

Calls C++ function: void QOpenGLTexture::setLevelOfDetailRange(float min, float max).

C++ documentation:

Sets the minimum level of detail parameters to min and the maximum level to max.

Note: This function has no effect on Qt built for OpenGL ES 2.

See also levelOfDetailRange(), setMinimumLevelOfDetail(), and setMaximumLevelOfDetail().

source

pub unsafe fn set_levelof_detail_bias(&self, bias: c_float)

Sets the level of detail bias to bias. Level of detail bias affects the point at which mipmapping levels change. Increasing values for level of detail bias makes the overall images blurrier or smoother. Decreasing values make the overall images sharper.

Calls C++ function: void QOpenGLTexture::setLevelofDetailBias(float bias).

C++ documentation:

Sets the level of detail bias to bias. Level of detail bias affects the point at which mipmapping levels change. Increasing values for level of detail bias makes the overall images blurrier or smoother. Decreasing values make the overall images sharper.

Note: This function has no effect on Qt built for OpenGL ES 2.

See also levelofDetailBias().

source

pub unsafe fn set_magnification_filter(&self, filter: Filter)

Sets the magnification filter to filter.

Calls C++ function: void QOpenGLTexture::setMagnificationFilter(QOpenGLTexture::Filter filter).

C++ documentation:

Sets the magnification filter to filter.

See also magnificationFilter(), setMinificationFilter(), and setMinMagFilters().

source

pub unsafe fn set_maximum_anisotropy(&self, anisotropy: c_float)

If your OpenGL implementation supports the GL_EXT_texture_filter_anisotropic extension this function sets the maximum anisotropy level to anisotropy.

Calls C++ function: void QOpenGLTexture::setMaximumAnisotropy(float anisotropy).

C++ documentation:

If your OpenGL implementation supports the GL_EXT_texture_filter_anisotropic extension this function sets the maximum anisotropy level to anisotropy.

See also maximumAnisotropy().

source

pub unsafe fn set_maximum_level_of_detail(&self, value: c_float)

Sets the maximum level of detail to value. This limits the selection of lowest resolution mipmap (highest mipmap level). The default value is 1000.

Calls C++ function: void QOpenGLTexture::setMaximumLevelOfDetail(float value).

C++ documentation:

Sets the maximum level of detail to value. This limits the selection of lowest resolution mipmap (highest mipmap level). The default value is 1000.

Note: This function has no effect on Qt built for OpenGL ES 2.

See also maximumLevelOfDetail(), setMinimumLevelOfDetail(), and setLevelOfDetailRange().

source

pub unsafe fn set_min_mag_filters( &self, minification_filter: Filter, magnification_filter: Filter )

Sets the minification filter to minificationFilter and the magnification filter to magnificationFilter.

Calls C++ function: void QOpenGLTexture::setMinMagFilters(QOpenGLTexture::Filter minificationFilter, QOpenGLTexture::Filter magnificationFilter).

C++ documentation:

Sets the minification filter to minificationFilter and the magnification filter to magnificationFilter.

See also minMagFilters(), setMinificationFilter(), and setMagnificationFilter().

source

pub unsafe fn set_minification_filter(&self, filter: Filter)

Sets the filter used for minification to filter.

Calls C++ function: void QOpenGLTexture::setMinificationFilter(QOpenGLTexture::Filter filter).

C++ documentation:

Sets the filter used for minification to filter.

See also minificationFilter(), setMagnificationFilter(), and setMinMagFilters().

source

pub unsafe fn set_minimum_level_of_detail(&self, value: c_float)

Sets the minimum level of detail to value. This limits the selection of highest resolution mipmap (lowest mipmap level). The default value is -1000.

Calls C++ function: void QOpenGLTexture::setMinimumLevelOfDetail(float value).

C++ documentation:

Sets the minimum level of detail to value. This limits the selection of highest resolution mipmap (lowest mipmap level). The default value is -1000.

Note: This function has no effect on Qt built for OpenGL ES 2.

See also minimumLevelOfDetail(), setMaximumLevelOfDetail(), and setLevelOfDetailRange().

source

pub unsafe fn set_mip_base_level(&self, base_level: c_int)

Sets the base mipmap level used for all texture lookups with this texture to baseLevel.

Calls C++ function: void QOpenGLTexture::setMipBaseLevel(int baseLevel).

C++ documentation:

Sets the base mipmap level used for all texture lookups with this texture to baseLevel.

Note: This function has no effect on Qt built for OpenGL ES 2.

See also mipBaseLevel(), setMipMaxLevel(), and setMipLevelRange().

source

pub unsafe fn set_mip_level_range(&self, base_level: c_int, max_level: c_int)

Sets the range of mipmap levels that can be used for texture lookups with this texture to range from baseLevel to maxLevel.

Calls C++ function: void QOpenGLTexture::setMipLevelRange(int baseLevel, int maxLevel).

C++ documentation:

Sets the range of mipmap levels that can be used for texture lookups with this texture to range from baseLevel to maxLevel.

Note: This function has no effect on Qt built for OpenGL ES 2.

See also setMipBaseLevel(), setMipMaxLevel(), and mipLevelRange().

source

pub unsafe fn set_mip_levels(&self, levels: c_int)

For texture targets that support mipmaps, this function sets the requested number of mipmap levels to allocate storage for. This function should be called before storage is allocated for the texture.

Calls C++ function: void QOpenGLTexture::setMipLevels(int levels).

C++ documentation:

For texture targets that support mipmaps, this function sets the requested number of mipmap levels to allocate storage for. This function should be called before storage is allocated for the texture.

If the texture target does not support mipmaps this function has no effect.

See also mipLevels(), maximumMipLevels(), and isStorageAllocated().

source

pub unsafe fn set_mip_max_level(&self, max_level: c_int)

Sets the maximum mipmap level used for all texture lookups with this texture to maxLevel.

Calls C++ function: void QOpenGLTexture::setMipMaxLevel(int maxLevel).

C++ documentation:

Sets the maximum mipmap level used for all texture lookups with this texture to maxLevel.

Note: This function has no effect on Qt built for OpenGL ES 2.

See also mipMaxLevel(), setMipBaseLevel(), and setMipLevelRange().

source

pub unsafe fn set_samples(&self, samples: c_int)

Sets the number of samples to allocate storage for when rendering to a multisample capable texture target. This function should be called before storage is allocated for the texture.

Calls C++ function: void QOpenGLTexture::setSamples(int samples).

C++ documentation:

Sets the number of samples to allocate storage for when rendering to a multisample capable texture target. This function should be called before storage is allocated for the texture.

For targets that do not support multisampling this function has no effect.

See also samples() and isStorageAllocated().

source

pub unsafe fn set_size_3a(&self, width: c_int, height: c_int, depth: c_int)

Sets the dimensions of this texture object to width, height, and depth. The default for each dimension is 1. The maximum allowable texture size is dependent upon your OpenGL implementation. Allocating storage for a texture less than the maximum size can still fail if your system is low on resources.

Calls C++ function: void QOpenGLTexture::setSize(int width, int height = …, int depth = …).

C++ documentation:

Sets the dimensions of this texture object to width, height, and depth. The default for each dimension is 1. The maximum allowable texture size is dependent upon your OpenGL implementation. Allocating storage for a texture less than the maximum size can still fail if your system is low on resources.

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

source

pub unsafe fn set_size_2a(&self, width: c_int, height: c_int)

Sets the dimensions of this texture object to width, height, and depth. The default for each dimension is 1. The maximum allowable texture size is dependent upon your OpenGL implementation. Allocating storage for a texture less than the maximum size can still fail if your system is low on resources.

Calls C++ function: void QOpenGLTexture::setSize(int width, int height = …).

C++ documentation:

Sets the dimensions of this texture object to width, height, and depth. The default for each dimension is 1. The maximum allowable texture size is dependent upon your OpenGL implementation. Allocating storage for a texture less than the maximum size can still fail if your system is low on resources.

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

source

pub unsafe fn set_size_1a(&self, width: c_int)

Sets the dimensions of this texture object to width, height, and depth. The default for each dimension is 1. The maximum allowable texture size is dependent upon your OpenGL implementation. Allocating storage for a texture less than the maximum size can still fail if your system is low on resources.

Calls C++ function: void QOpenGLTexture::setSize(int width).

C++ documentation:

Sets the dimensions of this texture object to width, height, and depth. The default for each dimension is 1. The maximum allowable texture size is dependent upon your OpenGL implementation. Allocating storage for a texture less than the maximum size can still fail if your system is low on resources.

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

source

pub unsafe fn set_swizzle_mask_2a( &self, component: SwizzleComponent, value: SwizzleValue )

GLSL shaders are able to reorder the components of the vec4 returned by texture functions. It is also desirable to be able to control this reordering from CPU side code. This is made possible by swizzle masks since OpenGL 3.3.

Calls C++ function: void QOpenGLTexture::setSwizzleMask(QOpenGLTexture::SwizzleComponent component, QOpenGLTexture::SwizzleValue value).

C++ documentation:

GLSL shaders are able to reorder the components of the vec4 returned by texture functions. It is also desirable to be able to control this reordering from CPU side code. This is made possible by swizzle masks since OpenGL 3.3.

Each component of the texture can be mapped to one of the SwizzleValue options.

This function maps component to the output value.

Note: This function has no effect on Mac and Qt built for OpenGL ES 2.

See also swizzleMask().

source

pub unsafe fn set_swizzle_mask_4a( &self, r: SwizzleValue, g: SwizzleValue, b: SwizzleValue, a: SwizzleValue )

Parameters r, g, b, and a are values used for setting the colors red, green, blue, and the alpha value.

Calls C++ function: void QOpenGLTexture::setSwizzleMask(QOpenGLTexture::SwizzleValue r, QOpenGLTexture::SwizzleValue g, QOpenGLTexture::SwizzleValue b, QOpenGLTexture::SwizzleValue a).

C++ documentation:

Parameters r, g, b, and a are values used for setting the colors red, green, blue, and the alpha value.

This is an overloaded function.

source

pub unsafe fn set_wrap_mode_1a(&self, mode: WrapMode)

Sets the wrap (or repeat mode) for all texture dimentions to mode.

Calls C++ function: void QOpenGLTexture::setWrapMode(QOpenGLTexture::WrapMode mode).

C++ documentation:

Sets the wrap (or repeat mode) for all texture dimentions to mode.

See also wrapMode().

source

pub unsafe fn set_wrap_mode_2a( &self, direction: CoordinateDirection, mode: WrapMode )

Holds the texture dimension direction.

Calls C++ function: void QOpenGLTexture::setWrapMode(QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode).

C++ documentation:

Holds the texture dimension direction.

This is an overloaded function.

source

pub unsafe fn static_meta_object() -> Ref<QMetaObject>

Returns a reference to the staticMetaObject field.

source

pub unsafe fn swizzle_mask(&self, component: SwizzleComponent) -> SwizzleValue

Returns the swizzle mask for texture component.

Calls C++ function: QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(QOpenGLTexture::SwizzleComponent component) const.

C++ documentation:

Returns the swizzle mask for texture component.

See also setSwizzleMask().

source

pub unsafe fn target(&self) -> Target

Returns the binding target of this texture.

Calls C++ function: QOpenGLTexture::Target QOpenGLTexture::target() const.

C++ documentation:

Returns the binding target of this texture.

This function was introduced in Qt 5.4.

source

pub unsafe fn texture_id(&self) -> u32

Returns the name of the underlying OpenGL texture object or 0 if it has not yet been created.

Calls C++ function: GLuint QOpenGLTexture::textureId() const.

C++ documentation:

Returns the name of the underlying OpenGL texture object or 0 if it has not yet been created.

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

source

pub unsafe fn width(&self) -> c_int

Returns the width of a 1D, 2D or 3D texture.

Calls C++ function: int QOpenGLTexture::width() const.

C++ documentation:

Returns the width of a 1D, 2D or 3D texture.

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

source

pub unsafe fn wrap_mode(&self, direction: CoordinateDirection) -> WrapMode

Returns the wrap mode for the texture dimension direction.

Calls C++ function: QOpenGLTexture::WrapMode QOpenGLTexture::wrapMode(QOpenGLTexture::CoordinateDirection direction) const.

C++ documentation:

Returns the wrap mode for the texture dimension direction.

See also setWrapMode().

Trait Implementations§

source§

impl CppDeletable for QOpenGLTexture

source§

unsafe fn delete(&self)

Destroys the instance of QOpenGLTexture.

Calls C++ function: [destructor] void QOpenGLTexture::~QOpenGLTexture().

C++ documentation:

Destroys the instance of QOpenGLTexture.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.