[−][src]Struct qt_3d_render::QShaderImage
To make the content of textures available for read and write operations in a shader, they need to exposed as QShaderImage. Textures can be composed of several mip levels, layers and faces. Additionally declaring a QShaderImage allows specifying which level, layer or face of the texture content we want to access.
C++ class: Qt3DRender::QShaderImage
.
To make the content of textures available for read and write operations in a shader, they need to exposed as QShaderImage. Textures can be composed of several mip levels, layers and faces. Additionally declaring a QShaderImage allows specifying which level, layer or face of the texture content we want to access.
QShaderImage has to be assigned as a QParameter's value and reference a valid Qt3DRender::QAbstractTexture to work properly.
If the referenced texture is a one-dimensional array, two-dimensional array, three-dimensional, cube map, cube map array, or two-dimensional multisample array texture, it is possible to bind either the entire texture level or a single layer or face of the texture level. This can be controlled with the layered property.
Support for QShaderImage is only supported with OpenGL 4 and partially with OpenGL ES 3.1 and 3.2.
OpenGL 4 supports the following image types:
GLSL Type | OpenGL Type Enum | Texture Type |
---|---|---|
image1D | GL_IMAGE_1D | QTexture1D |
image2D | GL_IMAGE_2D | QTexture2D |
image3D | GL_IMAGE_3D | QTexture3D |
image2DRect | GL_IMAGE_2D_RECT | QTextureRectangle |
imageCube | GL_IMAGE_CUBE | QTextureCubeMap |
imageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
image1DArray | GL_IMAGE_1D_ARRAY | QTexture1DArray |
image2DArray | GL_IMAGE_2D_ARRAY | QTexture2DArray |
imageCubeArray | GL_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
image2DMS | GL_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
image2DMSArray | GL_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
iimage1D | GL_INT_IMAGE_1D | QTexture1D |
iimage2D | GL_INT_IMAGE_2D | QTexture2D |
iimage3D | GL_INT_IMAGE_3D | QTexture3D |
iimage2DRect | GL_INT_IMAGE_2D_RECT | QTextureRectangle |
iimageCube | GL_INT_IMAGE_CUBE | QTextureCubeMap |
iimageBuffer | GL_INT_IMAGE_BUFFER | QTextureBuffer |
iimage1DArray | GL_INT_IMAGE_1D_ARRAY | QTexture1DArray |
iimage2DArray | GL_INT_IMAGE_2D_ARRAY | QTexture2DArray |
iimageCubeArray | GL_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
iimage2DMS | GL_INT_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
iimage2DMSArray | GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
uimage1D | GL_UNSIGNED_INT_IMAGE_1D | QTexture1D |
uimage2D | GL_UNSIGNED_INT_IMAGE_2D | QTexture2D |
uimage3D | GL_UNSIGNED_INT_IMAGE_3D | QTexture3D |
uimage2DRect | GL_UNSIGNED_INT_IMAGE_2D_RECT | QTextureRectangle |
uimageCube | GL_UNSIGNED_INT_IMAGE_CUBE | QTextureCubeMap |
uimageBuffer | GL_UNSIGNED_INT_IMAGE_BUFFER | QTextureBuffer |
uimage1DArray | GL_UNSIGNED_INT_IMAGE_1D_ARRAY | QTexture1DArray |
uimage2DArray | GL_UNSIGNED_INT_IMAGE_2D_ARRAY | QTexture2DArray |
uimageCubeArray | GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
uimage2DMS | GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
uimage2DMSArray | GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
OpenGL ES 3.1 supports the following image types:
GLSL Type | OpenGL Type Enum | Texture Type |
---|---|---|
image2D | GL_IMAGE_2D | QTexture2D |
image3D | GL_IMAGE_3D | QTexture3D |
imageCube | GL_IMAGE_CUBE | QTextureCubeMap |
image2DArray | GL_IMAGE_2D_ARRAY | QTexture2DArray |
iimage2D | GL_INT_IMAGE_2D | QTexture2D |
iimage3D | GL_INT_IMAGE_3D | QTexture3D |
iimageCube | GL_INT_IMAGE_CUBE | QTextureCubeMap |
iimage2DArray | GL_INT_IMAGE_2D_ARRAY | QTexture2DArray |
uimage2D | GL_UNSIGNED_INT_IMAGE_2D | QTexture2D |
uimage3D | GL_UNSIGNED_INT_IMAGE_3D | QTexture3D |
uimageCube | GL_UNSIGNED_INT_IMAGE_CUBE | QTextureCubeMap |
uimage2DArray | GL_UNSIGNED_INT_IMAGE_2D_ARRAY | QTexture2DArray |
OpenGL ES 3.2 supports all of the OpenGL ES 3.1 image types as well as the following:
GLSL Type | OpenGL Type Enum | Texture Type |
---|---|---|
imageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
imageCubeArray | GL_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
iimageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
iimageCubeArray | GL_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
uimageBuffer | GL_UNSIGNED_INT_IMAGE_BUFFER | QTextureBuffer |
uimageCubeArray | GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
Expected use would look like:
Qt3DRender::QTexture2D *tex2D = new Qt3DRender::QTexture2D(); ... Qt3DRender::QMaterial *material = new Qt3DRender::QMaterial(); ... Qt3DRender::QParameter *imageParameter = new Qt3DRender::QParameter(); Qt3DRender::QShaderImage *shaderImage = new Qt3DRender::QShaderImage();shaderImage->setTexture(tex2D);
imageParameter->setName("imageUniformName"); imageParameter->setValue(QVariant::fromValue(shaderImage));
material->addParameter(imageParamenter);
Methods
impl QShaderImage
[src]
pub fn slot_set_texture(&self) -> Receiver<(*mut QAbstractTexture,)>
[src]
Returns a built-in Qt slot Qt3DRender::QShaderImage::setTexture
that can be passed to qt_core::Signal::connect
.
This item is available if cpp_lib_version="5.14.0"
.
pub fn slot_set_layered(&self) -> Receiver<(bool,)>
[src]
*
Returns a built-in Qt slot Qt3DRender::QShaderImage::setLayered
that can be passed to qt_core::Signal::connect
.
*
If set to true, if the referenced texture is a one-dimensional array, two-dimensional array, three-dimensional, cube map, cube map array, or two-dimensional multisample array texture, the entire level will be bound for all layers. If set to false, only the single layer specified by the layer property will be bound.
Access functions:
bool | layered() const |
void | setLayered(bool layered) |
Notifier signal:
void | layeredChanged(bool layered) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn slot_set_mip_level(&self) -> Receiver<(c_int,)>
[src]
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Returns a built-in Qt slot Qt3DRender::QShaderImage::setMipLevel
that can be passed to qt_core::Signal::connect
.
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Access functions:
int | mipLevel() const |
void | setMipLevel(int mipLevel) |
Notifier signal:
void | mipLevelChanged(int mipLevel) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn slot_set_layer(&self) -> Receiver<(c_int,)>
[src]
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Returns a built-in Qt slot Qt3DRender::QShaderImage::setLayer
that can be passed to qt_core::Signal::connect
.
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Note: When the referenced texture is of type cube map or cube map array and ĺayered is set to false, the face and layer are retrieved in the following manner:
cubeMapLayer = layer / 6 cubeMapFace = layer - (cubeMapLayer * 6)
Access functions:
int | layer() const |
void | setLayer(int layer) |
Notifier signal:
void | layerChanged(int layer) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn slot_set_access(&self) -> Receiver<(Access,)>
[src]
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Returns a built-in Qt slot Qt3DRender::QShaderImage::setAccess
that can be passed to qt_core::Signal::connect
.
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Access functions:
Qt3DRender::QShaderImage::Access | access() const |
void | setAccess(Qt3DRender::QShaderImage::Access access) |
Notifier signal:
void | accessChanged(Qt3DRender::QShaderImage::Access access) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn slot_set_format(&self) -> Receiver<(ImageFormat,)>
[src]
Specifies the image format, which is essentially important when storing values in the Image from a shader.
Returns a built-in Qt slot Qt3DRender::QShaderImage::setFormat
that can be passed to qt_core::Signal::connect
.
Specifies the image format, which is essentially important when storing values in the Image from a shader.
The format doesn't have to be the same as the referenced texture's format. It however has to be compatible (matching in size but not necessarily by class type). For instance a texture of format R32F (size 32bits, class 1x32) could be used with an image of format RGBA8I (size 32bits, class 4x8). Table 8.27 of the OpenGL specifications shows the size and class for all supported Image formats.
By default Qt3D will try to set the image format to match that of the referenced texture.
Access functions:
Qt3DRender::QShaderImage::ImageFormat | format() const |
void | setFormat(Qt3DRender::QShaderImage::ImageFormat format) |
Notifier signal:
void | formatChanged(Qt3DRender::QShaderImage::ImageFormat format) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn texture_changed(&self) -> Signal<(*mut QAbstractTexture,)>
[src]
Returns a built-in Qt signal Qt3DRender::QShaderImage::textureChanged
that can be passed to qt_core::Signal::connect
.
This item is available if cpp_lib_version="5.14.0"
.
pub fn layered_changed(&self) -> Signal<(bool,)>
[src]
*
Returns a built-in Qt signal Qt3DRender::QShaderImage::layeredChanged
that can be passed to qt_core::Signal::connect
.
*
If set to true, if the referenced texture is a one-dimensional array, two-dimensional array, three-dimensional, cube map, cube map array, or two-dimensional multisample array texture, the entire level will be bound for all layers. If set to false, only the single layer specified by the layer property will be bound.
Access functions:
bool | layered() const |
void | setLayered(bool layered) |
Notifier signal:
void | layeredChanged(bool layered) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn mip_level_changed(&self) -> Signal<(c_int,)>
[src]
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Returns a built-in Qt signal Qt3DRender::QShaderImage::mipLevelChanged
that can be passed to qt_core::Signal::connect
.
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Access functions:
int | mipLevel() const |
void | setMipLevel(int mipLevel) |
Notifier signal:
void | mipLevelChanged(int mipLevel) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn layer_changed(&self) -> Signal<(c_int,)>
[src]
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Returns a built-in Qt signal Qt3DRender::QShaderImage::layerChanged
that can be passed to qt_core::Signal::connect
.
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Note: When the referenced texture is of type cube map or cube map array and ĺayered is set to false, the face and layer are retrieved in the following manner:
cubeMapLayer = layer / 6 cubeMapFace = layer - (cubeMapLayer * 6)
Access functions:
int | layer() const |
void | setLayer(int layer) |
Notifier signal:
void | layerChanged(int layer) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn access_changed(&self) -> Signal<(Access,)>
[src]
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Returns a built-in Qt signal Qt3DRender::QShaderImage::accessChanged
that can be passed to qt_core::Signal::connect
.
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Access functions:
Qt3DRender::QShaderImage::Access | access() const |
void | setAccess(Qt3DRender::QShaderImage::Access access) |
Notifier signal:
void | accessChanged(Qt3DRender::QShaderImage::Access access) |
This item is available if cpp_lib_version="5.14.0"
.
pub fn format_changed(&self) -> Signal<(ImageFormat,)>
[src]
Specifies the image format, which is essentially important when storing values in the Image from a shader.
Returns a built-in Qt signal Qt3DRender::QShaderImage::formatChanged
that can be passed to qt_core::Signal::connect
.
Specifies the image format, which is essentially important when storing values in the Image from a shader.
The format doesn't have to be the same as the referenced texture's format. It however has to be compatible (matching in size but not necessarily by class type). For instance a texture of format R32F (size 32bits, class 1x32) could be used with an image of format RGBA8I (size 32bits, class 4x8). Table 8.27 of the OpenGL specifications shows the size and class for all supported Image formats.
By default Qt3D will try to set the image format to match that of the referenced texture.
Access functions:
Qt3DRender::QShaderImage::ImageFormat | format() const |
void | setFormat(Qt3DRender::QShaderImage::ImageFormat format) |
Notifier signal:
void | formatChanged(Qt3DRender::QShaderImage::ImageFormat format) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn access(&self) -> Access
[src]
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Calls C++ function: Qt3DRender::QShaderImage::Access Qt3DRender::QShaderImage::access() const
.
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Access functions:
Qt3DRender::QShaderImage::Access | access() const |
void | setAccess(Qt3DRender::QShaderImage::Access access) |
Notifier signal:
void | accessChanged(Qt3DRender::QShaderImage::Access access) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn format(&self) -> ImageFormat
[src]
Specifies the image format, which is essentially important when storing values in the Image from a shader.
Calls C++ function: Qt3DRender::QShaderImage::ImageFormat Qt3DRender::QShaderImage::format() const
.
Specifies the image format, which is essentially important when storing values in the Image from a shader.
The format doesn't have to be the same as the referenced texture's format. It however has to be compatible (matching in size but not necessarily by class type). For instance a texture of format R32F (size 32bits, class 1x32) could be used with an image of format RGBA8I (size 32bits, class 4x8). Table 8.27 of the OpenGL specifications shows the size and class for all supported Image formats.
By default Qt3D will try to set the image format to match that of the referenced texture.
Access functions:
Qt3DRender::QShaderImage::ImageFormat | format() const |
void | setFormat(Qt3DRender::QShaderImage::ImageFormat format) |
Notifier signal:
void | formatChanged(Qt3DRender::QShaderImage::ImageFormat format) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn layer(&self) -> c_int
[src]
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Calls C++ function: int Qt3DRender::QShaderImage::layer() const
.
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Note: When the referenced texture is of type cube map or cube map array and ĺayered is set to false, the face and layer are retrieved in the following manner:
cubeMapLayer = layer / 6 cubeMapFace = layer - (cubeMapLayer * 6)
Access functions:
int | layer() const |
void | setLayer(int layer) |
Notifier signal:
void | layerChanged(int layer) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn layered(&self) -> bool
[src]
*
Calls C++ function: bool Qt3DRender::QShaderImage::layered() const
.
*
If set to true, if the referenced texture is a one-dimensional array, two-dimensional array, three-dimensional, cube map, cube map array, or two-dimensional multisample array texture, the entire level will be bound for all layers. If set to false, only the single layer specified by the layer property will be bound.
Access functions:
bool | layered() const |
void | setLayered(bool layered) |
Notifier signal:
void | layeredChanged(bool layered) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* Qt3DRender::QShaderImage::metaObject() const
.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn mip_level(&self) -> c_int
[src]
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Calls C++ function: int Qt3DRender::QShaderImage::mipLevel() const
.
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Access functions:
int | mipLevel() const |
void | setMipLevel(int mipLevel) |
Notifier signal:
void | mipLevelChanged(int mipLevel) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn new_1a(parent: impl CastInto<MutPtr<QNode>>) -> QBox<QShaderImage>
[src]
Calls C++ function: [constructor] void Qt3DRender::QShaderImage::QShaderImage(Qt3DCore::QNode* parent = …)
.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn new_0a() -> QBox<QShaderImage>
[src]
To make the content of textures available for read and write operations in a shader, they need to exposed as QShaderImage. Textures can be composed of several mip levels, layers and faces. Additionally declaring a QShaderImage allows specifying which level, layer or face of the texture content we want to access.
Calls C++ function: [constructor] void Qt3DRender::QShaderImage::QShaderImage()
.
To make the content of textures available for read and write operations in a shader, they need to exposed as QShaderImage. Textures can be composed of several mip levels, layers and faces. Additionally declaring a QShaderImage allows specifying which level, layer or face of the texture content we want to access.
QShaderImage has to be assigned as a QParameter's value and reference a valid Qt3DRender::QAbstractTexture to work properly.
If the referenced texture is a one-dimensional array, two-dimensional array, three-dimensional, cube map, cube map array, or two-dimensional multisample array texture, it is possible to bind either the entire texture level or a single layer or face of the texture level. This can be controlled with the layered property.
Support for QShaderImage is only supported with OpenGL 4 and partially with OpenGL ES 3.1 and 3.2.
OpenGL 4 supports the following image types:
GLSL Type | OpenGL Type Enum | Texture Type |
---|---|---|
image1D | GL_IMAGE_1D | QTexture1D |
image2D | GL_IMAGE_2D | QTexture2D |
image3D | GL_IMAGE_3D | QTexture3D |
image2DRect | GL_IMAGE_2D_RECT | QTextureRectangle |
imageCube | GL_IMAGE_CUBE | QTextureCubeMap |
imageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
image1DArray | GL_IMAGE_1D_ARRAY | QTexture1DArray |
image2DArray | GL_IMAGE_2D_ARRAY | QTexture2DArray |
imageCubeArray | GL_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
image2DMS | GL_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
image2DMSArray | GL_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
iimage1D | GL_INT_IMAGE_1D | QTexture1D |
iimage2D | GL_INT_IMAGE_2D | QTexture2D |
iimage3D | GL_INT_IMAGE_3D | QTexture3D |
iimage2DRect | GL_INT_IMAGE_2D_RECT | QTextureRectangle |
iimageCube | GL_INT_IMAGE_CUBE | QTextureCubeMap |
iimageBuffer | GL_INT_IMAGE_BUFFER | QTextureBuffer |
iimage1DArray | GL_INT_IMAGE_1D_ARRAY | QTexture1DArray |
iimage2DArray | GL_INT_IMAGE_2D_ARRAY | QTexture2DArray |
iimageCubeArray | GL_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
iimage2DMS | GL_INT_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
iimage2DMSArray | GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
uimage1D | GL_UNSIGNED_INT_IMAGE_1D | QTexture1D |
uimage2D | GL_UNSIGNED_INT_IMAGE_2D | QTexture2D |
uimage3D | GL_UNSIGNED_INT_IMAGE_3D | QTexture3D |
uimage2DRect | GL_UNSIGNED_INT_IMAGE_2D_RECT | QTextureRectangle |
uimageCube | GL_UNSIGNED_INT_IMAGE_CUBE | QTextureCubeMap |
uimageBuffer | GL_UNSIGNED_INT_IMAGE_BUFFER | QTextureBuffer |
uimage1DArray | GL_UNSIGNED_INT_IMAGE_1D_ARRAY | QTexture1DArray |
uimage2DArray | GL_UNSIGNED_INT_IMAGE_2D_ARRAY | QTexture2DArray |
uimageCubeArray | GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
uimage2DMS | GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE | QTexture2DMultisample |
uimage2DMSArray | GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY | QTexture2DMultisampleArray |
OpenGL ES 3.1 supports the following image types:
GLSL Type | OpenGL Type Enum | Texture Type |
---|---|---|
image2D | GL_IMAGE_2D | QTexture2D |
image3D | GL_IMAGE_3D | QTexture3D |
imageCube | GL_IMAGE_CUBE | QTextureCubeMap |
image2DArray | GL_IMAGE_2D_ARRAY | QTexture2DArray |
iimage2D | GL_INT_IMAGE_2D | QTexture2D |
iimage3D | GL_INT_IMAGE_3D | QTexture3D |
iimageCube | GL_INT_IMAGE_CUBE | QTextureCubeMap |
iimage2DArray | GL_INT_IMAGE_2D_ARRAY | QTexture2DArray |
uimage2D | GL_UNSIGNED_INT_IMAGE_2D | QTexture2D |
uimage3D | GL_UNSIGNED_INT_IMAGE_3D | QTexture3D |
uimageCube | GL_UNSIGNED_INT_IMAGE_CUBE | QTextureCubeMap |
uimage2DArray | GL_UNSIGNED_INT_IMAGE_2D_ARRAY | QTexture2DArray |
OpenGL ES 3.2 supports all of the OpenGL ES 3.1 image types as well as the following:
GLSL Type | OpenGL Type Enum | Texture Type |
---|---|---|
imageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
imageCubeArray | GL_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
iimageBuffer | GL_IMAGE_BUFFER | QTextureBuffer |
iimageCubeArray | GL_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
uimageBuffer | GL_UNSIGNED_INT_IMAGE_BUFFER | QTextureBuffer |
uimageCubeArray | GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY | QTextureCubeMapArray |
Expected use would look like:
Qt3DRender::QTexture2D *tex2D = new Qt3DRender::QTexture2D(); ... Qt3DRender::QMaterial *material = new Qt3DRender::QMaterial(); ... Qt3DRender::QParameter *imageParameter = new Qt3DRender::QParameter(); Qt3DRender::QShaderImage *shaderImage = new Qt3DRender::QShaderImage();shaderImage->setTexture(tex2D);
imageParameter->setName("imageUniformName"); imageParameter->setValue(QVariant::fromValue(shaderImage));
material->addParameter(imageParamenter);
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int Qt3DRender::QShaderImage::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* Qt3DRender::QShaderImage::qt_metacast(const char* arg1)
.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn set_access(&mut self, access: Access)
[src]
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Calls C++ function: [slot] void Qt3DRender::QShaderImage::setAccess(Qt3DRender::QShaderImage::Access access)
.
Specifies the type of access we want to allow from our shader instances to the image. If a shader tries to write or read from an image that has incompatible access, the behavior is undefined.
Access functions:
Qt3DRender::QShaderImage::Access | access() const |
void | setAccess(Qt3DRender::QShaderImage::Access access) |
Notifier signal:
void | accessChanged(Qt3DRender::QShaderImage::Access access) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn set_format(&mut self, format: ImageFormat)
[src]
Specifies the image format, which is essentially important when storing values in the Image from a shader.
Calls C++ function: [slot] void Qt3DRender::QShaderImage::setFormat(Qt3DRender::QShaderImage::ImageFormat format)
.
Specifies the image format, which is essentially important when storing values in the Image from a shader.
The format doesn't have to be the same as the referenced texture's format. It however has to be compatible (matching in size but not necessarily by class type). For instance a texture of format R32F (size 32bits, class 1x32) could be used with an image of format RGBA8I (size 32bits, class 4x8). Table 8.27 of the OpenGL specifications shows the size and class for all supported Image formats.
By default Qt3D will try to set the image format to match that of the referenced texture.
Access functions:
Qt3DRender::QShaderImage::ImageFormat | format() const |
void | setFormat(Qt3DRender::QShaderImage::ImageFormat format) |
Notifier signal:
void | formatChanged(Qt3DRender::QShaderImage::ImageFormat format) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn set_layer(&mut self, layer: c_int)
[src]
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Calls C++ function: [slot] void Qt3DRender::QShaderImage::setLayer(int layer)
.
Holds which layer out of the referenced texture should be used for the QShaderImage. This property does nothing if layered is set to true or if the reference texture's type isn't compatible with layers.
Note: When the referenced texture is of type cube map or cube map array and ĺayered is set to false, the face and layer are retrieved in the following manner:
cubeMapLayer = layer / 6 cubeMapFace = layer - (cubeMapLayer * 6)
Access functions:
int | layer() const |
void | setLayer(int layer) |
Notifier signal:
void | layerChanged(int layer) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn set_layered(&mut self, layered: bool)
[src]
*
Calls C++ function: [slot] void Qt3DRender::QShaderImage::setLayered(bool layered)
.
*
If set to true, if the referenced texture is a one-dimensional array, two-dimensional array, three-dimensional, cube map, cube map array, or two-dimensional multisample array texture, the entire level will be bound for all layers. If set to false, only the single layer specified by the layer property will be bound.
Access functions:
bool | layered() const |
void | setLayered(bool layered) |
Notifier signal:
void | layeredChanged(bool layered) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn set_mip_level(&mut self, mip_level: c_int)
[src]
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Calls C++ function: [slot] void Qt3DRender::QShaderImage::setMipLevel(int mipLevel)
.
Holds which mipLevel out of the referenced texture should be used for the QShaderImage.
Access functions:
int | mipLevel() const |
void | setMipLevel(int mipLevel) |
Notifier signal:
void | mipLevelChanged(int mipLevel) |
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn set_texture(
&mut self,
texture: impl CastInto<MutPtr<QAbstractTexture>>
)
[src]
&mut self,
texture: impl CastInto<MutPtr<QAbstractTexture>>
)
Calls C++ function: [slot] void Qt3DRender::QShaderImage::setTexture(Qt3DRender::QAbstractTexture* texture)
.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn texture(&self) -> QMutPtr<QAbstractTexture>
[src]
Calls C++ function: Qt3DRender::QAbstractTexture* Qt3DRender::QShaderImage::texture() const
.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn tr(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString Qt3DRender::QShaderImage::tr(const char* s, const char* c, int n)
.
This item is available if cpp_lib_version="5.14.0"
.
pub unsafe fn tr_utf8(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString Qt3DRender::QShaderImage::trUtf8(const char* s, const char* c, int n)
.
This item is available if cpp_lib_version="5.14.0"
.
Trait Implementations
impl CppDeletable for QShaderImage
[src]
unsafe fn delete(&mut self)
[src]
Calls C++ function: virtual [destructor] void Qt3DRender::QShaderImage::~QShaderImage()
.
impl Deref for QShaderImage
[src]
type Target = QNode
The resulting type after dereferencing.
fn deref(&self) -> &QNode
[src]
Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QShaderImage* ptr)
.
impl DerefMut for QShaderImage
[src]
fn deref_mut(&mut self) -> &mut QNode
[src]
Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QShaderImage* ptr)
.
impl DynamicCast<QShaderImage> for QNode
[src]
unsafe fn dynamic_cast(ptr: Ptr<QNode>) -> Ptr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* dynamic_cast<Qt3DRender::QShaderImage*>(Qt3DCore::QNode* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QNode>) -> MutPtr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* dynamic_cast<Qt3DRender::QShaderImage*>(Qt3DCore::QNode* ptr)
.
impl DynamicCast<QShaderImage> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* dynamic_cast<Qt3DRender::QShaderImage*>(QObject* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* dynamic_cast<Qt3DRender::QShaderImage*>(QObject* ptr)
.
impl StaticDowncast<QShaderImage> for QNode
[src]
unsafe fn static_downcast(ptr: Ptr<QNode>) -> Ptr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* static_cast<Qt3DRender::QShaderImage*>(Qt3DCore::QNode* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QNode>) -> MutPtr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* static_cast<Qt3DRender::QShaderImage*>(Qt3DCore::QNode* ptr)
.
impl StaticDowncast<QShaderImage> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* static_cast<Qt3DRender::QShaderImage*>(QObject* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QShaderImage>
[src]
Calls C++ function: Qt3DRender::QShaderImage* static_cast<Qt3DRender::QShaderImage*>(QObject* ptr)
.
impl StaticUpcast<QNode> for QShaderImage
[src]
unsafe fn static_upcast(ptr: Ptr<QShaderImage>) -> Ptr<QNode>
[src]
Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QShaderImage* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QShaderImage>) -> MutPtr<QNode>
[src]
Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QShaderImage* ptr)
.
impl StaticUpcast<QObject> for QShaderImage
[src]
unsafe fn static_upcast(ptr: Ptr<QShaderImage>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QShaderImage* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QShaderImage>) -> MutPtr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QShaderImage* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QShaderImage
impl Send for QShaderImage
impl Sync for QShaderImage
impl Unpin for QShaderImage
impl UnwindSafe for QShaderImage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,