#include <kanzi/core.ui/graphics3d/bindless_texture_registry.hpp>
- Since
- Kanzi 4.1.0
- Attention
- This feature is experimental and is likely to change in future releases.
◆ registerTexture()
Registers a texture in the bindless array.
Creates the image view and sampler if not yet present. Reference-counted: multiple registrations of the same texture are safe.
- Parameters
-
| domain | Domain used to create GPU resources. |
| texture | Texture to register. |
- Returns
- Index into the bindless array for the texture type, or
invalidIndex if texture is null.
◆ unregisterTexture()
Decrements the reference count for a texture and removes it from the bindless array when the count reaches zero.
No-op if the texture was never registered.
- Parameters
-
◆ getTextureIndex()
Returns the current index of a registered texture in the bindless array.
- Parameters
-
- Returns
- Index into the bindless array for the texture type, or
invalidIndex if not registered or null.
◆ getImageViews2D()
Returns the image views for all registered 2D textures, keyed by texture name.
◆ getSamplers2D()
Returns the samplers for all registered 2D textures, keyed by texture name.
◆ createTextureView()
Creates image and sampler view.
- Parameters
-
| domain | The domain, used to access the renderer sampler cache and default textures. |
| texturePtr | Weak pointer to the texture to resolve. |
| textureType | Texture type used to select the appropriate default texture on fallback. |
| outImageView | Output image view populated with the resolved image handle and mip level range. |
| outSampler | Output sampler populated with the resolved sampler handle. |
- Returns
- True if the texture was resolved successfully, false if the default texture fallback was used.
◆ invalidIndex
Sentinel value returned when a resource index is not valid.
The documentation for this class was generated from the following file: