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