#include <samplerinstance.h>
Public Member Functions | |
SamplerCubeArrayInstance (RenderService &renderService, const SamplerDeclaration &declaration, const SamplerCubeArray *samplerCubeArray, const SamplerChangedCallback &samplerChangedCallback) | |
bool | hasTexture (int index) const |
const TextureCube & | getTexture (int index) const |
void | setTexture (int index, TextureCube &textureCube) |
rtti::ObjectPtr< TextureCube > & | operator[] (size_t index) |
![]() | |
SamplerArrayInstance (RenderService &renderService, const SamplerDeclaration &declaration, const Sampler *sampler, const SamplerChangedCallback &samplerChangedCallback) | |
virtual | ~SamplerArrayInstance () |
virtual int | getNumElements () const |
![]() | |
SamplerInstance (RenderService &renderService, const SamplerDeclaration &declaration, const Sampler *sampler, const SamplerChangedCallback &samplerChangedCallback) | |
virtual | ~SamplerInstance () |
bool | init (utility::ErrorState &errorState) |
const SamplerDeclaration & | getDeclaration () const |
VkSampler | getVulkanSampler () const |
Additional Inherited Members | |
![]() | |
void | raiseChanged (int index=0) |
![]() | |
RenderService * | mRenderService = nullptr |
VkSampler | mVulkanSampler = VK_NULL_HANDLE |
const Sampler * | mSampler = nullptr |
const SamplerDeclaration * | mDeclaration = nullptr |
SamplerChangedCallback | mSamplerChangedCallback |
Cube sampler array instance. Binds multiple cube textures to a shader. The array can be changed at runtime.
SamplerCubeArrayInstance | ( | RenderService & | renderService, |
const SamplerDeclaration & | declaration, | ||
const SamplerCubeArray * | samplerCubeArray, | ||
const SamplerChangedCallback & | samplerChangedCallback | ||
) |
Constructs the instance based on the shader declaration and resource.
renderService | render engine |
declaration | sampler shader declaration |
samplerCubeArray | the sampler resource used to create this instance. |
samplerChangedCallback | called when the 'texture' changes. |
const TextureCube& getTexture | ( | int | index | ) | const |
index | the index to get the texture for. |
bool hasTexture | ( | int | index | ) | const |
rtti::ObjectPtr<TextureCube>& operator[] | ( | size_t | index | ) |
Array subscript operator, returns a specific texture in the array as a reference, making the following possible: mTextures[0] = myTexture
;
void setTexture | ( | int | index, |
TextureCube & | textureCube | ||
) |
Binds a texture at the given index
index | the index to bind the texture to |
textureCube | the texture to bind. |