Objects::Components::ShaderObject

Shader Object in Unified Engine

Within the Unified Engine, the ShaderObject class provides a bridge between the game objects and their associated shaders. This class encompasses shader references, argument lists, and functionalities to manage shader activations and data transfer.

Shader and Arguments

Properties of the ShaderObject that store a reference to the associated Shader and a list of arguments to be passed to that shader.

Shader* shader = nullptr;
std::list<ShaderArguments> Arguments = {};
bool Toggled = false;

Activation and Data Transfer

Functions dedicated to activating or deactivating the shader and passing the arguments to the GPU.

ShaderObject(Shader* shaderRef);
~ShaderObject();
int Toggle();
int PassArgs();

Last updated