OgreGpuProgramParams.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __GpuProgramParams_H_
#define __GpuProgramParams_H_
// Precompiler options
#include "OgrePrerequisites.h"
#include "OgreSharedPtr.h"
#include "OgreIteratorWrappers.h"
#include "OgreSerializer.h"
#include "OgreRenderOperation.h"
#include "OgreAny.h"
#include "Threading/OgreThreadHeaders.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
enum GpuConstantType
{
GCT_FLOAT1 = 1,
GCT_FLOAT2 = 2,
GCT_FLOAT3 = 3,
GCT_FLOAT4 = 4,
GCT_SAMPLER1D = 5,
GCT_SAMPLER2D = 6,
GCT_SAMPLER3D = 7,
GCT_SAMPLERCUBE = 8,
GCT_SAMPLERRECT = 9,
GCT_SAMPLER1DSHADOW = 10,
GCT_SAMPLER2DSHADOW = 11,
GCT_SAMPLER2DARRAY = 12,
GCT_MATRIX_2X2 = 13,
GCT_MATRIX_2X3 = 14,
GCT_MATRIX_2X4 = 15,
GCT_MATRIX_3X2 = 16,
GCT_MATRIX_3X3 = 17,
GCT_MATRIX_3X4 = 18,
GCT_MATRIX_4X2 = 19,
GCT_MATRIX_4X3 = 20,
GCT_MATRIX_4X4 = 21,
GCT_INT1 = 22,
GCT_INT2 = 23,
GCT_INT3 = 24,
GCT_INT4 = 25,
GCT_SUBROUTINE = 26,
GCT_DOUBLE1 = 27,
GCT_DOUBLE2 = 28,
GCT_DOUBLE3 = 29,
GCT_DOUBLE4 = 30,
GCT_MATRIX_DOUBLE_2X2 = 31,
GCT_MATRIX_DOUBLE_2X3 = 32,
GCT_MATRIX_DOUBLE_2X4 = 33,
GCT_MATRIX_DOUBLE_3X2 = 34,
GCT_MATRIX_DOUBLE_3X3 = 35,
GCT_MATRIX_DOUBLE_3X4 = 36,
GCT_MATRIX_DOUBLE_4X2 = 37,
GCT_MATRIX_DOUBLE_4X3 = 38,
GCT_MATRIX_DOUBLE_4X4 = 39,
GCT_UNKNOWN = 99
};
enum GpuParamVariability
{
GPV_GLOBAL = 1,
GPV_PER_OBJECT = 2,
GPV_LIGHTS = 4,
GPV_PASS_ITERATION_NUMBER = 8,
GPV_ALL = 0xFFFF
};
struct _OgreExport GpuConstantDefinition
{
GpuConstantType constType;
size_t physicalIndex;
size_t logicalIndex;
size_t elementSize;
size_t arraySize;
mutable uint16 variability;
bool isFloat() const
{
return isFloat(constType);
}
static bool isFloat(GpuConstantType c)
{
switch(c)
{
case GCT_INT1:
case GCT_INT2:
case GCT_INT3:
case GCT_INT4:
case GCT_SAMPLER1D:
case GCT_SAMPLER2D:
case GCT_SAMPLER2DARRAY:
case GCT_SAMPLER3D:
case GCT_SAMPLERCUBE:
case GCT_SAMPLER1DSHADOW:
case GCT_SAMPLER2DSHADOW:
return false;
default:
return true;
};
}
bool isDouble() const
{
return isDouble(constType);
}
static bool isDouble(GpuConstantType c)
{
switch(c)
{
case GCT_INT1:
case GCT_INT2:
case GCT_INT3:
case GCT_INT4:
case GCT_FLOAT1:
case GCT_FLOAT2:
case GCT_FLOAT3:
case GCT_FLOAT4:
case GCT_SAMPLER1D:
case GCT_SAMPLER2D:
case GCT_SAMPLER2DARRAY:
case GCT_SAMPLER3D:
case GCT_SAMPLERCUBE:
case GCT_SAMPLER1DSHADOW:
case GCT_SAMPLER2DSHADOW:
return false;
default:
return true;
};
}
bool isSampler() const
{
return isSampler(constType);
}
static bool isSampler(GpuConstantType c)
{
switch(c)
{
case GCT_SAMPLER1D:
case GCT_SAMPLER2D:
case GCT_SAMPLER2DARRAY:
case GCT_SAMPLER3D:
case GCT_SAMPLERCUBE:
case GCT_SAMPLER1DSHADOW:
case GCT_SAMPLER2DSHADOW:
return true;
default:
return false;
};
}
bool isSubroutine() const
{
return isSubroutine(constType);
}
static bool isSubroutine(GpuConstantType c)
{
return c == GCT_SUBROUTINE;
}
static size_t getElementSize(GpuConstantType ctype, bool padToMultiplesOf4)
{
if (padToMultiplesOf4)
{
switch(ctype)
{
case GCT_FLOAT1:
case GCT_INT1:
case GCT_SAMPLER1D:
case GCT_SAMPLER2D:
case GCT_SAMPLER2DARRAY:
case GCT_SAMPLER3D:
case GCT_SAMPLERCUBE:
case GCT_SAMPLER1DSHADOW:
case GCT_SAMPLER2DSHADOW:
case GCT_FLOAT2:
case GCT_INT2:
case GCT_FLOAT3:
case GCT_INT3:
case GCT_FLOAT4:
case GCT_INT4:
return 4;
case GCT_MATRIX_2X2:
case GCT_MATRIX_2X3:
case GCT_MATRIX_2X4:
case GCT_DOUBLE1:
case GCT_DOUBLE2:
case GCT_DOUBLE3:
case GCT_DOUBLE4:
return 8; // 2 float4s
case GCT_MATRIX_3X2:
case GCT_MATRIX_3X3:
case GCT_MATRIX_3X4:
return 12; // 3 float4s
case GCT_MATRIX_4X2:
case GCT_MATRIX_4X3:
case GCT_MATRIX_4X4:
case GCT_MATRIX_DOUBLE_2X2:
case GCT_MATRIX_DOUBLE_2X3:
case GCT_MATRIX_DOUBLE_2X4:
return 16; // 4 float4s
case GCT_MATRIX_DOUBLE_3X2:
case GCT_MATRIX_DOUBLE_3X3:
case GCT_MATRIX_DOUBLE_3X4:
return 24;
case GCT_MATRIX_DOUBLE_4X2:
case GCT_MATRIX_DOUBLE_4X3:
case GCT_MATRIX_DOUBLE_4X4:
return 32;
default:
return 4;
};
}
else
{
switch(ctype)
{
case GCT_FLOAT1:
case GCT_DOUBLE1:
case GCT_INT1:
case GCT_SAMPLER1D:
case GCT_SAMPLER2D:
case GCT_SAMPLER2DARRAY:
case GCT_SAMPLER3D:
case GCT_SAMPLERCUBE:
case GCT_SAMPLER1DSHADOW:
case GCT_SAMPLER2DSHADOW:
return 1;
case GCT_FLOAT2:
case GCT_INT2:
case GCT_DOUBLE2:
return 2;
case GCT_FLOAT3:
case GCT_INT3:
case GCT_DOUBLE3:
return 3;
case GCT_FLOAT4:
case GCT_INT4:
case GCT_DOUBLE4:
return 4;
case GCT_MATRIX_2X2:
case GCT_MATRIX_DOUBLE_2X2:
return 4;
case GCT_MATRIX_2X3:
case GCT_MATRIX_3X2:
case GCT_MATRIX_DOUBLE_2X3:
case GCT_MATRIX_DOUBLE_3X2:
return 6;
case GCT_MATRIX_2X4:
case GCT_MATRIX_4X2:
case GCT_MATRIX_DOUBLE_2X4:
case GCT_MATRIX_DOUBLE_4X2:
return 8;
case GCT_MATRIX_3X3:
case GCT_MATRIX_DOUBLE_3X3:
return 9;
case GCT_MATRIX_3X4:
case GCT_MATRIX_4X3:
case GCT_MATRIX_DOUBLE_3X4:
case GCT_MATRIX_DOUBLE_4X3:
return 12;
case GCT_MATRIX_4X4:
case GCT_MATRIX_DOUBLE_4X4:
return 16;
default:
return 4;
};
}
}
GpuConstantDefinition()
: constType(GCT_UNKNOWN)
, physicalIndex((std::numeric_limits<size_t>::max)())
, logicalIndex(0)
, elementSize(0)
, arraySize(1)
, variability(GPV_GLOBAL) {}
};
typedef map<String, GpuConstantDefinition>::type GpuConstantDefinitionMap;
typedef ConstMapIterator<GpuConstantDefinitionMap> GpuConstantDefinitionIterator;
struct _OgreExport GpuNamedConstants : public GpuParamsAlloc
{
size_t floatBufferSize;
size_t doubleBufferSize;
size_t intBufferSize;
GpuConstantDefinitionMap map;
GpuNamedConstants() : floatBufferSize(0), doubleBufferSize(0), intBufferSize(0) {}
void generateConstantDefinitionArrayEntries(const String& paramName,
const GpuConstantDefinition& baseDef);
static bool getGenerateAllConstantDefinitionArrayEntries();
static void setGenerateAllConstantDefinitionArrayEntries(bool generateAll);
void save(const String& filename) const;
void load(DataStreamPtr& stream);
size_t calculateSize(void) const;
protected:
static bool msGenerateAllConstantDefinitionArrayEntries;
};
typedef SharedPtr<GpuNamedConstants> GpuNamedConstantsPtr;
class _OgreExport GpuNamedConstantsSerializer : public Serializer
{
public:
GpuNamedConstantsSerializer();
virtual ~GpuNamedConstantsSerializer();
void exportNamedConstants(const GpuNamedConstants* pConsts, const String& filename,
Endian endianMode = ENDIAN_NATIVE);
void exportNamedConstants(const GpuNamedConstants* pConsts, DataStreamPtr stream,
Endian endianMode = ENDIAN_NATIVE);
void importNamedConstants(DataStreamPtr& stream, GpuNamedConstants* pDest);
};
struct _OgreExport GpuLogicalIndexUse
{
size_t physicalIndex;
size_t currentSize;
mutable uint16 variability;
GpuLogicalIndexUse()
: physicalIndex(99999), currentSize(0), variability(GPV_GLOBAL) {}
GpuLogicalIndexUse(size_t bufIdx, size_t curSz, uint16 v)
: physicalIndex(bufIdx), currentSize(curSz), variability(v) {}
};
typedef map<size_t, GpuLogicalIndexUse>::type GpuLogicalIndexUseMap;
struct _OgreExport GpuLogicalBufferStruct : public GpuParamsAlloc
{
OGRE_MUTEX(mutex);
GpuLogicalIndexUseMap map;
size_t bufferSize;
GpuLogicalBufferStruct() : bufferSize(0) {}
};
typedef SharedPtr<GpuLogicalBufferStruct> GpuLogicalBufferStructPtr;
typedef vector<float>::type FloatConstantList;
typedef vector<double>::type DoubleConstantList;
typedef vector<int>::type IntConstantList;
class _OgreExport GpuSharedParameters : public GpuParamsAlloc
{
protected:
GpuNamedConstants mNamedConstants;
FloatConstantList mFloatConstants;
DoubleConstantList mDoubleConstants;
IntConstantList mIntConstants;
String mName;
// Optional data the rendersystem might want to store
mutable Any mRenderSystemData;
size_t mFrameLastUpdated;
unsigned long mVersion;
public:
GpuSharedParameters(const String& name);
virtual ~GpuSharedParameters();
const String& getName() { return mName; }
void addConstantDefinition(const String& name, GpuConstantType constType, size_t arraySize = 1);
void removeConstantDefinition(const String& name);
void removeAllConstantDefinitions();
unsigned long getVersion() const { return mVersion; }
size_t calculateSize(void) const;
void _markDirty();
size_t getFrameLastUpdated() const { return mFrameLastUpdated; }
GpuConstantDefinitionIterator getConstantDefinitionIterator(void) const;
const GpuConstantDefinition& getConstantDefinition(const String& name) const;
const GpuNamedConstants& getConstantDefinitions() const;
void setNamedConstant(const String& name, Real val);
void setNamedConstant(const String& name, int val);
void setNamedConstant(const String& name, const Vector4& vec);
void setNamedConstant(const String& name, const Vector3& vec);
void setNamedConstant(const String& name, const Vector2& vec);
void setNamedConstant(const String& name, const Matrix4& m);
void setNamedConstant(const String& name, const Matrix4* m, size_t numEntries);
void setNamedConstant(const String& name, const float *val, size_t count);
void setNamedConstant(const String& name, const double *val, size_t count);
void setNamedConstant(const String& name, const ColourValue& colour);
void setNamedConstant(const String& name, const int *val, size_t count);
float* getFloatPointer(size_t pos) { _markDirty(); return &mFloatConstants[pos]; }
const float* getFloatPointer(size_t pos) const { return &mFloatConstants[pos]; }
double* getDoublePointer(size_t pos) { _markDirty(); return &mDoubleConstants[pos]; }
const double* getDoublePointer(size_t pos) const { return &mDoubleConstants[pos]; }
int* getIntPointer(size_t pos) { _markDirty(); return &mIntConstants[pos]; }
const int* getIntPointer(size_t pos) const { return &mIntConstants[pos]; }
const FloatConstantList& getFloatConstantList() const { return mFloatConstants; }
const DoubleConstantList& getDoubleConstantList() const { return mDoubleConstants; }
const IntConstantList& getIntConstantList() const { return mIntConstants; }
void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
const Any& _getRenderSystemData() const { return mRenderSystemData; }
};
typedef SharedPtr<GpuSharedParameters> GpuSharedParametersPtr;
class GpuProgramParameters;
class _OgreExport GpuSharedParametersUsage : public GpuParamsAlloc
{
protected:
GpuSharedParametersPtr mSharedParams;
// Not a shared pointer since this is also parent
GpuProgramParameters* mParams;
// list of physical mappings that we are going to bring in
struct CopyDataEntry
{
const GpuConstantDefinition* srcDefinition;
const GpuConstantDefinition* dstDefinition;
};
typedef vector<CopyDataEntry>::type CopyDataList;
CopyDataList mCopyDataList;
// Optional data the rendersystem might want to store
mutable Any mRenderSystemData;
unsigned long mCopyDataVersion;
void initCopyData();
public:
GpuSharedParametersUsage(GpuSharedParametersPtr sharedParams,
GpuProgramParameters* params);
void _copySharedParamsToTargetParams();
const String& getName() const { return mSharedParams->getName(); }
GpuSharedParametersPtr getSharedParams() const { return mSharedParams; }
GpuProgramParameters* getTargetParams() const { return mParams; }
void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
const Any& _getRenderSystemData() const { return mRenderSystemData; }
};
class _OgreExport GpuProgramParameters : public GpuParamsAlloc
{
public:
enum AutoConstantType
{
ACT_WORLD_MATRIX,
ACT_INVERSE_WORLD_MATRIX,
ACT_TRANSPOSE_WORLD_MATRIX,
ACT_INVERSE_TRANSPOSE_WORLD_MATRIX,
ACT_WORLD_MATRIX_ARRAY_3x4,
ACT_WORLD_MATRIX_ARRAY,
ACT_WORLD_DUALQUATERNION_ARRAY_2x4,
ACT_WORLD_SCALE_SHEAR_MATRIX_ARRAY_3x4,
ACT_VIEW_MATRIX,
ACT_INVERSE_VIEW_MATRIX,
ACT_TRANSPOSE_VIEW_MATRIX,
ACT_INVERSE_TRANSPOSE_VIEW_MATRIX,
ACT_PROJECTION_MATRIX,
ACT_INVERSE_PROJECTION_MATRIX,
ACT_TRANSPOSE_PROJECTION_MATRIX,
ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX,
ACT_VIEWPROJ_MATRIX,
ACT_INVERSE_VIEWPROJ_MATRIX,
ACT_TRANSPOSE_VIEWPROJ_MATRIX,
ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX,
ACT_WORLDVIEW_MATRIX,
ACT_INVERSE_WORLDVIEW_MATRIX,
ACT_TRANSPOSE_WORLDVIEW_MATRIX,
ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX,
ACT_WORLDVIEWPROJ_MATRIX,
ACT_INVERSE_WORLDVIEWPROJ_MATRIX,
ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX,
ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX,
ACT_RENDER_TARGET_FLIPPING,
ACT_VERTEX_WINDING,
ACT_FOG_COLOUR,
ACT_FOG_PARAMS,
ACT_SURFACE_AMBIENT_COLOUR,
ACT_SURFACE_DIFFUSE_COLOUR,
ACT_SURFACE_SPECULAR_COLOUR,
ACT_SURFACE_EMISSIVE_COLOUR,
ACT_SURFACE_SHININESS,
ACT_SURFACE_ALPHA_REJECTION_VALUE,
ACT_LIGHT_COUNT,
ACT_AMBIENT_LIGHT_COLOUR,
ACT_LIGHT_DIFFUSE_COLOUR,
ACT_LIGHT_SPECULAR_COLOUR,
ACT_LIGHT_ATTENUATION,
ACT_SPOTLIGHT_PARAMS,
ACT_LIGHT_POSITION,
ACT_LIGHT_POSITION_OBJECT_SPACE,
ACT_LIGHT_POSITION_VIEW_SPACE,
ACT_LIGHT_DIRECTION,
ACT_LIGHT_DIRECTION_OBJECT_SPACE,
ACT_LIGHT_DIRECTION_VIEW_SPACE,
ACT_LIGHT_DISTANCE_OBJECT_SPACE,
ACT_LIGHT_POWER_SCALE,
ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED,
ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED,
ACT_LIGHT_DIFFUSE_COLOUR_ARRAY,
ACT_LIGHT_SPECULAR_COLOUR_ARRAY,
ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED_ARRAY,
ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED_ARRAY,
ACT_LIGHT_ATTENUATION_ARRAY,
ACT_LIGHT_POSITION_ARRAY,
ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY,
ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY,
ACT_LIGHT_DIRECTION_ARRAY,
ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY,
ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY,
ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY,
ACT_LIGHT_POWER_SCALE_ARRAY,
ACT_SPOTLIGHT_PARAMS_ARRAY,
ACT_DERIVED_AMBIENT_LIGHT_COLOUR,
ACT_DERIVED_SCENE_COLOUR,
ACT_DERIVED_LIGHT_DIFFUSE_COLOUR,
ACT_DERIVED_LIGHT_SPECULAR_COLOUR,
ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY,
ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY,
ACT_LIGHT_NUMBER,
ACT_LIGHT_CASTS_SHADOWS,
ACT_LIGHT_CASTS_SHADOWS_ARRAY,
ACT_SHADOW_EXTRUSION_DISTANCE,
ACT_CAMERA_POSITION,
ACT_CAMERA_POSITION_OBJECT_SPACE,
ACT_TEXTURE_VIEWPROJ_MATRIX,
ACT_TEXTURE_VIEWPROJ_MATRIX_ARRAY,
ACT_TEXTURE_WORLDVIEWPROJ_MATRIX,
ACT_TEXTURE_WORLDVIEWPROJ_MATRIX_ARRAY,
ACT_SPOTLIGHT_VIEWPROJ_MATRIX,
ACT_SPOTLIGHT_VIEWPROJ_MATRIX_ARRAY,
ACT_SPOTLIGHT_WORLDVIEWPROJ_MATRIX,
ACT_SPOTLIGHT_WORLDVIEWPROJ_MATRIX_ARRAY,
ACT_CUSTOM,
ACT_TIME,
ACT_TIME_0_X,
ACT_COSTIME_0_X,
ACT_SINTIME_0_X,
ACT_TANTIME_0_X,
ACT_TIME_0_X_PACKED,
ACT_TIME_0_1,
ACT_COSTIME_0_1,
ACT_SINTIME_0_1,
ACT_TANTIME_0_1,
ACT_TIME_0_1_PACKED,
ACT_TIME_0_2PI,
ACT_COSTIME_0_2PI,
ACT_SINTIME_0_2PI,
ACT_TANTIME_0_2PI,
ACT_TIME_0_2PI_PACKED,
ACT_FRAME_TIME,
ACT_FPS,
ACT_VIEWPORT_WIDTH,
ACT_VIEWPORT_HEIGHT,
ACT_INVERSE_VIEWPORT_WIDTH,
ACT_INVERSE_VIEWPORT_HEIGHT,
ACT_VIEWPORT_SIZE,
ACT_VIEW_DIRECTION,
ACT_VIEW_SIDE_VECTOR,
ACT_VIEW_UP_VECTOR,
ACT_FOV,
ACT_NEAR_CLIP_DISTANCE,
ACT_FAR_CLIP_DISTANCE,
ACT_PASS_NUMBER,
ACT_PASS_ITERATION_NUMBER,
ACT_ANIMATION_PARAMETRIC,
ACT_TEXEL_OFFSETS,
ACT_SCENE_DEPTH_RANGE,
ACT_SHADOW_SCENE_DEPTH_RANGE,
ACT_SHADOW_SCENE_DEPTH_RANGE_ARRAY,
ACT_SHADOW_COLOUR,
ACT_TEXTURE_SIZE,
ACT_INVERSE_TEXTURE_SIZE,
ACT_PACKED_TEXTURE_SIZE,
ACT_TEXTURE_MATRIX,
ACT_LOD_CAMERA_POSITION,
ACT_LOD_CAMERA_POSITION_OBJECT_SPACE,
ACT_LIGHT_CUSTOM,
ACT_UNKNOWN = 999
};
enum ACDataType {
ACDT_NONE,
ACDT_INT,
ACDT_REAL
};
enum ElementType {
ET_INT,
ET_REAL
};
struct AutoConstantDefinition
{
AutoConstantType acType;
String name;
size_t elementCount;
ElementType elementType;
ACDataType dataType;
AutoConstantDefinition(AutoConstantType _acType, const String& _name,
size_t _elementCount, ElementType _elementType,
ACDataType _dataType)
:acType(_acType), name(_name), elementCount(_elementCount),
elementType(_elementType), dataType(_dataType)
{
}
};
class AutoConstantEntry
{
public:
AutoConstantType paramType;
size_t physicalIndex;
size_t elementCount;
union{
size_t data;
Real fData;
};
uint16 variability;
AutoConstantEntry(AutoConstantType theType, size_t theIndex, size_t theData,
uint16 theVariability, size_t theElemCount = 4)
: paramType(theType), physicalIndex(theIndex), elementCount(theElemCount),
data(theData), variability(theVariability) {}
AutoConstantEntry(AutoConstantType theType, size_t theIndex, Real theData,
uint16 theVariability, size_t theElemCount = 4)
: paramType(theType), physicalIndex(theIndex), elementCount(theElemCount),
fData(theData), variability(theVariability) {}
};
// Auto parameter storage
typedef vector<AutoConstantEntry>::type AutoConstantList;
typedef vector<GpuSharedParametersUsage>::type GpuSharedParamUsageList;
// Map that store subroutines associated with slots
typedef HashMap<unsigned int, String> SubroutineMap;
typedef HashMap<unsigned int, String>::const_iterator SubroutineIterator;
protected:
SubroutineMap mSubroutineMap;
static AutoConstantDefinition AutoConstantDictionary[];
FloatConstantList mFloatConstants;
DoubleConstantList mDoubleConstants;
IntConstantList mIntConstants;
GpuLogicalBufferStructPtr mFloatLogicalToPhysical;
GpuLogicalBufferStructPtr mDoubleLogicalToPhysical;
GpuLogicalBufferStructPtr mIntLogicalToPhysical;
GpuNamedConstantsPtr mNamedConstants;
AutoConstantList mAutoConstants;
uint16 mCombinedVariability;
bool mTransposeMatrices;
bool mIgnoreMissingParams;
size_t mActivePassIterationIndex;
GpuLogicalIndexUse* _getFloatConstantLogicalIndexUse(size_t logicalIndex, size_t requestedSize, uint16 variability);
GpuLogicalIndexUse* _getDoubleConstantLogicalIndexUse(size_t logicalIndex, size_t requestedSize, uint16 variability);
GpuLogicalIndexUse* _getIntConstantLogicalIndexUse(size_t logicalIndex, size_t requestedSize, uint16 variability);
uint16 deriveVariability(AutoConstantType act);
void copySharedParamSetUsage(const GpuSharedParamUsageList& srcList);
GpuSharedParamUsageList mSharedParamSets;
// Optional data the rendersystem might want to store
mutable Any mRenderSystemData;
public:
GpuProgramParameters();
~GpuProgramParameters() {}
GpuProgramParameters(const GpuProgramParameters& oth);
GpuProgramParameters& operator=(const GpuProgramParameters& oth);
void _setNamedConstants(const GpuNamedConstantsPtr& constantmap);
void _setLogicalIndexes(const GpuLogicalBufferStructPtr& floatIndexMap, const GpuLogicalBufferStructPtr& doubleIndexMap,
const GpuLogicalBufferStructPtr& intIndexMap);
bool hasNamedParameters() const { return !mNamedConstants.isNull(); }
bool hasLogicalIndexedParameters() const { return !mFloatLogicalToPhysical.isNull(); }
void setConstant(size_t index, const Vector4& vec);
void setConstant(size_t index, Real val);
void setConstant(size_t index, const Vector3& vec);
void setConstant(size_t index, const Vector2& vec);
void setConstant(size_t index, const Matrix4& m);
void setConstant(size_t index, const Matrix4* m, size_t numEntries);
void setConstant(size_t index, const float *val, size_t count);
void setConstant(size_t index, const double *val, size_t count);
void setConstant(size_t index, const ColourValue& colour);
void setConstant(size_t index, const int *val, size_t count);
void _writeRawConstants(size_t physicalIndex, const float* val, size_t count);
void _writeRawConstants(size_t physicalIndex, const double* val, size_t count);
void _writeRawConstants(size_t physicalIndex, const int* val, size_t count);
void _readRawConstants(size_t physicalIndex, size_t count, float* dest);
void _readRawConstants(size_t physicalIndex, size_t count, int* dest);
void _writeRawConstant(size_t physicalIndex, const Vector4& vec,
size_t count = 4);
void _writeRawConstant(size_t physicalIndex, Real val);
void _writeRawConstant(size_t physicalIndex, Real val, size_t count);
void _writeRawConstant(size_t physicalIndex, int val);
void _writeRawConstant(size_t physicalIndex, const Vector3& vec);
void _writeRawConstant(size_t physicalIndex, const Vector2& vec);
void _writeRawConstant(size_t physicalIndex, const Matrix4& m, size_t elementCount);
void _writeRawConstant(size_t physicalIndex, const Matrix4* m, size_t numEntries);
void _writeRawConstant(size_t physicalIndex, const ColourValue& colour,
size_t count = 4);
GpuConstantDefinitionIterator getConstantDefinitionIterator(void) const;
const GpuConstantDefinition& getConstantDefinition(const String& name) const;
const GpuNamedConstants& getConstantDefinitions() const;
const GpuLogicalBufferStructPtr& getFloatLogicalBufferStruct() const { return mFloatLogicalToPhysical; }
size_t getFloatLogicalIndexForPhysicalIndex(size_t physicalIndex);
const GpuLogicalBufferStructPtr& getDoubleLogicalBufferStruct() const { return mDoubleLogicalToPhysical; }
size_t getDoubleLogicalIndexForPhysicalIndex(size_t physicalIndex);
size_t getIntLogicalIndexForPhysicalIndex(size_t physicalIndex);
const GpuLogicalBufferStructPtr& getIntLogicalBufferStruct() const { return mIntLogicalToPhysical; }
const FloatConstantList& getFloatConstantList() const { return mFloatConstants; }
float* getFloatPointer(size_t pos) { return &mFloatConstants[pos]; }
const float* getFloatPointer(size_t pos) const { return &mFloatConstants[pos]; }
const DoubleConstantList& getDoubleConstantList() const { return mDoubleConstants; }
double* getDoublePointer(size_t pos) { return &mDoubleConstants[pos]; }
const double* getDoublePointer(size_t pos) const { return &mDoubleConstants[pos]; }
const IntConstantList& getIntConstantList() const { return mIntConstants; }
int* getIntPointer(size_t pos) { return &mIntConstants[pos]; }
const int* getIntPointer(size_t pos) const { return &mIntConstants[pos]; }
const AutoConstantList& getAutoConstantList() const { return mAutoConstants; }
void setAutoConstant(size_t index, AutoConstantType acType, size_t extraInfo = 0);
void setAutoConstantReal(size_t index, AutoConstantType acType, Real rData);
void setAutoConstant(size_t index, AutoConstantType acType, uint16 extraInfo1, uint16 extraInfo2);
void _setRawAutoConstant(size_t physicalIndex, AutoConstantType acType, size_t extraInfo,
uint16 variability, size_t elementSize = 4);
void _setRawAutoConstantReal(size_t physicalIndex, AutoConstantType acType, Real rData,
uint16 variability, size_t elementSize = 4);
void clearAutoConstant(size_t index);
void setConstantFromTime(size_t index, Real factor);
void clearAutoConstants(void);
typedef ConstVectorIterator<AutoConstantList> AutoConstantIterator;
AutoConstantIterator getAutoConstantIterator(void) const;
size_t getAutoConstantCount(void) const { return mAutoConstants.size(); }
AutoConstantEntry* getAutoConstantEntry(const size_t index);
bool hasAutoConstants(void) const { return !(mAutoConstants.empty()); }
const AutoConstantEntry* findFloatAutoConstantEntry(size_t logicalIndex);
const AutoConstantEntry* findDoubleAutoConstantEntry(size_t logicalIndex);
const AutoConstantEntry* findIntAutoConstantEntry(size_t logicalIndex);
const AutoConstantEntry* findAutoConstantEntry(const String& paramName);
const AutoConstantEntry* _findRawAutoConstantEntryFloat(size_t physicalIndex);
const AutoConstantEntry* _findRawAutoConstantEntryDouble(size_t physicalIndex);
const AutoConstantEntry* _findRawAutoConstantEntryInt(size_t physicalIndex);
void _updateAutoParams(const AutoParamDataSource* source, uint16 variabilityMask);
void setIgnoreMissingParams(bool state) { mIgnoreMissingParams = state; }
void setNamedConstant(const String& name, Real val);
void setNamedConstant(const String& name, int val);
void setNamedConstant(const String& name, const Vector4& vec);
void setNamedConstant(const String& name, const Vector3& vec);
void setNamedConstant(const String& name, const Vector2& vec);
void setNamedConstant(const String& name, const Matrix4& m);
void setNamedConstant(const String& name, const Matrix4* m, size_t numEntries);
void setNamedConstant(const String& name, const float *val, size_t count,
size_t multiple = 4);
void setNamedConstant(const String& name, const double *val, size_t count,
size_t multiple = 4);
void setNamedConstant(const String& name, const ColourValue& colour);
void setNamedConstant(const String& name, const int *val, size_t count,
size_t multiple = 4);
void setNamedAutoConstant(const String& name, AutoConstantType acType, size_t extraInfo = 0);
void setNamedAutoConstantReal(const String& name, AutoConstantType acType, Real rData);
void setNamedAutoConstant(const String& name, AutoConstantType acType, uint16 extraInfo1, uint16 extraInfo2);
void setNamedConstantFromTime(const String& name, Real factor);
void clearNamedAutoConstant(const String& name);
const GpuConstantDefinition* _findNamedConstantDefinition(
const String& name, bool throwExceptionIfMissing = false) const;
size_t _getFloatConstantPhysicalIndex(size_t logicalIndex, size_t requestedSize, uint16 variability);
size_t _getDoubleConstantPhysicalIndex(size_t logicalIndex, size_t requestedSize, uint16 variability);
size_t _getIntConstantPhysicalIndex(size_t logicalIndex, size_t requestedSize, uint16 variability);
void setTransposeMatrices(bool val) { mTransposeMatrices = val; }
bool getTransposeMatrices(void) const { return mTransposeMatrices; }
void copyConstantsFrom(const GpuProgramParameters& source);
void copyMatchingNamedConstantsFrom(const GpuProgramParameters& source);
static const AutoConstantDefinition* getAutoConstantDefinition(const String& name);
static const AutoConstantDefinition* getAutoConstantDefinition(const size_t idx);
static size_t getNumAutoConstantDefinitions(void);
void incPassIterationNumber(void);
bool hasPassIterationNumber() const
{ return mActivePassIterationIndex != (std::numeric_limits<size_t>::max)(); }
size_t getPassIterationNumberIndex() const
{ return mActivePassIterationIndex; }
void addSharedParameters(GpuSharedParametersPtr sharedParams);
void addSharedParameters(const String& sharedParamsName);
bool isUsingSharedParameters(const String& sharedParamsName) const;
void removeSharedParameters(const String& sharedParamsName);
void removeAllSharedParameters();
const GpuSharedParamUsageList& getSharedParameters() const;
void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
const Any& _getRenderSystemData() const { return mRenderSystemData; }
void _copySharedParams();
size_t calculateSize(void) const;
void setNamedSubroutine(const String& subroutineSlot, const String& subroutine);
void setSubroutine(size_t index, const String& subroutine);
const SubroutineMap& getSubroutineMap() const { return mSubroutineMap; }
};
typedef SharedPtr<GpuProgramParameters> GpuProgramParametersSharedPtr;
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::GpuProgramParameters::ACT_TANTIME_0_2PI
Tangent of "Time0_2PI". Equivalent to RenderMonkey&#39;s "TanTime0_2PI".
Definition: OgreGpuProgramParams.h:1031
Ogre::GpuProgramParameters::ACDT_NONE
no data is required
Definition: OgreGpuProgramParams.h:1177
Ogre::GpuConstantDefinition::logicalIndex
size_t logicalIndex
Logical index - used to communicate this constant to the rendersystem.
Definition: OgreGpuProgramParams.h:129
Ogre::GpuProgramParameters::mSharedParamSets
GpuSharedParamUsageList mSharedParamSets
Definition: OgreGpuProgramParams.h:1301
Ogre::GpuSharedParameters::getIntPointer
int * getIntPointer(size_t pos)
Get a pointer to the &#39;nth&#39; item in the int buffer.
Definition: OgreGpuProgramParams.h:593
Ogre::GpuConstantDefinition::isSubroutine
static bool isSubroutine(GpuConstantType c)
Definition: OgreGpuProgramParams.h:224
Ogre::GpuProgramParameters::ACT_LOD_CAMERA_POSITION
Provides the position of the LOD camera in world space, allowing you to perform separate LOD calculat...
Definition: OgreGpuProgramParams.h:1159
Ogre::GpuProgramParameters::ACT_PACKED_TEXTURE_SIZE
Provides packed texture size of the texture unit (index determined by setAutoConstant call)...
Definition: OgreGpuProgramParams.h:1147
Ogre::GpuSharedParametersUsage::CopyDataEntry::srcDefinition
const GpuConstantDefinition * srcDefinition
Definition: OgreGpuProgramParams.h:628
Ogre::GpuProgramParameters::ACT_LIGHT_ATTENUATION_ARRAY
Array of light attenuation parameters, Vector4(range, constant, linear, quadric) (count set by extra ...
Definition: OgreGpuProgramParams.h:886
Ogre::GCT_MATRIX_DOUBLE_4X2
Definition: OgreGpuProgramParams.h:92
Ogre::GpuProgramParameters::ACT_TRANSPOSE_VIEW_MATRIX
Provides transpose of view matrix.
Definition: OgreGpuProgramParams.h:737
Ogre::GPV_LIGHTS
Varies with light setup.
Definition: OgreGpuProgramParams.h:108
Ogre::GPV_PASS_ITERATION_NUMBER
Varies with pass iteration number.
Definition: OgreGpuProgramParams.h:110
Ogre::GpuNamedConstants::map
GpuConstantDefinitionMap map
Map of parameter names to GpuConstantDefinition.
Definition: OgreGpuProgramParams.h:364
Ogre::GpuSharedParametersUsage::_setRenderSystemData
void _setRenderSystemData(const Any &data) const
Internal method that the RenderSystem might use to store optional data.
Definition: OgreGpuProgramParams.h:665
Ogre::GpuLogicalIndexUse::physicalIndex
size_t physicalIndex
Physical buffer index.
Definition: OgreGpuProgramParams.h:434
Ogre::GpuProgramParameters::getFloatPointer
float * getFloatPointer(size_t pos)
Get a pointer to the &#39;nth&#39; item in the float buffer.
Definition: OgreGpuProgramParams.h:1600
Ogre::GpuProgramParameters::AutoConstantType
AutoConstantType
Defines the types of automatically updated values that may be bound to GpuProgram parameters...
Definition: OgreGpuProgramParams.h:708
Ogre::GpuProgramParameters::mFloatLogicalToPhysical
GpuLogicalBufferStructPtr mFloatLogicalToPhysical
Logical index to physical index map - for low-level programs or high-level programs which pass params...
Definition: OgreGpuProgramParams.h:1266
Ogre::GpuProgramParameters::SubroutineMap
HashMap< unsigned int, String > SubroutineMap
Definition: OgreGpuProgramParams.h:1251
Ogre::GpuProgramParameters::ACT_SCENE_DEPTH_RANGE
Provides information about the depth range of the scene as viewed from the current camera...
Definition: OgreGpuProgramParams.h:1116
Ogre::GpuConstantDefinitionIterator
ConstMapIterator< GpuConstantDefinitionMap > GpuConstantDefinitionIterator
Definition: OgreGpuProgramParams.h:352
Ogre::GpuParamVariability
GpuParamVariability
The variability of a GPU parameter, as derived from auto-params targeting it.
Definition: OgreGpuProgramParams.h:101
Ogre::GpuSharedParameters::getFloatConstantList
const FloatConstantList & getFloatConstantList() const
Get a reference to the list of float constants.
Definition: OgreGpuProgramParams.h:598
Ogre::Serializer
Generic class for serialising data to / from binary stream-based files.
Definition: OgreSerializer.h:50
Ogre::GpuSharedParameters::_getRenderSystemData
const Any & _getRenderSystemData() const
Internal method that the RenderSystem might use to store optional data.
Definition: OgreGpuProgramParams.h:607
Ogre::GCT_DOUBLE3
Definition: OgreGpuProgramParams.h:84
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::GpuProgramParameters::ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX
Provides transpose of concatenated world, view and projection matrices.
Definition: OgreGpuProgramParams.h:798
Ogre::GpuProgramParameters::ACT_LIGHT_DIFFUSE_COLOUR_ARRAY
Array of light diffuse colours (count set by extra param)
Definition: OgreGpuProgramParams.h:878
Ogre::GpuProgramParameters::ACT_WORLD_SCALE_SHEAR_MATRIX_ARRAY_3x4
The scale and shear components of the current array of world matrices.
Definition: OgreGpuProgramParams.h:728
Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_ARRAY
Array of light positions in world space (count set by extra param)
Definition: OgreGpuProgramParams.h:888
Ogre::GpuProgramParameters::ACT_FPS
provides the calculated frames per second, returned as a floating point value.
Definition: OgreGpuProgramParams.h:1039
Ogre::GpuNamedConstantsPtr
SharedPtr< GpuNamedConstants > GpuNamedConstantsPtr
Definition: OgreGpuProgramParams.h:413
Ogre::GpuLogicalIndexUse
Structure recording the use of a physical buffer by a logical parameter index.
Definition: OgreGpuProgramParams.h:431
Ogre::GpuConstantDefinition::GpuConstantDefinition
GpuConstantDefinition()
Definition: OgreGpuProgramParams.h:343
Ogre::GpuProgramParameters::ACT_SPOTLIGHT_VIEWPROJ_MATRIX
The view/projection matrix of a given spotlight.
Definition: OgreGpuProgramParams.h:976
Ogre::GCT_MATRIX_DOUBLE_3X3
Definition: OgreGpuProgramParams.h:90
Ogre::GpuProgramParameters::~GpuProgramParameters
~GpuProgramParameters()
Definition: OgreGpuProgramParams.h:1310
Ogre::GpuProgramParameters::ACT_SHADOW_COLOUR
Provides the fixed shadow colour as configured via SceneManager::setShadowColour; useful for integrat...
Definition: OgreGpuProgramParams.h:1135
Ogre::GpuProgramParameters::ACT_VIEW_DIRECTION
view parameters
Definition: OgreGpuProgramParams.h:1066
Ogre::GpuLogicalBufferStruct::GpuLogicalBufferStruct
GpuLogicalBufferStruct()
Definition: OgreGpuProgramParams.h:455
Ogre::GpuProgramParameters::ACT_COSTIME_0_X
Cosine of "Time0_X". Equivalent to RenderMonkey&#39;s "CosTime0_X".
Definition: OgreGpuProgramParams.h:997
Ogre::GpuSharedParameters::getFrameLastUpdated
size_t getFrameLastUpdated() const
Get the frame in which this shared parameter set was last updated.
Definition: OgreGpuProgramParams.h:546
Ogre::GCT_SAMPLER1DSHADOW
Definition: OgreGpuProgramParams.h:65
Ogre::GpuProgramParameters::ACT_INVERSE_VIEW_MATRIX
The current view matrix, inverted.
Definition: OgreGpuProgramParams.h:733
Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_DIFFUSE_COLOUR
The derived light diffuse colour (index determined by setAutoConstant call), with &#39;r&#39;...
Definition: OgreGpuProgramParams.h:932
Ogre::GpuSharedParametersPtr
SharedPtr< GpuSharedParameters > GpuSharedParametersPtr
Shared pointer used to hold references to GpuProgramParameters instances.
Definition: OgreGpuProgramParams.h:612
Ogre::GpuProgramParameters::ACT_SURFACE_ALPHA_REJECTION_VALUE
Surface alpha rejection value, not as set in Pass::setAlphaRejectionValue, but a floating number betw...
Definition: OgreGpuProgramParams.h:832
OgreSharedPtr.h
Ogre::GpuConstantDefinition::isFloat
bool isFloat() const
Definition: OgreGpuProgramParams.h:138
Ogre::GpuProgramParameters::ACT_INVERSE_PROJECTION_MATRIX
Provides inverse of projection matrix.
Definition: OgreGpuProgramParams.h:749
Ogre::GpuNamedConstants
Struct collecting together the information for named constants.
Definition: OgreGpuProgramParams.h:355
Ogre::GpuProgramParameters::mIntLogicalToPhysical
GpuLogicalBufferStructPtr mIntLogicalToPhysical
Logical index to physical index map - for low-level programs or high-level programs which pass params...
Definition: OgreGpuProgramParams.h:1272
Ogre::GpuProgramParameters::ACT_SINTIME_0_2PI
Sine of "Time0_2PI". Equivalent to RenderMonkey&#39;s "SinTime0_2PI".
Definition: OgreGpuProgramParams.h:1029
Ogre::GpuProgramParameters::ACT_TRANSPOSE_WORLD_MATRIX
Provides transpose of world matrix.
Definition: OgreGpuProgramParams.h:717
Ogre::GpuSharedParametersUsage::mSharedParams
GpuSharedParametersPtr mSharedParams
Definition: OgreGpuProgramParams.h:622
Ogre::GCT_MATRIX_3X4
Definition: OgreGpuProgramParams.h:73
Ogre::GpuProgramParameters::ACT_RENDER_TARGET_FLIPPING
render target related values
Definition: OgreGpuProgramParams.h:809
Ogre::GpuProgramParameters::ACT_LIGHT_DISTANCE_OBJECT_SPACE
The distance of the light from the center of the object a useful approximation as an alternative to p...
Definition: OgreGpuProgramParams.h:870
Ogre::GCT_SAMPLER2D
Definition: OgreGpuProgramParams.h:61
Ogre::GpuProgramParameters::ACT_AMBIENT_LIGHT_COLOUR
The ambient light colour set in the scene.
Definition: OgreGpuProgramParams.h:840
Ogre::GpuSharedParametersUsage::getTargetParams
GpuProgramParameters * getTargetParams() const
Definition: OgreGpuProgramParams.h:662
Ogre::GpuProgramParameters::ACT_LIGHT_DIFFUSE_COLOUR
Light diffuse colour (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:843
Ogre::GCT_MATRIX_3X2
Definition: OgreGpuProgramParams.h:71
Ogre::GpuNamedConstants::doubleBufferSize
size_t doubleBufferSize
Total size of the double buffer required.
Definition: OgreGpuProgramParams.h:360
Ogre::GpuProgramParameters::ACT_WORLD_DUALQUATERNION_ARRAY_2x4
The current array of world matrices transformed to an array of dual quaternions, represented as a 2x4...
Definition: OgreGpuProgramParams.h:726
Ogre::GpuProgramParameters::ACT_TIME_0_X
Single float value, which repeats itself based on given as parameter "cycle time".
Definition: OgreGpuProgramParams.h:995
Ogre::GpuProgramParameters::mFloatConstants
FloatConstantList mFloatConstants
Packed list of floating-point constants (physical indexing)
Definition: OgreGpuProgramParams.h:1259
Ogre::FloatConstantList
vector< float >::type FloatConstantList
Definition of container that holds the current float constants.
Definition: OgreGpuProgramParams.h:463
Ogre::Vector4
4-dimensional homogeneous vector.
Definition: OgreVector4.h:45
Ogre::GpuProgramParameters::ACT_TEXTURE_MATRIX
Provides the current transform matrix of the texture unit (index determined by setAutoConstant call)...
Definition: OgreGpuProgramParams.h:1152
Ogre::ConstMapIterator
Concrete IteratorWrapper for const access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:352
Ogre::GpuProgramParameters::ACT_LIGHT_CUSTOM
Binds custom per-light constants to the shaders.
Definition: OgreGpuProgramParams.h:1167
Ogre::GpuProgramParameters::ACT_DERIVED_AMBIENT_LIGHT_COLOUR
The derived ambient light colour, with &#39;r&#39;, &#39;g&#39;, &#39;b&#39; components filled with product of surface ambien...
Definition: OgreGpuProgramParams.h:920
Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX
Provides inverse transpose of projection matrix.
Definition: OgreGpuProgramParams.h:757
Ogre::GpuSharedParameters::mIntConstants
IntConstantList mIntConstants
Definition: OgreGpuProgramParams.h:496
Ogre::GpuProgramParameters::ACT_TIME
provides current elapsed time
Definition: OgreGpuProgramParams.h:991
Ogre::Vector2
Standard 2-dimensional vector.
Definition: OgreVector2.h:51
Ogre::Serializer::Endian
Endian
The endianness of written files.
Definition: OgreSerializer.h:57
Ogre::GpuNamedConstantsSerializer
Simple class for loading / saving GpuNamedConstants.
Definition: OgreGpuProgramParams.h:416
Ogre::GpuNamedConstants::intBufferSize
size_t intBufferSize
Total size of the int buffer required.
Definition: OgreGpuProgramParams.h:362
Ogre::GpuProgramParameters::AutoConstantEntry::data
size_t data
Definition: OgreGpuProgramParams.h:1228
Ogre::ColourValue
Class representing colour.
Definition: OgreColourValue.h:57
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::GpuConstantDefinition::physicalIndex
size_t physicalIndex
Physical start index in buffer (either float, double or int buffer)
Definition: OgreGpuProgramParams.h:127
Ogre::GpuLogicalIndexUse::GpuLogicalIndexUse
GpuLogicalIndexUse(size_t bufIdx, size_t curSz, uint16 v)
Definition: OgreGpuProgramParams.h:442
Ogre::GpuConstantDefinition::getElementSize
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...
Definition: OgreGpuProgramParams.h:232
Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_ARRAY
Array of light directions in world space (count set by extra param)
Definition: OgreGpuProgramParams.h:894
Ogre::GpuProgramParameters::hasNamedParameters
bool hasNamedParameters() const
Does this parameter set include named parameters?
Definition: OgreGpuProgramParams.h:1326
Ogre::GpuLogicalBufferStruct::bufferSize
size_t bufferSize
Shortcut to know the buffer size needs.
Definition: OgreGpuProgramParams.h:454
Ogre::GpuSharedParameters::mDoubleConstants
DoubleConstantList mDoubleConstants
Definition: OgreGpuProgramParams.h:495
Ogre::GpuProgramParameters::ACT_WORLDVIEW_MATRIX
The current world & view matrices concatenated.
Definition: OgreGpuProgramParams.h:777
Ogre::GpuProgramParameters::mAutoConstants
AutoConstantList mAutoConstants
List of automatically updated parameters.
Definition: OgreGpuProgramParams.h:1276
Ogre::GpuProgramParameters::ACT_PASS_NUMBER
provides the pass index number within the technique of the active materil.
Definition: OgreGpuProgramParams.h:1091
Ogre::GpuProgramParameters::ACT_TEXTURE_WORLDVIEWPROJ_MATRIX_ARRAY
Array of world/view/projection matrices of the first n texture projection frustums.
Definition: OgreGpuProgramParams.h:974
std
Definition: OgreSmallVector.h:798
Ogre::GpuProgramParameters::ACT_INVERSE_VIEWPROJ_MATRIX
Provides inverse of concatenated view and projection matrices.
Definition: OgreGpuProgramParams.h:765
OGRE_MUTEX
#define OGRE_MUTEX(name)
Definition: OgreThreadDefinesBoost.h:47
Ogre::GCT_MATRIX_DOUBLE_2X3
Definition: OgreGpuProgramParams.h:87
Ogre::GpuProgramParameters::AutoConstantEntry
Structure recording the use of an automatic parameter.
Definition: OgreGpuProgramParams.h:1215
Ogre::GCT_INT1
Definition: OgreGpuProgramParams.h:77
Ogre::SharedPtr::isNull
bool isNull(void) const
Definition: OgreSharedPtr.h:275
Ogre::GpuSharedParameters::mRenderSystemData
Any mRenderSystemData
Definition: OgreGpuProgramParams.h:500
Ogre::GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX
view matrices.
Definition: OgreGpuProgramParams.h:790
Ogre::GpuProgramParameters::ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED_ARRAY
Array of light specular colours scaled by light power (count set by extra param)
Definition: OgreGpuProgramParams.h:884
Ogre::GpuSharedParameters::getName
const String & getName()
Get the name of this shared parameter set.
Definition: OgreGpuProgramParams.h:513
Ogre::GCT_MATRIX_DOUBLE_4X4
Definition: OgreGpuProgramParams.h:94
Ogre::GpuProgramParameters::ACT_LIGHT_POWER_SCALE_ARRAY
Array of light power levels, a single scalar as set in Light::setPowerScale (count set by extra param...
Definition: OgreGpuProgramParams.h:907
Ogre::GpuProgramParameters::ACT_WORLD_MATRIX_ARRAY
The current array of world matrices, used for blending.
Definition: OgreGpuProgramParams.h:724
Ogre::GpuProgramParameters::AutoConstantEntry::elementCount
size_t elementCount
The number of elements per individual entry in this constant Used in case people used packed elements...
Definition: OgreGpuProgramParams.h:1225
Ogre::GpuSharedParametersUsage::CopyDataList
vector< CopyDataEntry >::type CopyDataList
Definition: OgreGpuProgramParams.h:631
Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX
The current world & view matrices concatenated, then inverted & transposed.
Definition: OgreGpuProgramParams.h:785
Ogre::GpuSharedParameters::mVersion
unsigned long mVersion
Version number of the definitions in this buffer.
Definition: OgreGpuProgramParams.h:506
Ogre::GCT_MATRIX_4X3
Definition: OgreGpuProgramParams.h:75
Ogre::GpuProgramParametersSharedPtr
SharedPtr< GpuProgramParameters > GpuProgramParametersSharedPtr
Shared pointer used to hold references to GpuProgramParameters instances.
Definition: OgreGpuProgramParams.h:2050
Ogre::Any
Variant type that can hold Any other type.
Definition: OgreAny.h:56
Ogre::GpuProgramParameters::_getRenderSystemData
const Any & _getRenderSystemData() const
Internal method that the RenderSystem might use to store optional data.
Definition: OgreGpuProgramParams.h:2023
Ogre::GpuProgramParameters::ACT_LIGHT_SPECULAR_COLOUR
Light specular colour (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:845
Ogre::GpuProgramParameters::SubroutineIterator
HashMap< unsigned int, String >::const_iterator SubroutineIterator
Definition: OgreGpuProgramParams.h:1252
Ogre::GpuProgramParameters::mDoubleConstants
DoubleConstantList mDoubleConstants
Packed list of double-point constants (physical indexing)
Definition: OgreGpuProgramParams.h:1261
Ogre::GpuProgramParameters::getIntPointer
int * getIntPointer(size_t pos)
Get a pointer to the &#39;nth&#39; item in the int buffer.
Definition: OgreGpuProgramParams.h:1612
Ogre::GCT_MATRIX_2X2
Definition: OgreGpuProgramParams.h:68
Ogre::GpuProgramParameters::ACT_SURFACE_DIFFUSE_COLOUR
Surface diffuse colour, as set in Pass::setDiffuse.
Definition: OgreGpuProgramParams.h:824
Ogre::GCT_DOUBLE2
Definition: OgreGpuProgramParams.h:83
Ogre::GpuProgramParameters::AutoConstantEntry::AutoConstantEntry
AutoConstantEntry(AutoConstantType theType, size_t theIndex, size_t theData, uint16 theVariability, size_t theElemCount=4)
Definition: OgreGpuProgramParams.h:1234
Ogre::GpuProgramParameters::getDoublePointer
const double * getDoublePointer(size_t pos) const
Get a pointer to the &#39;nth&#39; item in the double buffer.
Definition: OgreGpuProgramParams.h:1608
Ogre::GCT_MATRIX_DOUBLE_2X2
Definition: OgreGpuProgramParams.h:86
Ogre::GpuProgramParameters::ACT_VIEWPROJ_MATRIX
The current view & projection matrices concatenated.
Definition: OgreGpuProgramParams.h:761
Ogre::GCT_FLOAT3
Definition: OgreGpuProgramParams.h:58
Ogre::GpuProgramParameters::ACT_WORLD_MATRIX_ARRAY_3x4
The current array of world matrices, as a 3x4 matrix, used for blending.
Definition: OgreGpuProgramParams.h:722
Ogre::GpuSharedParameters::getIntPointer
const int * getIntPointer(size_t pos) const
Get a pointer to the &#39;nth&#39; item in the int buffer.
Definition: OgreGpuProgramParams.h:595
Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_WORLD_MATRIX
The current world matrix, inverted & transposed.
Definition: OgreGpuProgramParams.h:719
Ogre::GpuProgramParameters::AutoConstantEntry::physicalIndex
size_t physicalIndex
The target (physical) constant index.
Definition: OgreGpuProgramParams.h:1221
Ogre::GpuProgramParameters::AutoConstantDefinition::name
String name
Definition: OgreGpuProgramParams.h:1197
Ogre::GpuProgramParameters::ACT_SURFACE_EMISSIVE_COLOUR
Surface emissive colour, as set in Pass::setSelfIllumination.
Definition: OgreGpuProgramParams.h:828
Ogre::GpuSharedParametersUsage::mParams
GpuProgramParameters * mParams
Definition: OgreGpuProgramParams.h:624
Ogre::GCT_SAMPLER1D
Definition: OgreGpuProgramParams.h:60
Ogre::GpuProgramParameters::ACT_SHADOW_EXTRUSION_DISTANCE
The distance a shadow volume should be extruded when using finite extrusion programs.
Definition: OgreGpuProgramParams.h:960
Ogre::GpuProgramParameters::ACT_VIEW_SIDE_VECTOR
This variable provides the view side vector (world space).
Definition: OgreGpuProgramParams.h:1070
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
Ogre::GpuProgramParameters::ACT_CAMERA_POSITION_OBJECT_SPACE
The current camera&#39;s position in object space.
Definition: OgreGpuProgramParams.h:964
Ogre::GCT_SAMPLERRECT
Definition: OgreGpuProgramParams.h:64
Ogre::GCT_SUBROUTINE
Definition: OgreGpuProgramParams.h:81
Ogre::GpuProgramParameters::ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED
Light diffuse colour pre-scaled by Light::setPowerScale (index determined by setAutoConstant call) ...
Definition: OgreGpuProgramParams.h:874
Ogre::GpuConstantDefinitionMap
map< String, GpuConstantDefinition >::type GpuConstantDefinitionMap
Definition: OgreGpuProgramParams.h:351
Ogre::GpuSharedParameters::getFloatPointer
float * getFloatPointer(size_t pos)
Get a pointer to the &#39;nth&#39; item in the float buffer.
Definition: OgreGpuProgramParams.h:585
Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY
Array of derived light diffuse colours (count set by extra param)
Definition: OgreGpuProgramParams.h:941
Ogre::GpuProgramParameters::AutoConstantEntry::variability
uint16 variability
The variability of this parameter (see GpuParamVariability)
Definition: OgreGpuProgramParams.h:1232
Ogre::GpuSharedParameters::getDoubleConstantList
const DoubleConstantList & getDoubleConstantList() const
Get a reference to the list of double constants.
Definition: OgreGpuProgramParams.h:600
Ogre::GpuProgramParameters::ACT_VIEW_MATRIX
The current view matrix.
Definition: OgreGpuProgramParams.h:731
Ogre::GpuNamedConstants::GpuNamedConstants
GpuNamedConstants()
Definition: OgreGpuProgramParams.h:366
OgrePrerequisites.h
Ogre::GpuLogicalIndexUse::variability
uint16 variability
How the contents of this slot vary.
Definition: OgreGpuProgramParams.h:438
Ogre::GpuProgramParameters::ACT_DERIVED_SCENE_COLOUR
The derived scene colour, with &#39;r&#39;, &#39;g&#39; and &#39;b&#39; components filled with sum of derived ambient light c...
Definition: OgreGpuProgramParams.h:925
Ogre::GpuSharedParameters::getDoublePointer
double * getDoublePointer(size_t pos)
Get a pointer to the &#39;nth&#39; item in the double buffer.
Definition: OgreGpuProgramParams.h:589
Ogre::GpuProgramParameters::ACT_TRANSPOSE_PROJECTION_MATRIX
Provides transpose of projection matrix.
Definition: OgreGpuProgramParams.h:753
Ogre::GpuProgramParameters::ACT_SPOTLIGHT_WORLDVIEWPROJ_MATRIX
The view/projection matrix of a given spotlight projection frustum, combined with the current world m...
Definition: OgreGpuProgramParams.h:982
Ogre::GpuProgramParameters::mDoubleLogicalToPhysical
GpuLogicalBufferStructPtr mDoubleLogicalToPhysical
Logical index to physical index map - for low-level programs or high-level programs which pass params...
Definition: OgreGpuProgramParams.h:1269
Ogre::GpuSharedParameters::mFloatConstants
FloatConstantList mFloatConstants
Definition: OgreGpuProgramParams.h:494
Ogre::GpuProgramParameters::AutoConstantIterator
ConstVectorIterator< AutoConstantList > AutoConstantIterator
Definition: OgreGpuProgramParams.h:1673
Ogre::GpuProgramParameters::AutoConstantDefinition::elementCount
size_t elementCount
Definition: OgreGpuProgramParams.h:1198
Ogre::GpuProgramParameters::ACT_TRANSPOSE_VIEWPROJ_MATRIX
Provides transpose of concatenated view and projection matrices.
Definition: OgreGpuProgramParams.h:769
Ogre::GCT_FLOAT4
Definition: OgreGpuProgramParams.h:59
Ogre::GpuSharedParametersUsage
This class records the usage of a set of shared parameters in a concrete set of GpuProgramParameters...
Definition: OgreGpuProgramParams.h:619
Ogre::GCT_FLOAT1
Definition: OgreGpuProgramParams.h:56
Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX
Provides inverse transpose of concatenated world, view and projection matrices.
Definition: OgreGpuProgramParams.h:802
Ogre::GpuProgramParameters::ACT_SPOTLIGHT_WORLDVIEWPROJ_MATRIX_ARRAY
An array of the view/projection matrix of a given spotlight projection frustum, combined with the cur...
Definition: OgreGpuProgramParams.h:986
Ogre::GPV_GLOBAL
No variation except by manual setting - the default.
Definition: OgreGpuProgramParams.h:104
Ogre::GpuProgramParameters::ACT_TANTIME_0_X
Tangent of "Time0_X". Equivalent to RenderMonkey&#39;s "TanTime0_X".
Definition: OgreGpuProgramParams.h:1001
Ogre::GpuProgramParameters::AutoConstantDefinition
Structure defining an auto constant that&#39;s available for use in a parameters object.
Definition: OgreGpuProgramParams.h:1194
Ogre::GpuSharedParametersUsage::mCopyDataList
CopyDataList mCopyDataList
Definition: OgreGpuProgramParams.h:633
Ogre::GpuProgramParameters::mNamedConstants
GpuNamedConstantsPtr mNamedConstants
Mapping from parameter names to def - high-level programs are expected to populate this...
Definition: OgreGpuProgramParams.h:1274
Ogre::GpuProgramParameters::mSubroutineMap
SubroutineMap mSubroutineMap
Definition: OgreGpuProgramParams.h:1255
Ogre::GpuProgramParameters::ACT_INVERSE_WORLDVIEWPROJ_MATRIX
Provides inverse of concatenated world, view and projection matrices.
Definition: OgreGpuProgramParams.h:794
Ogre::GpuProgramParameters::getFloatPointer
const float * getFloatPointer(size_t pos) const
Get a pointer to the &#39;nth&#39; item in the float buffer.
Definition: OgreGpuProgramParams.h:1602
Ogre::GpuNamedConstants::msGenerateAllConstantDefinitionArrayEntries
static bool msGenerateAllConstantDefinitionArrayEntries
Indicates whether all array entries will be generated and added to the definitions map...
Definition: OgreGpuProgramParams.h:411
Ogre::GpuProgramParameters::ACT_LIGHT_POSITION
A light position in world space (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:855
Ogre::GpuProgramParameters::getDoubleConstantList
const DoubleConstantList & getDoubleConstantList() const
Get a reference to the list of double constants.
Definition: OgreGpuProgramParams.h:1604
Ogre::GpuProgramParameters::getDoublePointer
double * getDoublePointer(size_t pos)
Get a pointer to the &#39;nth&#39; item in the double buffer.
Definition: OgreGpuProgramParams.h:1606
Ogre::GpuProgramParameters::AutoConstantDefinition::dataType
ACDataType dataType
The type of any extra data.
Definition: OgreGpuProgramParams.h:1202
Ogre::GpuLogicalBufferStruct
Container struct to allow params to safely & update shared list of logical buffer assignments...
Definition: OgreGpuProgramParams.h:447
Ogre::GpuSharedParametersUsage::mCopyDataVersion
unsigned long mCopyDataVersion
Version of shared params we based the copydata on.
Definition: OgreGpuProgramParams.h:639
Ogre::GpuProgramParameters::AutoConstantDefinition::elementType
ElementType elementType
The type of the constant in the program.
Definition: OgreGpuProgramParams.h:1200
Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_VIEW_MATRIX
Provides inverse transpose of view matrix.
Definition: OgreGpuProgramParams.h:741
Ogre::GCT_INT3
Definition: OgreGpuProgramParams.h:79
Ogre::GpuProgramParameters::_setRenderSystemData
void _setRenderSystemData(const Any &data) const
Internal method that the RenderSystem might use to store optional data.
Definition: OgreGpuProgramParams.h:2021
Ogre::GpuProgramParameters::getAutoConstantList
const AutoConstantList & getAutoConstantList() const
Get a reference to the list of auto constant bindings.
Definition: OgreGpuProgramParams.h:1616
Ogre::GpuProgramParameters::ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED
Light specular colour pre-scaled by Light::setPowerScale (index determined by setAutoConstant call) ...
Definition: OgreGpuProgramParams.h:876
Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_VIEW_SPACE
A light position in view space (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:859
Ogre::GpuProgramParameters::ACT_TIME_0_X_PACKED
Vector of "Time0_X", "SinTime0_X", "CosTime0_X", "TanTime0_X".
Definition: OgreGpuProgramParams.h:1005
Ogre::GCT_DOUBLE4
Definition: OgreGpuProgramParams.h:85
OgreRenderOperation.h
Ogre::GpuSharedParameters
A group of manually updated parameters that are shared between many parameter sets.
Definition: OgreGpuProgramParams.h:490
Ogre::GpuProgramParameters::ACT_VIEW_UP_VECTOR
This variable provides the view up vector (world space).
Definition: OgreGpuProgramParams.h:1074
Ogre::GCT_UNKNOWN
Definition: OgreGpuProgramParams.h:95
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::GCT_DOUBLE1
Definition: OgreGpuProgramParams.h:82
Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_VIEW_SPACE
A light direction in view space (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:865
Ogre::GpuProgramParameters::ACT_SINTIME_0_1
Sine of "Time0_1". Equivalent to RenderMonkey&#39;s "SinTime0_1".
Definition: OgreGpuProgramParams.h:1014
Ogre::GpuSharedParametersUsage::CopyDataEntry::dstDefinition
const GpuConstantDefinition * dstDefinition
Definition: OgreGpuProgramParams.h:629
Ogre::GCT_SAMPLER3D
Definition: OgreGpuProgramParams.h:62
Ogre::GpuProgramParameters::ACT_LIGHT_CASTS_SHADOWS_ARRAY
Returns (int) 1 if the given light casts shadows, 0 otherwise (index set in extra param) ...
Definition: OgreGpuProgramParams.h:954
Ogre::GpuProgramParameters::getIntConstantList
const IntConstantList & getIntConstantList() const
Get a reference to the list of int constants.
Definition: OgreGpuProgramParams.h:1610
Ogre::GpuProgramParameters::ACT_SHADOW_SCENE_DEPTH_RANGE_ARRAY
Provides an array of information about the depth range of the scene as viewed from a given shadow cam...
Definition: OgreGpuProgramParams.h:1130
Ogre::GpuProgramParameters::AutoConstantEntry::fData
Real fData
Definition: OgreGpuProgramParams.h:1229
Ogre::GpuProgramParameters::ACT_FAR_CLIP_DISTANCE
This variable provides the far clip distance as a floating point value.
Definition: OgreGpuProgramParams.h:1086
Ogre::GpuConstantDefinition::constType
GpuConstantType constType
Data type.
Definition: OgreGpuProgramParams.h:125
Ogre::GpuSharedParametersUsage::CopyDataEntry
Definition: OgreGpuProgramParams.h:626
Ogre::GpuSharedParameters::getFloatPointer
const float * getFloatPointer(size_t pos) const
Get a pointer to the &#39;nth&#39; item in the float buffer.
Definition: OgreGpuProgramParams.h:587
Ogre::GpuProgramParameters::getPassIterationNumberIndex
size_t getPassIterationNumberIndex() const
Get the physical buffer index of the pass iteration number constant.
Definition: OgreGpuProgramParams.h:1988
Ogre::GpuProgramParameters::ACT_INVERSE_VIEWPORT_WIDTH
This variable represents 1.0/ViewportWidth.
Definition: OgreGpuProgramParams.h:1052
Ogre::GpuProgramParameters::ACT_LOD_CAMERA_POSITION_OBJECT_SPACE
Provides the position of the LOD camera in object space, allowing you to perform separate LOD calcula...
Definition: OgreGpuProgramParams.h:1165
Ogre::GpuProgramParameters::ACT_SURFACE_SHININESS
Surface shininess, as set in Pass::setShininess.
Definition: OgreGpuProgramParams.h:830
Ogre::GpuProgramParameters::getIntLogicalBufferStruct
const GpuLogicalBufferStructPtr & getIntLogicalBufferStruct() const
Get the current list of mappings from low-level logical param indexes to physical buffer locations in...
Definition: OgreGpuProgramParams.h:1596
Ogre::GpuProgramParameters::ACT_FOV
This variable provides the field of view as a floating point value.
Definition: OgreGpuProgramParams.h:1078
Ogre::GpuProgramParameters::ACT_TIME_0_1_PACKED
Vector of "Time0_1", "SinTime0_1", "CosTime0_1", "TanTime0_1".
Definition: OgreGpuProgramParams.h:1020
Ogre::GpuProgramParameters::ACT_INVERSE_VIEWPORT_HEIGHT
This variable represents 1.0/ViewportHeight.
Definition: OgreGpuProgramParams.h:1056
Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY
Array of derived light specular colours (count set by extra param)
Definition: OgreGpuProgramParams.h:943
Ogre::GpuProgramParameters::mIgnoreMissingParams
bool mIgnoreMissingParams
flag to indicate if names not found will be ignored
Definition: OgreGpuProgramParams.h:1282
Ogre::GpuProgramParameters::ACT_COSTIME_0_1
Cosine of "Time0_1". Equivalent to RenderMonkey&#39;s "CosTime0_1".
Definition: OgreGpuProgramParams.h:1012
Ogre::GpuProgramParameters::setIgnoreMissingParams
void setIgnoreMissingParams(bool state)
Tells the program whether to ignore missing parameters or not.
Definition: OgreGpuProgramParams.h:1725
Ogre::GpuProgramParameters::ElementType
ElementType
Defines the base element type of the auto constant.
Definition: OgreGpuProgramParams.h:1186
Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_OBJECT_SPACE
A light position in object space (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:857
Ogre::GpuProgramParameters::ACDataType
ACDataType
Defines the type of the extra data item used by the auto constant.
Definition: OgreGpuProgramParams.h:1175
Ogre::GpuProgramParameters::ET_INT
Definition: OgreGpuProgramParams.h:1187
Ogre::GCT_INT2
Definition: OgreGpuProgramParams.h:78
Ogre::GpuProgramParameters::AutoConstantList
vector< AutoConstantEntry >::type AutoConstantList
Definition: OgreGpuProgramParams.h:1246
OgreHeaderSuffix.h
Ogre::GpuProgramParameters::AutoConstantEntry::paramType
AutoConstantType paramType
The type of parameter.
Definition: OgreGpuProgramParams.h:1219
Ogre::GpuLogicalIndexUse::currentSize
size_t currentSize
Current physical size allocation.
Definition: OgreGpuProgramParams.h:436
Ogre::GpuProgramParameters::ACT_SURFACE_SPECULAR_COLOUR
Surface specular colour, as set in Pass::setSpecular.
Definition: OgreGpuProgramParams.h:826
Ogre::GpuConstantDefinition::arraySize
size_t arraySize
Length of array.
Definition: OgreGpuProgramParams.h:134
Ogre::GCT_SAMPLERCUBE
Definition: OgreGpuProgramParams.h:63
Ogre::GpuConstantDefinition::isDouble
static bool isDouble(GpuConstantType c)
Definition: OgreGpuProgramParams.h:170
OgreThreadHeaders.h
OgreAny.h
OgreIteratorWrappers.h
Ogre::GpuProgramParameters::ACT_FOG_PARAMS
Fog params: density, linear start, linear end, 1/(end-start)
Definition: OgreGpuProgramParams.h:818
Ogre::GpuConstantDefinition::variability
uint16 variability
How this parameter varies (bitwise combination of GpuProgramVariability)
Definition: OgreGpuProgramParams.h:136
Ogre::GpuLogicalBufferStructPtr
SharedPtr< GpuLogicalBufferStruct > GpuLogicalBufferStructPtr
Definition: OgreGpuProgramParams.h:457
Ogre::GpuProgramParameters::ACT_SINTIME_0_X
Sine of "Time0_X". Equivalent to RenderMonkey&#39;s "SinTime0_X".
Definition: OgreGpuProgramParams.h:999
Ogre::DoubleConstantList
vector< double >::type DoubleConstantList
Definition of container that holds the current double constants.
Definition: OgreGpuProgramParams.h:468
Ogre::GpuProgramParameters::ACDT_INT
the auto constant requires data of type int
Definition: OgreGpuProgramParams.h:1179
Ogre::GpuProgramParameters::ACT_PASS_ITERATION_NUMBER
provides the current iteration number of the pass.
Definition: OgreGpuProgramParams.h:1097
Ogre::GCT_MATRIX_3X3
Definition: OgreGpuProgramParams.h:72
Ogre::GpuProgramParameters::ACT_LIGHT_SPECULAR_COLOUR_ARRAY
Array of light specular colours (count set by extra param)
Definition: OgreGpuProgramParams.h:880
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::GpuProgramParameters::ACT_SURFACE_AMBIENT_COLOUR
Surface ambient colour, as set in Pass::setAmbient.
Definition: OgreGpuProgramParams.h:822
Ogre::GpuNamedConstants::floatBufferSize
size_t floatBufferSize
Total size of the float buffer required.
Definition: OgreGpuProgramParams.h:358
Ogre::GpuConstantDefinition::isSubroutine
bool isSubroutine() const
Definition: OgreGpuProgramParams.h:219
Ogre::GpuSharedParameters::getIntConstantList
const IntConstantList & getIntConstantList() const
Get a reference to the list of int constants.
Definition: OgreGpuProgramParams.h:602
Ogre::GpuSharedParameters::_setRenderSystemData
void _setRenderSystemData(const Any &data) const
Internal method that the RenderSystem might use to store optional data.
Definition: OgreGpuProgramParams.h:605
Ogre::GpuConstantDefinition::isFloat
static bool isFloat(GpuConstantType c)
Definition: OgreGpuProgramParams.h:143
Ogre::GpuLogicalIndexUse::GpuLogicalIndexUse
GpuLogicalIndexUse()
Definition: OgreGpuProgramParams.h:440
Ogre::GpuProgramParameters::getTransposeMatrices
bool getTransposeMatrices(void) const
Gets whether or not matrices are to be transposed when set.
Definition: OgreGpuProgramParams.h:1947
Ogre::GpuProgramParameters::ACT_SPOTLIGHT_PARAMS
Spotlight parameters, Vector4(innerFactor, outerFactor, falloff, isSpot) innerFactor and outerFactor ...
Definition: OgreGpuProgramParams.h:853
Ogre::GpuSharedParameters::mNamedConstants
GpuNamedConstants mNamedConstants
Definition: OgreGpuProgramParams.h:493
Ogre::GpuProgramParameters::ACT_TIME_0_1
Single float value, which represents scaled time value [0..1], which repeats itself based on given as...
Definition: OgreGpuProgramParams.h:1010
Ogre::GpuProgramParameters::ACT_VIEWPORT_WIDTH
viewport-related values
Definition: OgreGpuProgramParams.h:1044
Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY
Array of light positions in object space (count set by extra param)
Definition: OgreGpuProgramParams.h:890
Ogre::GPV_ALL
Full mask (16-bit)
Definition: OgreGpuProgramParams.h:114
Ogre::GpuProgramParameters::GpuSharedParamUsageList
vector< GpuSharedParametersUsage >::type GpuSharedParamUsageList
Definition: OgreGpuProgramParams.h:1248
Ogre::GpuProgramParameters::setTransposeMatrices
void setTransposeMatrices(bool val)
Sets whether or not we need to transpose the matrices passed in from the rest of OGRE.
Definition: OgreGpuProgramParams.h:1945
Ogre::GpuProgramParameters::ACT_TEXTURE_VIEWPROJ_MATRIX
The view/projection matrix of the assigned texture projection frustum.
Definition: OgreGpuProgramParams.h:966
Ogre::GpuProgramParameters::ACT_TEXTURE_SIZE
Provides texture size of the texture unit (index determined by setAutoConstant call).
Definition: OgreGpuProgramParams.h:1139
OgreSerializer.h
Ogre::GpuConstantDefinition::elementSize
size_t elementSize
Number of raw buffer slots per element (some programs pack each array element to float4, some do not)
Definition: OgreGpuProgramParams.h:132
Ogre::GpuSharedParameters::mName
String mName
Definition: OgreGpuProgramParams.h:497
Ogre::SharedPtr< DataStream >
Ogre::GpuProgramParameters::ACT_TEXTURE_WORLDVIEWPROJ_MATRIX
The view/projection matrix of the assigned texture projection frustum, combined with the current worl...
Definition: OgreGpuProgramParams.h:972
Ogre::GpuConstantType
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
Definition: OgreGpuProgramParams.h:54
Ogre::GpuProgramParameters::ACT_SHADOW_SCENE_DEPTH_RANGE
Provides information about the depth range of the scene as viewed from a given shadow camera...
Definition: OgreGpuProgramParams.h:1123
Ogre::GpuSharedParametersUsage::getSharedParams
GpuSharedParametersPtr getSharedParams() const
Definition: OgreGpuProgramParams.h:661
Ogre::ConstVectorIterator
Concrete IteratorWrapper for const access to the underlying container.
Definition: OgreIteratorWrapper.h:217
Ogre::vector
Definition: OgrePrerequisites.h:491
Ogre::GpuProgramParameters::ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED_ARRAY
Array of light diffuse colours scaled by light power (count set by extra param)
Definition: OgreGpuProgramParams.h:882
Ogre::GpuProgramParameters::ACT_ANIMATION_PARAMETRIC
Provides a parametric animation value [0..1], only available where the renderable specifically implem...
Definition: OgreGpuProgramParams.h:1103
Ogre::GpuProgramParameters::AutoConstantDefinition::acType
AutoConstantType acType
Definition: OgreGpuProgramParams.h:1196
Ogre::GpuLogicalBufferStruct::map
GpuLogicalIndexUseMap map
Map from logical index to physical buffer location.
Definition: OgreGpuProgramParams.h:452
Ogre::GpuProgramParameters::ACT_VIEWPORT_HEIGHT
Current viewport height (in pixels) as floating point value.
Definition: OgreGpuProgramParams.h:1048
OgreHeaderPrefix.h
Ogre::GpuProgramParameters::ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY
Array of distances of the lights from the center of the object a useful approximation as an alternati...
Definition: OgreGpuProgramParams.h:903
Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX
Provides inverse transpose of concatenated view and projection matrices.
Definition: OgreGpuProgramParams.h:773
Ogre::GpuSharedParametersUsage::mRenderSystemData
Any mRenderSystemData
Definition: OgreGpuProgramParams.h:636
Ogre::GCT_MATRIX_DOUBLE_3X4
Definition: OgreGpuProgramParams.h:91
Ogre::GpuProgramParameters::ACT_CUSTOM
A custom parameter which will come from the renderable, using &#39;data&#39; as the identifier.
Definition: OgreGpuProgramParams.h:988
Ogre::GpuSharedParameters::getDoublePointer
const double * getDoublePointer(size_t pos) const
Get a pointer to the &#39;nth&#39; item in the double buffer.
Definition: OgreGpuProgramParams.h:591
Ogre::GpuProgramParameters::getIntPointer
const int * getIntPointer(size_t pos) const
Get a pointer to the &#39;nth&#39; item in the int buffer.
Definition: OgreGpuProgramParams.h:1614
Ogre::GpuProgramParameters::ACT_INVERSE_TEXTURE_SIZE
Provides inverse texture size of the texture unit (index determined by setAutoConstant call)...
Definition: OgreGpuProgramParams.h:1143
Ogre::GpuProgramParameters::getFloatConstantList
const FloatConstantList & getFloatConstantList() const
Get a reference to the list of float constants.
Definition: OgreGpuProgramParams.h:1598
Ogre::GCT_MATRIX_2X3
Definition: OgreGpuProgramParams.h:69
Ogre::GpuProgramParameters::ACT_LIGHT_CASTS_SHADOWS
Returns (int) 1 if the given light casts shadows, 0 otherwise (index set in extra param) ...
Definition: OgreGpuProgramParams.h:952
Ogre::GpuProgramParameters::ACT_LIGHT_ATTENUATION
Light attenuation parameters, Vector4(range, constant, linear, quadric)
Definition: OgreGpuProgramParams.h:847
Ogre::GpuProgramParameters::getSubroutineMap
const SubroutineMap & getSubroutineMap() const
Get map with.
Definition: OgreGpuProgramParams.h:2046
Ogre::GpuProgramParameters::ACT_LIGHT_POWER_SCALE
Light power level, a single scalar as set in Light::setPowerScale (index determined by setAutoConstan...
Definition: OgreGpuProgramParams.h:872
Ogre::GCT_SAMPLER2DSHADOW
Definition: OgreGpuProgramParams.h:66
Ogre::GpuProgramParameters::getFloatLogicalBufferStruct
const GpuLogicalBufferStructPtr & getFloatLogicalBufferStruct() const
Get the current list of mappings from low-level logical param indexes to physical buffer locations in...
Definition: OgreGpuProgramParams.h:1558
Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_OBJECT_SPACE
A light direction in object space (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:863
Ogre::GCT_MATRIX_4X2
Definition: OgreGpuProgramParams.h:74
Ogre::GCT_SAMPLER2DARRAY
Definition: OgreGpuProgramParams.h:67
Ogre::GpuProgramParameters::getDoubleLogicalBufferStruct
const GpuLogicalBufferStructPtr & getDoubleLogicalBufferStruct() const
Retrieves the logical index relating to a physical index in the int buffer, for programs which suppor...
Definition: OgreGpuProgramParams.h:1576
Ogre::GpuProgramParameters::ACT_COSTIME_0_2PI
Cosine of "Time0_2PI". Equivalent to RenderMonkey&#39;s "CosTime0_2PI".
Definition: OgreGpuProgramParams.h:1027
Ogre::GpuProgramParameters::ACT_INVERSE_WORLDVIEW_MATRIX
The current world & view matrices concatenated, then inverted.
Definition: OgreGpuProgramParams.h:779
Ogre::GpuConstantDefinition::isDouble
bool isDouble() const
Definition: OgreGpuProgramParams.h:165
Ogre::GpuSharedParametersUsage::_getRenderSystemData
const Any & _getRenderSystemData() const
Internal method that the RenderSystem might use to store optional data.
Definition: OgreGpuProgramParams.h:667
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::GpuSharedParameters::getVersion
unsigned long getVersion() const
Get the version number of this shared parameter set, can be used to identify when changes have occurr...
Definition: OgreGpuProgramParams.h:535
Ogre::GpuProgramParameters::ACT_VERTEX_WINDING
-1 if the winding has been inverted (e.g.
Definition: OgreGpuProgramParams.h:813
Ogre::GpuProgramParameters::ACT_CAMERA_POSITION
The current camera&#39;s position in world space.
Definition: OgreGpuProgramParams.h:962
Ogre::GpuProgramParameters::ACT_LIGHT_NUMBER
The absolute light number of a local light index.
Definition: OgreGpuProgramParams.h:950
Ogre::GCT_MATRIX_2X4
Definition: OgreGpuProgramParams.h:70
Ogre::GpuProgramParameters::AutoConstantDefinition::AutoConstantDefinition
AutoConstantDefinition(AutoConstantType _acType, const String &_name, size_t _elementCount, ElementType _elementType, ACDataType _dataType)
Definition: OgreGpuProgramParams.h:1204
Ogre::GpuConstantDefinition
Information about predefined program constants.
Definition: OgreGpuProgramParams.h:122
Ogre::GpuProgramParameters::ACT_INVERSE_WORLD_MATRIX
The current world matrix, inverted.
Definition: OgreGpuProgramParams.h:713
Ogre::AutoParamDataSource
This utility class is used to hold the information used to generate the matrices and other informatio...
Definition: OgreAutoParamDataSource.h:60
Ogre::GCT_MATRIX_4X4
Definition: OgreGpuProgramParams.h:76
Ogre::GpuProgramParameters::mRenderSystemData
Any mRenderSystemData
Definition: OgreGpuProgramParams.h:1304
Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY
Array of light directions in object space (count set by extra param)
Definition: OgreGpuProgramParams.h:896
Ogre::GCT_MATRIX_DOUBLE_3X2
Definition: OgreGpuProgramParams.h:89
Ogre::IntConstantList
vector< int >::type IntConstantList
Definition of container that holds the current float constants.
Definition: OgreGpuProgramParams.h:473
Ogre::GpuProgramParameters::AutoConstantEntry::AutoConstantEntry
AutoConstantEntry(AutoConstantType theType, size_t theIndex, Real theData, uint16 theVariability, size_t theElemCount=4)
Definition: OgreGpuProgramParams.h:1239
Ogre::GpuProgramParameters::ACT_SPOTLIGHT_PARAMS_ARRAY
Spotlight parameters array of Vector4(innerFactor, outerFactor, falloff, isSpot) innerFactor and oute...
Definition: OgreGpuProgramParams.h:914
Ogre::GpuProgramParameters::hasAutoConstants
bool hasAutoConstants(void) const
Returns true if this instance has any automatic constants.
Definition: OgreGpuProgramParams.h:1684
Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_SPECULAR_COLOUR
The derived light specular colour (index determined by setAutoConstant call), with &#39;r&#39;...
Definition: OgreGpuProgramParams.h:938
Ogre::GpuProgramParameters::hasPassIterationNumber
bool hasPassIterationNumber() const
Does this parameters object have a pass iteration number constant?
Definition: OgreGpuProgramParams.h:1985
Ogre::GCT_MATRIX_DOUBLE_4X3
Definition: OgreGpuProgramParams.h:93
Ogre::GpuProgramParameters::ACT_LIGHT_COUNT
The number of active light sources (better than gl_MaxLights)
Definition: OgreGpuProgramParams.h:836
Ogre::GpuProgramParameters::mActivePassIterationIndex
size_t mActivePassIterationIndex
physical index for active pass iteration parameter real constant entry;
Definition: OgreGpuProgramParams.h:1284
Ogre::GpuProgramParameters::ACT_TANTIME_0_1
Tangent of "Time0_1". Equivalent to RenderMonkey&#39;s "TanTime0_1".
Definition: OgreGpuProgramParams.h:1016
Ogre::GpuProgramParameters::getAutoConstantCount
size_t getAutoConstantCount(void) const
Gets the number of int constants that have been set.
Definition: OgreGpuProgramParams.h:1677
Ogre::GPV_PER_OBJECT
Varies per object (based on an auto param usually), but not per light setup.
Definition: OgreGpuProgramParams.h:106
Ogre::GpuConstantDefinition::isSampler
bool isSampler() const
Definition: OgreGpuProgramParams.h:196
Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY
Array of light positions in view space (count set by extra param)
Definition: OgreGpuProgramParams.h:892
Ogre::GpuProgramParameters::ACT_VIEWPORT_SIZE
Packed of "ViewportWidth", "ViewportHeight", "ViewportWidthInverse", "ViewportHeightInverse".
Definition: OgreGpuProgramParams.h:1060
Ogre::GpuSharedParameters::mFrameLastUpdated
size_t mFrameLastUpdated
Not used when copying data, but might be useful to RS using shared buffers.
Definition: OgreGpuProgramParams.h:503
Ogre::GpuSharedParametersUsage::getName
const String & getName() const
Get the name of the shared parameter set.
Definition: OgreGpuProgramParams.h:659
Ogre::GCT_FLOAT2
Definition: OgreGpuProgramParams.h:57
Ogre::uint16
unsigned short uint16
Definition: OgrePlatform.h:360
Ogre::GpuProgramParameters::ACT_FOG_COLOUR
Fog colour.
Definition: OgreGpuProgramParams.h:816
Ogre::GpuProgramParameters::ACT_TIME_0_2PI
Single float value, which represents scaled time value [0..2*Pi], which repeats itself based on given...
Definition: OgreGpuProgramParams.h:1025
Ogre::GpuProgramParameters::ACT_WORLD_MATRIX
The current world matrix.
Definition: OgreGpuProgramParams.h:711
Ogre::GCT_INT4
Definition: OgreGpuProgramParams.h:80
Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION
A light direction in world space (index determined by setAutoConstant call)
Definition: OgreGpuProgramParams.h:861
Ogre::GpuProgramParameters::hasLogicalIndexedParameters
bool hasLogicalIndexedParameters() const
Does this parameter set include logically indexed parameters?
Definition: OgreGpuProgramParams.h:1332
Ogre::GpuProgramParameters::mIntConstants
IntConstantList mIntConstants
Packed list of integer constants (physical indexing)
Definition: OgreGpuProgramParams.h:1263
Ogre::GpuLogicalIndexUseMap
map< size_t, GpuLogicalIndexUse >::type GpuLogicalIndexUseMap
Definition: OgreGpuProgramParams.h:445
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58
Ogre::GpuProgramParameters
Collects together the program parameters used for a GpuProgram.
Definition: OgreGpuProgramParams.h:702
Ogre::GpuProgramParameters::ACT_TRANSPOSE_WORLDVIEW_MATRIX
Provides transpose of concatenated world and view matrices.
Definition: OgreGpuProgramParams.h:783
Ogre::GpuProgramParameters::ACT_FRAME_TIME
provides the scaled frame time, returned as a floating point value.
Definition: OgreGpuProgramParams.h:1037
Ogre::GpuProgramParameters::ACT_TEXEL_OFFSETS
Provides the texel offsets required by this rendersystem to map texels to pixels. ...
Definition: OgreGpuProgramParams.h:1110
Ogre::GpuProgramParameters::ACT_NEAR_CLIP_DISTANCE
This variable provides the near clip distance as a floating point value.
Definition: OgreGpuProgramParams.h:1082
Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY
Array of light directions in view space (count set by extra param)
Definition: OgreGpuProgramParams.h:898
Ogre::GCT_MATRIX_DOUBLE_2X4
Definition: OgreGpuProgramParams.h:88
Ogre::GpuProgramParameters::ACT_TIME_0_2PI_PACKED
Vector of "Time0_2PI", "SinTime0_2PI", "CosTime0_2PI", "TanTime0_2PI".
Definition: OgreGpuProgramParams.h:1035
Ogre::GpuProgramParameters::mCombinedVariability
uint16 mCombinedVariability
The combined variability masks of all parameters.
Definition: OgreGpuProgramParams.h:1278
Ogre::GpuConstantDefinition::isSampler
static bool isSampler(GpuConstantType c)
Definition: OgreGpuProgramParams.h:201
Ogre::GpuProgramParameters::mTransposeMatrices
bool mTransposeMatrices
Do we need to transpose matrices?
Definition: OgreGpuProgramParams.h:1280
Ogre::GpuProgramParameters::ACT_SPOTLIGHT_VIEWPROJ_MATRIX_ARRAY
Array of view/projection matrix of a given spotlight.
Definition: OgreGpuProgramParams.h:978
Ogre::GpuProgramParameters::ACT_TEXTURE_VIEWPROJ_MATRIX_ARRAY
Array of view/projection matrices of the first n texture projection frustums.
Definition: OgreGpuProgramParams.h:968
Ogre::GpuProgramParameters::ACT_PROJECTION_MATRIX
The current projection matrix.
Definition: OgreGpuProgramParams.h:745

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.