Ogre::GpuConstantDefinition Struct Reference
Materials

Information about predefined program constants. More...

`#include <OgreGpuProgramParams.h>`

List of all members.

## Public Member Functions

bool | isFloat () const
bool | isSampler () const
| GpuConstantDefinition ()

## Static Public Member Functions

static bool | isFloat (GpuConstantType c)
static bool | isSampler (GpuConstantType c)
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.

## Public Attributes

GpuConstantType | constType
| Data type.
size_t | physicalIndex
| Physical start index in buffer (either float or int buffer)
size_t | logicalIndex
| Logical index - used to communicate this constant to the rendersystem.
size_t | elementSize
| Number of raw buffer slots per element (some programs pack each array element to float4, some do not)
size_t | arraySize
| Length of array.
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.

Definition at line 105 of file OgreGpuProgramParams.h.

## Constructor & Destructor Documentation

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

Definition at line 258 of file OgreGpuProgramParams.h.

## Member Function Documentation

static size_t Ogre::GpuConstantDefinition::getElementSize | ( | GpuConstantType | ctype,
|  | bool | padToMultiplesOf4
| ) |  | `[static]`

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)

Definition at line 175 of file OgreGpuProgramParams.h.

References 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_SAMPLER1D, Ogre::GCT_SAMPLER1DSHADOW, Ogre::GCT_SAMPLER2D, Ogre::GCT_SAMPLER2DARRAY, Ogre::GCT_SAMPLER2DSHADOW, Ogre::GCT_SAMPLER3D, and Ogre::GCT_SAMPLERCUBE.

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

Definition at line 121 of file OgreGpuProgramParams.h.

static bool Ogre::GpuConstantDefinition::isFloat | ( | GpuConstantType | c | ) | `[static]`

Definition at line 126 of file OgreGpuProgramParams.h.

References Ogre::GCT_INT1, Ogre::GCT_INT2, Ogre::GCT_INT3, Ogre::GCT_INT4, Ogre::GCT_SAMPLER1D, Ogre::GCT_SAMPLER1DSHADOW, Ogre::GCT_SAMPLER2D, Ogre::GCT_SAMPLER2DARRAY, Ogre::GCT_SAMPLER2DSHADOW, Ogre::GCT_SAMPLER3D, and Ogre::GCT_SAMPLERCUBE.

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

Definition at line 148 of file OgreGpuProgramParams.h.

static bool Ogre::GpuConstantDefinition::isSampler | ( | GpuConstantType | c | ) | `[static]`

Definition at line 153 of file OgreGpuProgramParams.h.

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

## Member Data Documentation

size_t Ogre::GpuConstantDefinition::arraySize

Length of array.

Definition at line 117 of file OgreGpuProgramParams.h.

GpuConstantType Ogre::GpuConstantDefinition::constType

Data type.

Definition at line 108 of file OgreGpuProgramParams.h.

size_t Ogre::GpuConstantDefinition::elementSize

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

Definition at line 115 of file OgreGpuProgramParams.h.

size_t Ogre::GpuConstantDefinition::logicalIndex

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

Definition at line 112 of file OgreGpuProgramParams.h.

size_t Ogre::GpuConstantDefinition::physicalIndex

Physical start index in buffer (either float or int buffer)

Definition at line 110 of file OgreGpuProgramParams.h.

uint16 Ogre::GpuConstantDefinition::variability`[mutable]`

How this parameter varies (bitwise combination of GpuProgramVariability)

Definition at line 119 of file OgreGpuProgramParams.h.

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

- OgreGpuProgramParams.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:27:28