#include <samplerinstance.h>
Public Member Functions | |
| 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 |
Protected Member Functions | |
| void | raiseChanged (int index=0) |
Protected Attributes | |
| RenderService * | mRenderService = nullptr |
| VkSampler | mVulkanSampler = VK_NULL_HANDLE |
| const Sampler * | mSampler = nullptr |
| const SamplerDeclaration * | mDeclaration = nullptr |
| SamplerChangedCallback | mSamplerChangedCallback |
Sampler instance base class. Allows for interfacing with samplers at run-time.
| SamplerInstance | ( | RenderService & | renderService, |
| const SamplerDeclaration & | declaration, | ||
| const Sampler * | sampler, | ||
| const SamplerChangedCallback & | samplerChangedCallback | ||
| ) |
Constructs the instance based on the shader declaration and resource.
| renderService | render engine |
| declaration | sampler shader declaration |
| sampler | the sampler resource used to create this instance. |
| samplerChangedCallback | called when the 'texture' changes. |
|
virtual |
| const SamplerDeclaration& getDeclaration | ( | ) | const |
| VkSampler getVulkanSampler | ( | ) | const |
| bool init | ( | utility::ErrorState & | errorState | ) |
Initializes the sampler.
| errorState | contains the error if initialization fails |
|
protected |
Called when the texture changes.
| index | texture index, zero unless the non-initial texture in a sampler array is changed. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |