TeaPacket v0.0.1
Multiplatform Game Engine
Loading...
Searching...
No Matches
TeaPacket::Graphics::ShaderVariableType Struct Reference

Represents a variable within a shader. More...

#include <ShaderVariable.hpp>

Public Member Functions

constexpr ShaderVariableType ()
 
constexpr ShaderVariableType (ShaderVariableBaseType type, unsigned char amount)
 

Public Attributes

ShaderVariableBaseType type
 The type of the attribute (float, int, etc.)
 
unsigned char amount
 The size of the attribute. A singular value is 1, while vectors are 2+.
 

Detailed Description

Represents a variable within a shader.

Informs TeaPacket on various shader properties
These structs can correspond to a number of different things based on context. They are as follows:

  • The inputs of a shader
    • By extension, these structs are also used to interpret mesh data.
  • A shader uniform

As an example of this struct's use, a ShaderVariable with type SHADER_VAR_TYPE_FLOAT and amount 4 is a vec4 in GLSL (or a float4 in HLSL)

Constructor & Destructor Documentation

◆ ShaderVariableType() [1/2]

TeaPacket::Graphics::ShaderVariableType::ShaderVariableType ( )
inlineconstexpr

◆ ShaderVariableType() [2/2]

TeaPacket::Graphics::ShaderVariableType::ShaderVariableType ( ShaderVariableBaseType type,
unsigned char amount )
inlineconstexpr

Member Data Documentation

◆ amount

unsigned char TeaPacket::Graphics::ShaderVariableType::amount

The size of the attribute. A singular value is 1, while vectors are 2+.

◆ type

ShaderVariableBaseType TeaPacket::Graphics::ShaderVariableType::type

The type of the attribute (float, int, etc.)


The documentation for this struct was generated from the following file: