OGRE-Next: Ogre::GpuConstantDefinition Struct Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::GpuConstantDefinition Struct Reference
Core » Materials

Information about predefined program constants. More...

`#include <OgreGpuProgramParams.h>`

## Public Member Functions
| GpuConstantDefinition ()
bool | isBool () const
bool | isDouble () const
bool | isFloat () const
bool | isInt () const
bool | isSampler () const
bool | isSubroutine () const
bool | isUnsignedInt () const

## Static Public Member Functions
static BaseConstantType | getBaseType (GpuConstantType ctype)
static size_t | getElementSize (GpuConstantType ctype, bool padToMultiplesOf4)
| Get the element size of a given type, including whether to pad the elements into multiples of 4 (e.g.
static bool | isBool (GpuConstantType c)
static bool | isDouble (GpuConstantType c)
static bool | isFloat (GpuConstantType c)
static bool | isInt (GpuConstantType c)
static bool | isSampler (GpuConstantType c)
static bool | isSubroutine (GpuConstantType c)
static bool | isUnsignedInt (GpuConstantType c)

## Public Attributes
size_t | arraySize
| Length of array.
GpuConstantType | constType
| Data type.
size_t | elementSize
| Number of raw buffer slots per element (some programs pack each array element to float4, some do not).
size_t | logicalIndex
| Logical index - used to communicate this constant to the rendersystem.
size_t | physicalIndex
| Physical start index in buffer (either float, double, int, or uint buffer).
uint16 | variability
| How this parameter varies (bitwise combination of GpuProgramVariability).

## Detailed Description

Information about predefined program constants.

Note
  Only available for high-level programs but is referenced generically by GpuProgramParameters.

## Constructor & Destructor Documentation

## ◆ GpuConstantDefinition()

Ogre::GpuConstantDefinition::GpuConstantDefinition | ( |  | ) |
| inline

References arraySize, constType, elementSize, Ogre::GCT_UNKNOWN, Ogre::GPV_GLOBAL, logicalIndex, physicalIndex, and variability.

## Member Function Documentation

## ◆ getBaseType()

BaseConstantType Ogre::GpuConstantDefinition::getBaseType | ( | GpuConstantType | ctype | ) |
| inlinestatic

References Ogre::BCT_BOOL, Ogre::BCT_DOUBLE, Ogre::BCT_FLOAT, Ogre::BCT_INT, Ogre::BCT_SAMPLER, Ogre::BCT_SUBROUTINE, Ogre::BCT_UINT, Ogre::BCT_UNKNOWN, isBool(), isDouble(), isFloat(), isInt(), isSampler(), isSubroutine(), and isUnsignedInt().

## ◆ getElementSize()

size_t Ogre::GpuConstantDefinition::getElementSize | ( | GpuConstantType | ctype,
|  | bool | padToMultiplesOf4 )
| inlinestatic

Get the element size of a given type, including whether to pad the elements into multiples of 4 (e.g.

SM1 and D3D does, GLSL doesn't)

References Ogre::GCT_BOOL1, Ogre::GCT_BOOL2, Ogre::GCT_BOOL3, Ogre::GCT_BOOL4, Ogre::GCT_DOUBLE1, Ogre::GCT_DOUBLE2, Ogre::GCT_DOUBLE3, Ogre::GCT_DOUBLE4, Ogre::GCT_FLOAT1, Ogre::GCT_FLOAT2, Ogre::GCT_FLOAT3, Ogre::GCT_FLOAT4, Ogre::GCT_INT1, Ogre::GCT_INT2, Ogre::GCT_INT3, Ogre::GCT_INT4, Ogre::GCT_MATRIX_2X2, Ogre::GCT_MATRIX_2X3, Ogre::GCT_MATRIX_2X4, Ogre::GCT_MATRIX_3X2, Ogre::GCT_MATRIX_3X3, Ogre::GCT_MATRIX_3X4, Ogre::GCT_MATRIX_4X2, Ogre::GCT_MATRIX_4X3, Ogre::GCT_MATRIX_4X4, Ogre::GCT_MATRIX_DOUBLE_2X2, Ogre::GCT_MATRIX_DOUBLE_2X3, Ogre::GCT_MATRIX_DOUBLE_2X4, Ogre::GCT_MATRIX_DOUBLE_3X2, Ogre::GCT_MATRIX_DOUBLE_3X3, Ogre::GCT_MATRIX_DOUBLE_3X4, Ogre::GCT_MATRIX_DOUBLE_4X2, Ogre::GCT_MATRIX_DOUBLE_4X3, Ogre::GCT_MATRIX_DOUBLE_4X4, Ogre::GCT_SAMPLER1D, Ogre::GCT_SAMPLER1DSHADOW, Ogre::GCT_SAMPLER2D, Ogre::GCT_SAMPLER2DARRAY, Ogre::GCT_SAMPLER2DSHADOW, Ogre::GCT_SAMPLER3D, Ogre::GCT_SAMPLERCUBE, Ogre::GCT_SAMPLERCUBE_ARRAY, Ogre::GCT_UINT1, Ogre::GCT_UINT2, Ogre::GCT_UINT3, and Ogre::GCT_UINT4.

## ◆ isBool() [1/2]

bool Ogre::GpuConstantDefinition::isBool | ( |  | ) | const
| inline

References constType, and isBool().

Referenced by getBaseType(), and isBool().

## ◆ isBool() [2/2]

bool Ogre::GpuConstantDefinition::isBool | ( | GpuConstantType | c | ) |
| inlinestatic

References Ogre::GCT_BOOL1, Ogre::GCT_BOOL2, Ogre::GCT_BOOL3, and Ogre::GCT_BOOL4.

## ◆ isDouble() [1/2]

bool Ogre::GpuConstantDefinition::isDouble | ( |  | ) | const
| inline

References constType, and isDouble().

Referenced by getBaseType(), and isDouble().

## ◆ isDouble() [2/2]

bool Ogre::GpuConstantDefinition::isDouble | ( | GpuConstantType | c | ) |
| inlinestatic

References Ogre::GCT_DOUBLE1, Ogre::GCT_DOUBLE2, Ogre::GCT_DOUBLE3, Ogre::GCT_DOUBLE4, Ogre::GCT_MATRIX_DOUBLE_2X2, Ogre::GCT_MATRIX_DOUBLE_2X3, Ogre::GCT_MATRIX_DOUBLE_2X4, Ogre::GCT_MATRIX_DOUBLE_3X2, Ogre::GCT_MATRIX_DOUBLE_3X3, Ogre::GCT_MATRIX_DOUBLE_3X4, Ogre::GCT_MATRIX_DOUBLE_4X2, Ogre::GCT_MATRIX_DOUBLE_4X3, and Ogre::GCT_MATRIX_DOUBLE_4X4.

## ◆ isFloat() [1/2]

bool Ogre::GpuConstantDefinition::isFloat | ( |  | ) | const
| inline

References constType, and isFloat().

Referenced by getBaseType(), and isFloat().

## ◆ isFloat() [2/2]

bool Ogre::GpuConstantDefinition::isFloat | ( | GpuConstantType | c | ) |
| inlinestatic

References Ogre::GCT_FLOAT1, Ogre::GCT_FLOAT2, Ogre::GCT_FLOAT3, Ogre::GCT_FLOAT4, Ogre::GCT_MATRIX_2X2, Ogre::GCT_MATRIX_2X3, Ogre::GCT_MATRIX_2X4, Ogre::GCT_MATRIX_3X2, Ogre::GCT_MATRIX_3X3, Ogre::GCT_MATRIX_3X4, Ogre::GCT_MATRIX_4X2, Ogre::GCT_MATRIX_4X3, and Ogre::GCT_MATRIX_4X4.

## ◆ isInt() [1/2]

bool Ogre::GpuConstantDefinition::isInt | ( |  | ) | const
| inline

References constType, and isInt().

Referenced by getBaseType(), and isInt().

## ◆ isInt() [2/2]

bool Ogre::GpuConstantDefinition::isInt | ( | GpuConstantType | c | ) |
| inlinestatic

References Ogre::GCT_INT1, Ogre::GCT_INT2, Ogre::GCT_INT3, and Ogre::GCT_INT4.

## ◆ isSampler() [1/2]

bool Ogre::GpuConstantDefinition::isSampler | ( |  | ) | const
| inline

References constType, and isSampler().

Referenced by getBaseType(), and isSampler().

## ◆ isSampler() [2/2]

bool Ogre::GpuConstantDefinition::isSampler | ( | GpuConstantType | c | ) |
| inlinestatic

References Ogre::GCT_SAMPLER1D, Ogre::GCT_SAMPLER1DSHADOW, Ogre::GCT_SAMPLER2D, Ogre::GCT_SAMPLER2DARRAY, Ogre::GCT_SAMPLER2DSHADOW, Ogre::GCT_SAMPLER3D, Ogre::GCT_SAMPLERCUBE, and Ogre::GCT_SAMPLERCUBE_ARRAY.

## ◆ isSubroutine() [1/2]

bool Ogre::GpuConstantDefinition::isSubroutine | ( |  | ) | const
| inline

References constType, and isSubroutine().

Referenced by getBaseType(), and isSubroutine().

## ◆ isSubroutine() [2/2]

bool Ogre::GpuConstantDefinition::isSubroutine | ( | GpuConstantType | c | ) |
| inlinestatic

References Ogre::GCT_SUBROUTINE.

## ◆ isUnsignedInt() [1/2]

bool Ogre::GpuConstantDefinition::isUnsignedInt | ( |  | ) | const
| inline

References constType, and isUnsignedInt().

Referenced by getBaseType(), and isUnsignedInt().

## ◆ isUnsignedInt() [2/2]

bool Ogre::GpuConstantDefinition::isUnsignedInt | ( | GpuConstantType | c | ) |
| inlinestatic

References Ogre::GCT_UINT1, Ogre::GCT_UINT2, Ogre::GCT_UINT3, and Ogre::GCT_UINT4.

## Member Data Documentation

## ◆ arraySize

size_t Ogre::GpuConstantDefinition::arraySize

Length of array.

Referenced by GpuConstantDefinition().

## ◆ constType

GpuConstantType Ogre::GpuConstantDefinition::constType

Data type.

Referenced by GpuConstantDefinition(), isBool(), isDouble(), isFloat(), isInt(), isSampler(), isSubroutine(), and isUnsignedInt().

## ◆ elementSize

size_t Ogre::GpuConstantDefinition::elementSize

Number of raw buffer slots per element (some programs pack each array element to float4, some do not).

Referenced by GpuConstantDefinition().

## ◆ logicalIndex

size_t Ogre::GpuConstantDefinition::logicalIndex

Logical index - used to communicate this constant to the rendersystem.

Referenced by GpuConstantDefinition().

## ◆ physicalIndex

size_t Ogre::GpuConstantDefinition::physicalIndex

Physical start index in buffer (either float, double, int, or uint buffer).

Referenced by GpuConstantDefinition().

## ◆ variability

uint16 Ogre::GpuConstantDefinition::variability
| mutable

How this parameter varies (bitwise combination of GpuProgramVariability).

Referenced by GpuConstantDefinition().

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

- OgreGpuProgramParams.h