NAP
Public Member Functions | List of all members
TypedUniformValueInstance< T > Class Template Reference

#include <uniforminstance.h>

Public Member Functions

 TypedUniformValueInstance (const ShaderVariableValueDeclaration &declaration)
 
void setValue (const T &value)
 
const T & getValue () const
 
void set (const TypedUniformValue< T > &resource)
 
virtual void push (uint8_t *uniformBuffer) const override
 
- Public Member Functions inherited from UniformValueInstance
 UniformValueInstance (const ShaderVariableValueDeclaration &declaration)
 
virtual const ShaderVariableDeclarationgetDeclaration () const override
 
- Public Member Functions inherited from UniformInstance
virtual ~UniformInstance ()=default
 

Additional Inherited Members

- Protected Attributes inherited from UniformValueInstance
const ShaderVariableValueDeclarationmDeclaration = nullptr
 

Description

template<class T>
class nap::TypedUniformValueInstance< T >

Specific type of uniform value instance, for example: float -> TypedUniformValueInstance<float>.

Inheritance diagram for TypedUniformValueInstance< T >:
[legend]
Collaboration diagram for TypedUniformValueInstance< T >:
[legend]

Constructor & Destructor Documentation

◆ TypedUniformValueInstance()

Member Function Documentation

◆ getValue()

const T& getValue ( ) const

Returns the uniform value

◆ push()

void push ( uint8_t *  uniformBuffer) const
overridevirtual

Pushes the data to the 'Shader'.

Parameters
uniformBufferthe buffer in which to copy the value.

Implements UniformLeafInstance.

◆ set()

void set ( const TypedUniformValue< T > &  resource)

Update instance from resource, data is not pushed immediately.

Parameters
resourcethe resource to copy the value from

◆ setValue()

void setValue ( const T &  value)

Updates the uniform value, data is not pushed immediately.

Parameters
valuenew uniform value