[][src]Struct qt_3d_render::QShaderImage

#[repr(C)]pub struct QShaderImage { /* fields omitted */ }

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.

C++ documentation:

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 TypeOpenGL Type EnumTexture Type
image1DGL_IMAGE_1DQTexture1D
image2DGL_IMAGE_2DQTexture2D
image3DGL_IMAGE_3DQTexture3D
image2DRectGL_IMAGE_2D_RECTQTextureRectangle
imageCubeGL_IMAGE_CUBEQTextureCubeMap
imageBufferGL_IMAGE_BUFFERQTextureBuffer
image1DArrayGL_IMAGE_1D_ARRAYQTexture1DArray
image2DArrayGL_IMAGE_2D_ARRAYQTexture2DArray
imageCubeArrayGL_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
image2DMSGL_IMAGE_2D_MULTISAMPLEQTexture2DMultisample
image2DMSArrayGL_IMAGE_2D_MULTISAMPLE_ARRAYQTexture2DMultisampleArray
iimage1DGL_INT_IMAGE_1DQTexture1D
iimage2DGL_INT_IMAGE_2DQTexture2D
iimage3DGL_INT_IMAGE_3DQTexture3D
iimage2DRectGL_INT_IMAGE_2D_RECTQTextureRectangle
iimageCubeGL_INT_IMAGE_CUBEQTextureCubeMap
iimageBufferGL_INT_IMAGE_BUFFERQTextureBuffer
iimage1DArrayGL_INT_IMAGE_1D_ARRAYQTexture1DArray
iimage2DArrayGL_INT_IMAGE_2D_ARRAYQTexture2DArray
iimageCubeArrayGL_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
iimage2DMSGL_INT_IMAGE_2D_MULTISAMPLEQTexture2DMultisample
iimage2DMSArrayGL_INT_IMAGE_2D_MULTISAMPLE_ARRAYQTexture2DMultisampleArray
uimage1DGL_UNSIGNED_INT_IMAGE_1DQTexture1D
uimage2DGL_UNSIGNED_INT_IMAGE_2DQTexture2D
uimage3DGL_UNSIGNED_INT_IMAGE_3DQTexture3D
uimage2DRectGL_UNSIGNED_INT_IMAGE_2D_RECTQTextureRectangle
uimageCubeGL_UNSIGNED_INT_IMAGE_CUBEQTextureCubeMap
uimageBufferGL_UNSIGNED_INT_IMAGE_BUFFERQTextureBuffer
uimage1DArrayGL_UNSIGNED_INT_IMAGE_1D_ARRAYQTexture1DArray
uimage2DArrayGL_UNSIGNED_INT_IMAGE_2D_ARRAYQTexture2DArray
uimageCubeArrayGL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
uimage2DMSGL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLEQTexture2DMultisample
uimage2DMSArrayGL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAYQTexture2DMultisampleArray

OpenGL ES 3.1 supports the following image types:

GLSL TypeOpenGL Type EnumTexture Type
image2DGL_IMAGE_2DQTexture2D
image3DGL_IMAGE_3DQTexture3D
imageCubeGL_IMAGE_CUBEQTextureCubeMap
image2DArrayGL_IMAGE_2D_ARRAYQTexture2DArray
iimage2DGL_INT_IMAGE_2DQTexture2D
iimage3DGL_INT_IMAGE_3DQTexture3D
iimageCubeGL_INT_IMAGE_CUBEQTextureCubeMap
iimage2DArrayGL_INT_IMAGE_2D_ARRAYQTexture2DArray
uimage2DGL_UNSIGNED_INT_IMAGE_2DQTexture2D
uimage3DGL_UNSIGNED_INT_IMAGE_3DQTexture3D
uimageCubeGL_UNSIGNED_INT_IMAGE_CUBEQTextureCubeMap
uimage2DArrayGL_UNSIGNED_INT_IMAGE_2D_ARRAYQTexture2DArray

OpenGL ES 3.2 supports all of the OpenGL ES 3.1 image types as well as the following:

GLSL TypeOpenGL Type EnumTexture Type
imageBufferGL_IMAGE_BUFFERQTextureBuffer
imageCubeArrayGL_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
iimageBufferGL_IMAGE_BUFFERQTextureBuffer
iimageCubeArrayGL_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
uimageBufferGL_UNSIGNED_INT_IMAGE_BUFFERQTextureBuffer
uimageCubeArrayGL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray

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]

This is supported on cpp_lib_version="5.14.0" only.

