OgreGpuProgramParams.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __GpuProgramParams_H_
29 #define __GpuProgramParams_H_
30 
31 // Precompiler options
32 #include "OgrePrerequisites.h"
33 #include "OgreSharedPtr.h"
34 #include "OgreIteratorWrappers.h"
35 #include "OgreSerializer.h"
36 #include "OgreRenderOperation.h"
37 #include "OgreAny.h"
39 #include "OgreHeaderPrefix.h"
40 
41 namespace Ogre {
42 
55  {
77  GCT_INT1 = 22,
78  GCT_INT2 = 23,
79  GCT_INT3 = 24,
80  GCT_INT4 = 25,
96  };
97 
102  {
111 
112 
114  GPV_ALL = 0xFFFF
115 
116  };
117 
123  {
129  size_t logicalIndex;
132  size_t elementSize;
134  size_t arraySize;
137 
138  bool isFloat() const
139  {
140  return isFloat(constType);
141  }
142 
143  static bool isFloat(GpuConstantType c)
144  {
145  switch(c)
146  {
147  case GCT_INT1:
148  case GCT_INT2:
149  case GCT_INT3:
150  case GCT_INT4:
151  case GCT_SAMPLER1D:
152  case GCT_SAMPLER2D:
153  case GCT_SAMPLER2DARRAY:
154  case GCT_SAMPLER3D:
155  case GCT_SAMPLERCUBE:
156  case GCT_SAMPLER1DSHADOW:
157  case GCT_SAMPLER2DSHADOW:
158  return false;
159  default:
160  return true;
161  };
162 
163  }
164 
165  bool isDouble() const
166  {
167  return isDouble(constType);
168  }
169 
170  static bool isDouble(GpuConstantType c)
171  {
172  switch(c)
173  {
174  case GCT_INT1:
175  case GCT_INT2:
176  case GCT_INT3:
177  case GCT_INT4:
178  case GCT_FLOAT1:
179  case GCT_FLOAT2:
180  case GCT_FLOAT3:
181  case GCT_FLOAT4:
182  case GCT_SAMPLER1D:
183  case GCT_SAMPLER2D:
184  case GCT_SAMPLER2DARRAY:
185  case GCT_SAMPLER3D:
186  case GCT_SAMPLERCUBE:
187  case GCT_SAMPLER1DSHADOW:
188  case GCT_SAMPLER2DSHADOW:
189  return false;
190  default:
191  return true;
192  };
193 
194  }
195 
196  bool isSampler() const
197  {
198  return isSampler(constType);
199  }
200 
201  static bool isSampler(GpuConstantType c)
202  {
203  switch(c)
204  {
205  case GCT_SAMPLER1D:
206  case GCT_SAMPLER2D:
207  case GCT_SAMPLER2DARRAY:
208  case GCT_SAMPLER3D:
209  case GCT_SAMPLERCUBE:
210  case GCT_SAMPLER1DSHADOW:
211  case GCT_SAMPLER2DSHADOW:
212  return true;
213  default:
214  return false;
215  };
216 
217  }
218 
219  bool isSubroutine() const
220  {
221  return isSubroutine(constType);
222  }
223 
225  {
226  return c == GCT_SUBROUTINE;
227  }
228 
232  static size_t getElementSize(GpuConstantType ctype, bool padToMultiplesOf4)
233  {
234  if (padToMultiplesOf4)
235  {
236  switch(ctype)
237  {
238  case GCT_FLOAT1:
239  case GCT_INT1:
240  case GCT_SAMPLER1D:
241  case GCT_SAMPLER2D:
242  case GCT_SAMPLER2DARRAY:
243  case GCT_SAMPLER3D:
244  case GCT_SAMPLERCUBE:
245  case GCT_SAMPLER1DSHADOW:
246  case GCT_SAMPLER2DSHADOW:
247  case GCT_FLOAT2:
248  case GCT_INT2:
249  case GCT_FLOAT3:
250  case GCT_INT3:
251  case GCT_FLOAT4:
252  case GCT_INT4:
253  return 4;
254  case GCT_MATRIX_2X2:
255  case GCT_MATRIX_2X3:
256  case GCT_MATRIX_2X4:
257  case GCT_DOUBLE1:
258  case GCT_DOUBLE2:
259  case GCT_DOUBLE3:
260  case GCT_DOUBLE4:
261  return 8; // 2 float4s
262  case GCT_MATRIX_3X2:
263  case GCT_MATRIX_3X3:
264  case GCT_MATRIX_3X4:
265  return 12; // 3 float4s
266  case GCT_MATRIX_4X2:
267  case GCT_MATRIX_4X3:
268  case GCT_MATRIX_4X4:
272  return 16; // 4 float4s
276  return 24;
280  return 32;
281  default:
282  return 4;
283  };
284  }
285  else
286  {
287  switch(ctype)
288  {
289  case GCT_FLOAT1:
290  case GCT_DOUBLE1:
291  case GCT_INT1:
292  case GCT_SAMPLER1D:
293  case GCT_SAMPLER2D:
294  case GCT_SAMPLER2DARRAY:
295  case GCT_SAMPLER3D:
296  case GCT_SAMPLERCUBE:
297  case GCT_SAMPLER1DSHADOW:
298  case GCT_SAMPLER2DSHADOW:
299  return 1;
300  case GCT_FLOAT2:
301  case GCT_INT2:
302  case GCT_DOUBLE2:
303  return 2;
304  case GCT_FLOAT3:
305  case GCT_INT3:
306  case GCT_DOUBLE3:
307  return 3;
308  case GCT_FLOAT4:
309  case GCT_INT4:
310  case GCT_DOUBLE4:
311  return 4;
312  case GCT_MATRIX_2X2:
314  return 4;
315  case GCT_MATRIX_2X3:
316  case GCT_MATRIX_3X2:
319  return 6;
320  case GCT_MATRIX_2X4:
321  case GCT_MATRIX_4X2:
324  return 8;
325  case GCT_MATRIX_3X3:
327  return 9;
328  case GCT_MATRIX_3X4:
329  case GCT_MATRIX_4X3:
332  return 12;
333  case GCT_MATRIX_4X4:
335  return 16;
336  default:
337  return 4;
338  };
339 
340  }
341  }
342 
344  : constType(GCT_UNKNOWN)
345  , physicalIndex((std::numeric_limits<size_t>::max)())
346  , logicalIndex(0)
347  , elementSize(0)
348  , arraySize(1)
349  , variability(GPV_GLOBAL) {}
350  };
353 
356  {
365 
366  GpuNamedConstants() : floatBufferSize(0), doubleBufferSize(0), intBufferSize(0) {}
367 
379  void generateConstantDefinitionArrayEntries(const String& paramName,
380  const GpuConstantDefinition& baseDef);
381 
383  static bool getGenerateAllConstantDefinitionArrayEntries();
384 
391  static void setGenerateAllConstantDefinitionArrayEntries(bool generateAll);
392 
396  void save(const String& filename) const;
400  void load(DataStreamPtr& stream);
401 
402  size_t calculateSize(void) const;
403 
404  protected:
412  };
414 
417  {
418  public:
420  virtual ~GpuNamedConstantsSerializer();
421  void exportNamedConstants(const GpuNamedConstants* pConsts, const String& filename,
422  Endian endianMode = ENDIAN_NATIVE);
423  void exportNamedConstants(const GpuNamedConstants* pConsts, DataStreamPtr stream,
424  Endian endianMode = ENDIAN_NATIVE);
425  void importNamedConstants(DataStreamPtr& stream, GpuNamedConstants* pDest);
426  };
427 
432  {
436  size_t currentSize;
439 
441  : physicalIndex(99999), currentSize(0), variability(GPV_GLOBAL) {}
442  GpuLogicalIndexUse(size_t bufIdx, size_t curSz, uint16 v)
443  : physicalIndex(bufIdx), currentSize(curSz), variability(v) {}
444  };
448  {
449  OGRE_MUTEX(mutex);
450 
454  size_t bufferSize;
455  GpuLogicalBufferStruct() : bufferSize(0) {}
456  };
458 
474 
491  {
492  protected:
498 
499  // Optional data the rendersystem might want to store
501 
504 
506  unsigned long mVersion;
507 
508  public:
509  GpuSharedParameters(const String& name);
510  virtual ~GpuSharedParameters();
511 
513  const String& getName() { return mName; }
514 
522  void addConstantDefinition(const String& name, GpuConstantType constType, size_t arraySize = 1);
523 
526  void removeConstantDefinition(const String& name);
527 
530  void removeAllConstantDefinitions();
531 
535  unsigned long getVersion() const { return mVersion; }
536 
537  size_t calculateSize(void) const;
538 
544  void _markDirty();
546  size_t getFrameLastUpdated() const { return mFrameLastUpdated; }
547 
551  GpuConstantDefinitionIterator getConstantDefinitionIterator(void) const;
552 
555  const GpuConstantDefinition& getConstantDefinition(const String& name) const;
556 
559  const GpuNamedConstants& getConstantDefinitions() const;
560 
562  void setNamedConstant(const String& name, Real val);
564  void setNamedConstant(const String& name, int val);
566  void setNamedConstant(const String& name, const Vector4& vec);
568  void setNamedConstant(const String& name, const Vector3& vec);
570  void setNamedConstant(const String& name, const Vector2& vec);
572  void setNamedConstant(const String& name, const Matrix4& m);
574  void setNamedConstant(const String& name, const Matrix4* m, size_t numEntries);
576  void setNamedConstant(const String& name, const float *val, size_t count);
578  void setNamedConstant(const String& name, const double *val, size_t count);
580  void setNamedConstant(const String& name, const ColourValue& colour);
582  void setNamedConstant(const String& name, const int *val, size_t count);
583 
585  float* getFloatPointer(size_t pos) { _markDirty(); return &mFloatConstants[pos]; }
587  const float* getFloatPointer(size_t pos) const { return &mFloatConstants[pos]; }
589  double* getDoublePointer(size_t pos) { _markDirty(); return &mDoubleConstants[pos]; }
591  const double* getDoublePointer(size_t pos) const { return &mDoubleConstants[pos]; }
593  int* getIntPointer(size_t pos) { _markDirty(); return &mIntConstants[pos]; }
595  const int* getIntPointer(size_t pos) const { return &mIntConstants[pos]; }
596 
598  const FloatConstantList& getFloatConstantList() const { return mFloatConstants; }
600  const DoubleConstantList& getDoubleConstantList() const { return mDoubleConstants; }
602  const IntConstantList& getIntConstantList() const { return mIntConstants; }
603 
605  void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
607  const Any& _getRenderSystemData() const { return mRenderSystemData; }
608 
609  };
610 
613 
614  class GpuProgramParameters;
615 
620  {
621  protected:
623  // Not a shared pointer since this is also parent
625  // list of physical mappings that we are going to bring in
627  {
630  };
632 
634 
635  // Optional data the rendersystem might want to store
637 
639  unsigned long mCopyDataVersion;
640 
641  void initCopyData();
642 
643 
644  public:
647  GpuProgramParameters* params);
648 
656  void _copySharedParamsToTargetParams();
657 
659  const String& getName() const { return mSharedParams->getName(); }
660 
661  GpuSharedParametersPtr getSharedParams() const { return mSharedParams; }
662  GpuProgramParameters* getTargetParams() const { return mParams; }
663 
665  void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
667  const Any& _getRenderSystemData() const { return mRenderSystemData; }
668 
669 
670  };
671 
703  {
704  public:
709  {
720 
729 
742 
743 
758 
759 
774 
775 
787 
788 
803 
804 
806 
810 
814 
819 
820 
833 
834 
837 
838 
841 
915 
926 
939 
955 
956 
1041 
1061 
1063 
1087 
1092 
1098 
1099 
1104 
1111 
1117 
1124 
1131 
1148 
1153 
1167  ACT_LIGHT_CUSTOM
1168  };
1169 
1173  enum ACDataType {
1179  ACDT_REAL
1180  };
1181 
1186  ET_REAL
1187  };
1188 
1193  {
1201 
1203  size_t _elementCount, ElementType _elementType,
1204  ACDataType _dataType)
1205  :acType(_acType), name(_name), elementCount(_elementCount),
1206  elementType(_elementType), dataType(_dataType)
1207  {
1208 
1209  }
1210  };
1211 
1214  {
1215  public:
1225  union{
1226  size_t data;
1228  };
1231 
1232  AutoConstantEntry(AutoConstantType theType, size_t theIndex, size_t theData,
1233  uint16 theVariability, size_t theElemCount = 4)
1234  : paramType(theType), physicalIndex(theIndex), elementCount(theElemCount),
1235  data(theData), variability(theVariability) {}
1236 
1237  AutoConstantEntry(AutoConstantType theType, size_t theIndex, Real theData,
1238  uint16 theVariability, size_t theElemCount = 4)
1239  : paramType(theType), physicalIndex(theIndex), elementCount(theElemCount),
1240  fData(theData), variability(theVariability) {}
1241 
1242  };
1243  // Auto parameter storage
1245 
1247 
1248  // Map that store subroutines associated with slots
1249  typedef HashMap<unsigned int, String> SubroutineMap;
1250  typedef HashMap<unsigned int, String>::const_iterator SubroutineIterator;
1251 
1252  protected:
1254 
1255  static AutoConstantDefinition AutoConstantDictionary[];
1283 
1286  GpuLogicalIndexUse* _getFloatConstantLogicalIndexUse(size_t logicalIndex, size_t requestedSize, uint16 variability);
1289  GpuLogicalIndexUse* _getDoubleConstantLogicalIndexUse(size_t logicalIndex, size_t requestedSize, uint16 variability);
1292  GpuLogicalIndexUse* _getIntConstantLogicalIndexUse(size_t logicalIndex, size_t requestedSize, uint16 variability);
1293 
1295  uint16 deriveVariability(AutoConstantType act);
1296 
1297  void copySharedParamSetUsage(const GpuSharedParamUsageList& srcList);
1298 
1300 
1301  // Optional data the rendersystem might want to store
1303 
1304 
1305 
1306  public:
1309 
1313  GpuProgramParameters& operator=(const GpuProgramParameters& oth);
1314 
1316  void _setNamedConstants(const GpuNamedConstantsPtr& constantmap);
1317 
1319  void _setLogicalIndexes(const GpuLogicalBufferStructPtr& floatIndexMap, const GpuLogicalBufferStructPtr& doubleIndexMap,
1320  const GpuLogicalBufferStructPtr& intIndexMap);
1321 
1322 
1324  bool hasNamedParameters() const { return !mNamedConstants.isNull(); }
1330  bool hasLogicalIndexedParameters() const { return !mFloatLogicalToPhysical.isNull(); }
1331 
1337  void setConstant(size_t index, const Vector4& vec);
1345  void setConstant(size_t index, Real val);
1353  void setConstant(size_t index, const Vector3& vec);
1361  void setConstant(size_t index, const Vector2& vec);
1368  void setConstant(size_t index, const Matrix4& m);
1376  void setConstant(size_t index, const Matrix4* m, size_t numEntries);
1383  void setConstant(size_t index, const float *val, size_t count);
1390  void setConstant(size_t index, const double *val, size_t count);
1396  void setConstant(size_t index, const ColourValue& colour);
1397 
1412  void setConstant(size_t index, const int *val, size_t count);
1413 
1420  void _writeRawConstants(size_t physicalIndex, const float* val, size_t count);
1427  void _writeRawConstants(size_t physicalIndex, const double* val, size_t count);
1434  void _writeRawConstants(size_t physicalIndex, const int* val, size_t count);
1441  void _readRawConstants(size_t physicalIndex, size_t count, float* dest);
1448  void _readRawConstants(size_t physicalIndex, size_t count, int* dest);
1449 
1460  void _writeRawConstant(size_t physicalIndex, const Vector4& vec,
1461  size_t count = 4);
1469  void _writeRawConstant(size_t physicalIndex, Real val);
1477  void _writeRawConstant(size_t physicalIndex, Real val, size_t count);
1485  void _writeRawConstant(size_t physicalIndex, int val);
1493  void _writeRawConstant(size_t physicalIndex, const Vector3& vec);
1501  void _writeRawConstant(size_t physicalIndex, const Vector2& vec);
1510  void _writeRawConstant(size_t physicalIndex, const Matrix4& m, size_t elementCount);
1518  void _writeRawConstant(size_t physicalIndex, const Matrix4* m, size_t numEntries);
1528  void _writeRawConstant(size_t physicalIndex, const ColourValue& colour,
1529  size_t count = 4);
1530 
1531 
1537  GpuConstantDefinitionIterator getConstantDefinitionIterator(void) const;
1538 
1543  const GpuConstantDefinition& getConstantDefinition(const String& name) const;
1544 
1549  const GpuNamedConstants& getConstantDefinitions() const;
1550 
1556  const GpuLogicalBufferStructPtr& getFloatLogicalBufferStruct() const { return mFloatLogicalToPhysical; }
1557 
1563  size_t getFloatLogicalIndexForPhysicalIndex(size_t physicalIndex);
1574  const GpuLogicalBufferStructPtr& getDoubleLogicalBufferStruct() const { return mDoubleLogicalToPhysical; }
1575 
1581  size_t getDoubleLogicalIndexForPhysicalIndex(size_t physicalIndex);
1587  size_t getIntLogicalIndexForPhysicalIndex(size_t physicalIndex);
1588 
1594  const GpuLogicalBufferStructPtr& getIntLogicalBufferStruct() const { return mIntLogicalToPhysical; }
1596  const FloatConstantList& getFloatConstantList() const { return mFloatConstants; }
1598  float* getFloatPointer(size_t pos) { return &mFloatConstants[pos]; }
1600  const float* getFloatPointer(size_t pos) const { return &mFloatConstants[pos]; }
1602  const DoubleConstantList& getDoubleConstantList() const { return mDoubleConstants; }
1604  double* getDoublePointer(size_t pos) { return &mDoubleConstants[pos]; }
1606  const double* getDoublePointer(size_t pos) const { return &mDoubleConstants[pos]; }
1608  const IntConstantList& getIntConstantList() const { return mIntConstants; }
1610  int* getIntPointer(size_t pos) { return &mIntConstants[pos]; }
1612  const int* getIntPointer(size_t pos) const { return &mIntConstants[pos]; }
1614  const AutoConstantList& getAutoConstantList() const { return mAutoConstants; }
1615 
1629  void setAutoConstant(size_t index, AutoConstantType acType, size_t extraInfo = 0);
1630  void setAutoConstantReal(size_t index, AutoConstantType acType, Real rData);
1631 
1646  void setAutoConstant(size_t index, AutoConstantType acType, uint16 extraInfo1, uint16 extraInfo2);
1647 
1651  void _setRawAutoConstant(size_t physicalIndex, AutoConstantType acType, size_t extraInfo,
1652  uint16 variability, size_t elementSize = 4);
1656  void _setRawAutoConstantReal(size_t physicalIndex, AutoConstantType acType, Real rData,
1657  uint16 variability, size_t elementSize = 4);
1658 
1659 
1661  void clearAutoConstant(size_t index);
1662 
1667  void setConstantFromTime(size_t index, Real factor);
1668 
1670  void clearAutoConstants(void);
1673  AutoConstantIterator getAutoConstantIterator(void) const;
1675  size_t getAutoConstantCount(void) const { return mAutoConstants.size(); }
1680  AutoConstantEntry* getAutoConstantEntry(const size_t index);
1682  bool hasAutoConstants(void) const { return !(mAutoConstants.empty()); }
1687  const AutoConstantEntry* findFloatAutoConstantEntry(size_t logicalIndex);
1692  const AutoConstantEntry* findDoubleAutoConstantEntry(size_t logicalIndex);
1697  const AutoConstantEntry* findIntAutoConstantEntry(size_t logicalIndex);
1701  const AutoConstantEntry* findAutoConstantEntry(const String& paramName);
1705  const AutoConstantEntry* _findRawAutoConstantEntryFloat(size_t physicalIndex);
1709  const AutoConstantEntry* _findRawAutoConstantEntryDouble(size_t physicalIndex);
1713  const AutoConstantEntry* _findRawAutoConstantEntryInt(size_t physicalIndex);
1714 
1719  void _updateAutoParams(const AutoParamDataSource* source, uint16 variabilityMask);
1720 
1723  void setIgnoreMissingParams(bool state) { mIgnoreMissingParams = state; }
1724 
1744  void setNamedConstant(const String& name, Real val);
1764  void setNamedConstant(const String& name, int val);
1769  void setNamedConstant(const String& name, const Vector4& vec);
1777  void setNamedConstant(const String& name, const Vector3& vec);
1782  void setNamedConstant(const String& name, const Vector2& vec);
1787  void setNamedConstant(const String& name, const Matrix4& m);
1795  void setNamedConstant(const String& name, const Matrix4* m, size_t numEntries);
1812  void setNamedConstant(const String& name, const float *val, size_t count,
1813  size_t multiple = 4);
1830  void setNamedConstant(const String& name, const double *val, size_t count,
1831  size_t multiple = 4);
1836  void setNamedConstant(const String& name, const ColourValue& colour);
1837 
1854  void setNamedConstant(const String& name, const int *val, size_t count,
1855  size_t multiple = 4);
1856 
1871  void setNamedAutoConstant(const String& name, AutoConstantType acType, size_t extraInfo = 0);
1872  void setNamedAutoConstantReal(const String& name, AutoConstantType acType, Real rData);
1873 
1889  void setNamedAutoConstant(const String& name, AutoConstantType acType, uint16 extraInfo1, uint16 extraInfo2);
1890 
1898  void setNamedConstantFromTime(const String& name, Real factor);
1899 
1901  void clearNamedAutoConstant(const String& name);
1902 
1912  const GpuConstantDefinition* _findNamedConstantDefinition(
1913  const String& name, bool throwExceptionIfMissing = false) const;
1920  size_t _getFloatConstantPhysicalIndex(size_t logicalIndex, size_t requestedSize, uint16 variability);
1927  size_t _getDoubleConstantPhysicalIndex(size_t logicalIndex, size_t requestedSize, uint16 variability);
1934  size_t _getIntConstantPhysicalIndex(size_t logicalIndex, size_t requestedSize, uint16 variability);
1935 
1943  void setTransposeMatrices(bool val) { mTransposeMatrices = val; }
1945  bool getTransposeMatrices(void) const { return mTransposeMatrices; }
1946 
1953  void copyConstantsFrom(const GpuProgramParameters& source);
1954 
1963  void copyMatchingNamedConstantsFrom(const GpuProgramParameters& source);
1964 
1968  static const AutoConstantDefinition* getAutoConstantDefinition(const String& name);
1973  static const AutoConstantDefinition* getAutoConstantDefinition(const size_t idx);
1976  static size_t getNumAutoConstantDefinitions(void);
1977 
1978 
1981  void incPassIterationNumber(void);
1984  { return mActivePassIterationIndex != (std::numeric_limits<size_t>::max)(); }
1987  { return mActivePassIterationIndex; }
1988 
1989 
1995  void addSharedParameters(GpuSharedParametersPtr sharedParams);
1996 
2004  void addSharedParameters(const String& sharedParamsName);
2005 
2007  bool isUsingSharedParameters(const String& sharedParamsName) const;
2008 
2010  void removeSharedParameters(const String& sharedParamsName);
2011 
2013  void removeAllSharedParameters();
2014 
2016  const GpuSharedParamUsageList& getSharedParameters() const;
2017 
2019  void _setRenderSystemData(const Any& data) const { mRenderSystemData = data; }
2021  const Any& _getRenderSystemData() const { return mRenderSystemData; }
2022 
2030  void _copySharedParams();
2031 
2032  size_t calculateSize(void) const;
2033 
2036  void setNamedSubroutine(const String& subroutineSlot, const String& subroutine);
2037 
2040  void setSubroutine(size_t index, const String& subroutine);
2041 
2044  const SubroutineMap& getSubroutineMap() const { return mSubroutineMap; }
2045  };
2046 
2049 
2052 }
2053 
2054 #include "OgreHeaderSuffix.h"
2055 
2056 #endif
2057 

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Oct 16 2013 14:35:42