NAP
Public Member Functions | List of all members
SamplerCubeInstance Class Reference

#include <samplerinstance.h>

Public Member Functions

 SamplerCubeInstance (RenderService &renderService, const SamplerDeclaration &declaration, const SamplerCube *samplerCube, const SamplerChangedCallback &samplerChangedCallback)
 
void setTexture (TextureCube &textureCube)
 
bool hasTexture () const
 
const TextureCubegetTexture () const
 
- Public Member Functions inherited from SamplerInstance
 SamplerInstance (RenderService &renderService, const SamplerDeclaration &declaration, const Sampler *sampler, const SamplerChangedCallback &samplerChangedCallback)
 
virtual ~SamplerInstance ()
 
bool init (utility::ErrorState &errorState)
 
const SamplerDeclarationgetDeclaration () const
 
VkSampler getVulkanSampler () const
 

Additional Inherited Members

- Protected Member Functions inherited from SamplerInstance
void raiseChanged (int index=0)
 
- Protected Attributes inherited from SamplerInstance
RenderServicemRenderService = nullptr
 
VkSampler mVulkanSampler = VK_NULL_HANDLE
 
const SamplermSampler = nullptr
 
const SamplerDeclarationmDeclaration = nullptr
 
SamplerChangedCallback mSamplerChangedCallback
 

Description

Cube sampler instance. Binds a single Cube texture to a shader. The texture can be changed at runtime.

Inheritance diagram for SamplerCubeInstance:
[legend]
Collaboration diagram for SamplerCubeInstance:
[legend]

Constructor & Destructor Documentation

◆ SamplerCubeInstance()

SamplerCubeInstance ( RenderService renderService,
const SamplerDeclaration declaration,
const SamplerCube samplerCube,
const SamplerChangedCallback samplerChangedCallback 
)

Constructs the instance based on the shader declaration and resource.

Parameters
renderServicerender engine
declarationsampler shader declaration
samplerCubethe sampler resource used to create this instance.
samplerChangedCallbackcalled when the 'texture' changes.

Member Function Documentation

◆ getTexture()

const TextureCube& getTexture ( ) const
Returns
currently bound texture.

◆ hasTexture()

bool hasTexture ( ) const
Returns
if a texture is bound to the cube sampler.

◆ setTexture()

void setTexture ( TextureCube textureCube)

Binds a texture to the cube sampler.

Parameters
textureCubethe new texture to bind