Returns a built-in Qt slot Qt3DRender::QShaderImage::setTexture that can be passed to qt_core::Signal::connect.

pub fn slot_set_layered(&self) -> Receiver<(bool,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

*

Returns a built-in Qt slot Qt3DRender::QShaderImage::setLayered that can be passed to qt_core::Signal::connect.

C++ documentation:

*

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)

pub fn slot_set_mip_level(&self) -> Receiver<(c_int,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub fn slot_set_layer(&self) -> Receiver<(c_int,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub fn slot_set_access(&self) -> Receiver<(Access,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub fn slot_set_format(&self) -> Receiver<(ImageFormat,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub fn texture_changed(&self) -> Signal<(*mut QAbstractTexture,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

Returns a built-in Qt signal Qt3DRender::QShaderImage::textureChanged that can be passed to qt_core::Signal::connect.

pub fn layered_changed(&self) -> Signal<(bool,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

*

Returns a built-in Qt signal Qt3DRender::QShaderImage::layeredChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

*

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)

pub fn mip_level_changed(&self) -> Signal<(c_int,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub fn layer_changed(&self) -> Signal<(c_int,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub fn access_changed(&self) -> Signal<(Access,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub fn format_changed(&self) -> Signal<(ImageFormat,)>[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub unsafe fn access(&self) -> Access[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub unsafe fn format(&self) -> ImageFormat[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub unsafe fn layer(&self) -> c_int[src]

This is supported on cpp_lib_version="5.14.0" only.

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.

C++ documentation:

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)

pub unsafe fn layered(&self) -> bool[src]

This is supported on cpp_lib_version="5.14.0" only.

*

Calls C++ function: bool Qt3DRender::QShaderImage::layered() const.

C++ documentation:

*

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)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: virtual const QMetaObject* Qt3DRender::QShaderImage::metaObject() const.

pub unsafe fn mip_level(&self) -> c_int[src]

This is supported on cpp_lib_version="5.14.0" only.

Holds which mipLevel out of the referenced texture should be used for the QShaderImage.

Calls C++ function: int Qt3DRender::QShaderImage::mipLevel() const.

C++ documentation:

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)

pub unsafe fn new_1a(parent: impl CastInto<Ptr<QNode>>) -> QBox<QShaderImage>[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: [constructor] void Qt3DRender::QShaderImage::QShaderImage(Qt3DCore::QNode* parent = …).

pub unsafe fn new_0a() -> QBox<QShaderImage>[src]

This is supported on cpp_lib_version="5.14.0" only.

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

C++ documentation:

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 TypeOpenGL Type EnumTexture Type
image1DGL_IMAGE_1DQTexture1D
image2DGL_IMAGE_2DQTexture2D
image3DGL_IMAGE_3DQTexture3D
image2DRectGL_IMAGE_2D_RECTQTextureRectangle
imageCubeGL_IMAGE_CUBEQTextureCubeMap
imageBufferGL_IMAGE_BUFFERQTextureBuffer
image1DArrayGL_IMAGE_1D_ARRAYQTexture1DArray
image2DArrayGL_IMAGE_2D_ARRAYQTexture2DArray
imageCubeArrayGL_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
image2DMSGL_IMAGE_2D_MULTISAMPLEQTexture2DMultisample
image2DMSArrayGL_IMAGE_2D_MULTISAMPLE_ARRAYQTexture2DMultisampleArray
iimage1DGL_INT_IMAGE_1DQTexture1D
iimage2DGL_INT_IMAGE_2DQTexture2D
iimage3DGL_INT_IMAGE_3DQTexture3D
iimage2DRectGL_INT_IMAGE_2D_RECTQTextureRectangle
iimageCubeGL_INT_IMAGE_CUBEQTextureCubeMap
iimageBufferGL_INT_IMAGE_BUFFERQTextureBuffer
iimage1DArrayGL_INT_IMAGE_1D_ARRAYQTexture1DArray
iimage2DArrayGL_INT_IMAGE_2D_ARRAYQTexture2DArray
iimageCubeArrayGL_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
iimage2DMSGL_INT_IMAGE_2D_MULTISAMPLEQTexture2DMultisample
iimage2DMSArrayGL_INT_IMAGE_2D_MULTISAMPLE_ARRAYQTexture2DMultisampleArray
uimage1DGL_UNSIGNED_INT_IMAGE_1DQTexture1D
uimage2DGL_UNSIGNED_INT_IMAGE_2DQTexture2D
uimage3DGL_UNSIGNED_INT_IMAGE_3DQTexture3D
uimage2DRectGL_UNSIGNED_INT_IMAGE_2D_RECTQTextureRectangle
uimageCubeGL_UNSIGNED_INT_IMAGE_CUBEQTextureCubeMap
uimageBufferGL_UNSIGNED_INT_IMAGE_BUFFERQTextureBuffer
uimage1DArrayGL_UNSIGNED_INT_IMAGE_1D_ARRAYQTexture1DArray
uimage2DArrayGL_UNSIGNED_INT_IMAGE_2D_ARRAYQTexture2DArray
uimageCubeArrayGL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
uimage2DMSGL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLEQTexture2DMultisample
uimage2DMSArrayGL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAYQTexture2DMultisampleArray

OpenGL ES 3.1 supports the following image types:

GLSL TypeOpenGL Type EnumTexture Type
image2DGL_IMAGE_2DQTexture2D
image3DGL_IMAGE_3DQTexture3D
imageCubeGL_IMAGE_CUBEQTextureCubeMap
image2DArrayGL_IMAGE_2D_ARRAYQTexture2DArray
iimage2DGL_INT_IMAGE_2DQTexture2D
iimage3DGL_INT_IMAGE_3DQTexture3D
iimageCubeGL_INT_IMAGE_CUBEQTextureCubeMap
iimage2DArrayGL_INT_IMAGE_2D_ARRAYQTexture2DArray
uimage2DGL_UNSIGNED_INT_IMAGE_2DQTexture2D
uimage3DGL_UNSIGNED_INT_IMAGE_3DQTexture3D
uimageCubeGL_UNSIGNED_INT_IMAGE_CUBEQTextureCubeMap
uimage2DArrayGL_UNSIGNED_INT_IMAGE_2D_ARRAYQTexture2DArray

OpenGL ES 3.2 supports all of the OpenGL ES 3.1 image types as well as the following:

GLSL TypeOpenGL Type EnumTexture Type
imageBufferGL_IMAGE_BUFFERQTextureBuffer
imageCubeArrayGL_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
iimageBufferGL_IMAGE_BUFFERQTextureBuffer
iimageCubeArrayGL_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray
uimageBufferGL_UNSIGNED_INT_IMAGE_BUFFERQTextureBuffer
uimageCubeArrayGL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAYQTextureCubeMapArray

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);

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: virtual int Qt3DRender::QShaderImage::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: virtual void* Qt3DRender::QShaderImage::qt_metacast(const char* arg1).

pub unsafe fn set_access(&self, access: Access)[src]

This is supported on cpp_lib_version="5.14.0" only.

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

C++ documentation:

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)

pub unsafe fn set_format(&self, format: ImageFormat)[src]

This is supported on cpp_lib_version="5.14.0" only.

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

C++ documentation:

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)

pub unsafe fn set_layer(&self, layer: c_int)[src]

This is supported on cpp_lib_version="5.14.0" only.

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

C++ documentation:

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)

pub unsafe fn set_layered(&self, layered: bool)[src]

This is supported on cpp_lib_version="5.14.0" only.

*

Calls C++ function: [slot] void Qt3DRender::QShaderImage::setLayered(bool layered).

C++ documentation:

*

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)

pub unsafe fn set_mip_level(&self, mip_level: c_int)[src]

This is supported on cpp_lib_version="5.14.0" only.

Holds which mipLevel out of the referenced texture should be used for the QShaderImage.

Calls C++ function: [slot] void Qt3DRender::QShaderImage::setMipLevel(int mipLevel).

C++ documentation:

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)

pub unsafe fn set_texture(&self, texture: impl CastInto<Ptr<QAbstractTexture>>)[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: [slot] void Qt3DRender::QShaderImage::setTexture(Qt3DRender::QAbstractTexture* texture).

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

This is supported on cpp_lib_version="5.14.0" only.

Returns a reference to the staticMetaObject field.

pub unsafe fn texture(&self) -> QPtr<QAbstractTexture>[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: Qt3DRender::QAbstractTexture* Qt3DRender::QShaderImage::texture() const.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: static QString Qt3DRender::QShaderImage::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

This is supported on cpp_lib_version="5.14.0" only.

Calls C++ function: static QString Qt3DRender::QShaderImage::trUtf8(const char* s, const char* c, int n).

Trait Implementations

impl CppDeletable for QShaderImage[src]

unsafe fn delete(&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 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).

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

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

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

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

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.