CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::Reflection::Field Struct Reference

A field denotes a data member of a record or constant buffer. More...

#include <CeresEngine/Material/ShaderCompiler/Reflection.hpp>

Public Attributes

bool referenced = false
 Specifies whether this field is referenced in the output shader unit. By default false.
 
String name
 Name of the field (also called a data member or variable).
 
FieldType type = FieldType::Undefined
 Base type of the field. Note that this does not include the dimension of a vector type. By default FieldType::Undefined.
 
UInt32 dimensions [2] = {1, 1}
 Number of matrix dimensions.
 
Int32 typeRecordIndex = -1
 Index to the global record type. If this is -1, the field does not denote a record type. By default -1.
 
UInt32 size = 0
 Size (in bytes) of the field. If this is 0xFFFFFFFF, the field size could not be determined. By default 0.
 
UInt32 offset = 0
 Local offset (in bytes) within the containing record or constant buffer.
 
Vector< UInt32arrayElements
 Number of array elements. If this container is empty, the field does not denote an array. If an entry is 0, the respective dimension is dynamically sized.
 

Detailed Description

A field denotes a data member of a record or constant buffer.

See also
Record::fields
ConstantBuffer::fields

Member Data Documentation

◆ arrayElements

Vector<UInt32> CeresEngine::ShaderCompiler::Reflection::Field::arrayElements

Number of array elements. If this container is empty, the field does not denote an array. If an entry is 0, the respective dimension is dynamically sized.

◆ dimensions

UInt32 CeresEngine::ShaderCompiler::Reflection::Field::dimensions[2] = {1, 1}

Number of matrix dimensions.

This is typically used in combination with the 'type' member. By default { 1, 1 }.

Remarks
The first and second entry denote the number of rows and columns respectively. If only one of the entries is 1, the field denotes a vector type. If both the columns and rows are 1, the field denotes a scalar type. If both the columns and rows are 0, the field denotes a record type.

◆ name

String CeresEngine::ShaderCompiler::Reflection::Field::name

Name of the field (also called a data member or variable).

◆ offset

UInt32 CeresEngine::ShaderCompiler::Reflection::Field::offset = 0

Local offset (in bytes) within the containing record or constant buffer.

◆ referenced

bool CeresEngine::ShaderCompiler::Reflection::Field::referenced = false

Specifies whether this field is referenced in the output shader unit. By default false.

◆ size

UInt32 CeresEngine::ShaderCompiler::Reflection::Field::size = 0

Size (in bytes) of the field. If this is 0xFFFFFFFF, the field size could not be determined. By default 0.

◆ type

FieldType CeresEngine::ShaderCompiler::Reflection::Field::type = FieldType::Undefined

Base type of the field. Note that this does not include the dimension of a vector type. By default FieldType::Undefined.

◆ typeRecordIndex

Int32 CeresEngine::ShaderCompiler::Reflection::Field::typeRecordIndex = -1

Index to the global record type. If this is -1, the field does not denote a record type. By default -1.


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