ruby-ogre 0.0.3-x86-linux → 0.0.4-x86-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. data/Rakefile +7 -8
  2. data/bindings/ogre/interface/ogre_all.i +1 -0
  3. data/bindings/ogre/interface/ogre_wrap.cpp +591 -46
  4. data/bindings/ogre/interface/ogre_wrap.o +0 -0
  5. data/bindings/ogrebites/interface/ogrebites_wrap.o +0 -0
  6. data/bindings/procedural/interface/procedural_wrap.o +0 -0
  7. data/deps/include/OGRE/OgreAny.h +23 -1
  8. data/deps/include/OGRE/OgreBillboardChain.h +5 -1
  9. data/deps/include/OGRE/OgreBillboardParticleRenderer.h +2 -0
  10. data/deps/include/OGRE/OgreConfigDialog.h +0 -2
  11. data/deps/include/OGRE/OgreDynLib.h +1 -7
  12. data/deps/include/OGRE/OgreErrorDialog.h +0 -2
  13. data/deps/include/OGRE/OgreHeaderSuffix.h +3 -3
  14. data/deps/include/OGRE/OgreInstanceBatch.h +4 -0
  15. data/deps/include/OGRE/OgreInstanceManager.h +5 -0
  16. data/deps/include/OGRE/OgreIteratorRange.h +13 -2
  17. data/deps/include/OGRE/OgreParticleSystem.h +2 -0
  18. data/deps/include/OGRE/OgreParticleSystemRenderer.h +4 -0
  19. data/deps/include/OGRE/OgrePlatform.h +5 -28
  20. data/deps/include/OGRE/OgrePrerequisites.h +1 -1
  21. data/deps/include/OGRE/OgreProfiler.h +102 -59
  22. data/deps/include/OGRE/OgreProgressiveMesh.h +2 -2
  23. data/deps/include/OGRE/OgreRenderSystem.h +18 -1
  24. data/deps/include/OGRE/OgreRoot.h +1 -1
  25. data/deps/include/OGRE/OgreSearchOps.h +0 -5
  26. data/deps/include/OGRE/OgreSimpleRenderable.h +1 -1
  27. data/deps/include/OGRE/OgreStdHeaders.h +2 -2
  28. data/deps/include/OGRE/OgreStringConverter.h +5 -0
  29. data/deps/include/OGRE/OgreTimer.h +1 -1
  30. data/deps/include/OGRE/OgreUTFString.h +0 -2
  31. data/deps/include/OGRE/OgreWindowEventUtilities.h +3 -1
  32. data/deps/include/OGRE/OgreWorkQueue.h +2 -2
  33. data/deps/include/OGRE/RTShaderSystem/OgreShaderCGProgramProcessor.h +5 -5
  34. data/deps/include/OGRE/RTShaderSystem/OgreShaderCGProgramWriter.h +17 -15
  35. data/deps/include/OGRE/RTShaderSystem/OgreShaderExDualQuaternionSkinning.h +3 -3
  36. data/deps/include/OGRE/RTShaderSystem/OgreShaderExHardwareSkinning.h +5 -4
  37. data/deps/include/OGRE/RTShaderSystem/OgreShaderExHardwareSkinningTechnique.h +3 -3
  38. data/deps/include/OGRE/RTShaderSystem/OgreShaderExIntegratedPSSM3.h +50 -32
  39. data/deps/include/OGRE/RTShaderSystem/OgreShaderExLayeredBlending.h +13 -9
  40. data/deps/include/OGRE/RTShaderSystem/OgreShaderExLinearSkinning.h +7 -7
  41. data/deps/include/OGRE/RTShaderSystem/OgreShaderExNormalMapLighting.h +149 -95
  42. data/deps/include/OGRE/RTShaderSystem/OgreShaderExPerPixelLighting.h +91 -59
  43. data/deps/include/OGRE/RTShaderSystem/OgreShaderExTextureAtlasSampler.h +14 -9
  44. data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPColour.h +33 -24
  45. data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPFog.h +44 -30
  46. data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPLighting.h +70 -45
  47. data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPRenderStateBuilder.h +11 -10
  48. data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPTexturing.h +73 -64
  49. data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPTransform.h +8 -8
  50. data/deps/include/OGRE/RTShaderSystem/OgreShaderFunction.h +42 -35
  51. data/deps/include/OGRE/RTShaderSystem/OgreShaderFunctionAtom.h +38 -32
  52. data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLESProgramProcessor.h +9 -8
  53. data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLESProgramWriter.h +45 -36
  54. data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLProgramProcessor.h +9 -8
  55. data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLProgramWriter.h +26 -20
  56. data/deps/include/OGRE/RTShaderSystem/OgreShaderGenerator.h +211 -160
  57. data/deps/include/OGRE/RTShaderSystem/OgreShaderHLSLProgramProcessor.h +5 -5
  58. data/deps/include/OGRE/RTShaderSystem/OgreShaderHLSLProgramWriter.h +17 -15
  59. data/deps/include/OGRE/RTShaderSystem/OgreShaderMaterialSerializerListener.h +5 -3
  60. data/deps/include/OGRE/RTShaderSystem/OgreShaderParameter.h +86 -73
  61. data/deps/include/OGRE/RTShaderSystem/OgreShaderProgram.h +36 -30
  62. data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramManager.h +38 -31
  63. data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramProcessor.h +54 -43
  64. data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramSet.h +18 -14
  65. data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramWriter.h +10 -10
  66. data/deps/include/OGRE/RTShaderSystem/OgreShaderRenderState.h +28 -23
  67. data/deps/include/OGRE/RTShaderSystem/OgreShaderScriptTranslator.h +2 -1
  68. data/deps/include/OGRE/RTShaderSystem/OgreShaderSubRenderState.h +35 -32
  69. data/deps/include/OGRE/RenderSystems/GL/GL/wglew.h +2 -2
  70. data/deps/include/OGRE/RenderSystems/GL/GL/wglext.h +2 -2
  71. data/deps/include/OGRE/RenderSystems/GL/OgreGLRenderSystem.h +10 -1
  72. data/deps/include/OGRE/RenderSystems/GL/OgreGLTextureManager.h +2 -0
  73. data/deps/include/OGRE/Sample.h +5 -0
  74. data/deps/include/OGRE/SampleContext.h +13 -3
  75. data/deps/lib/OGRE/Plugin_BSPSceneManager.so +0 -0
  76. data/deps/lib/OGRE/Plugin_BSPSceneManager.so.1.8.1 +0 -0
  77. data/deps/lib/OGRE/Plugin_CgProgramManager.so +0 -0
  78. data/deps/lib/OGRE/Plugin_CgProgramManager.so.1.8.1 +0 -0
  79. data/deps/lib/OGRE/Plugin_OctreeSceneManager.so +0 -0
  80. data/deps/lib/OGRE/Plugin_OctreeSceneManager.so.1.8.1 +0 -0
  81. data/deps/lib/OGRE/Plugin_OctreeZone.so +0 -0
  82. data/deps/lib/OGRE/Plugin_OctreeZone.so.1.8.1 +0 -0
  83. data/deps/lib/OGRE/Plugin_PCZSceneManager.so +0 -0
  84. data/deps/lib/OGRE/Plugin_PCZSceneManager.so.1.8.1 +0 -0
  85. data/deps/lib/OGRE/Plugin_ParticleFX.so +0 -0
  86. data/deps/lib/OGRE/Plugin_ParticleFX.so.1.8.1 +0 -0
  87. data/deps/lib/OGRE/RenderSystem_GL.so +0 -0
  88. data/deps/lib/OGRE/RenderSystem_GL.so.1.8.1 +0 -0
  89. data/deps/lib/libOgreMain.so +0 -0
  90. data/deps/lib/libOgreMain.so.1.8.1 +0 -0
  91. data/deps/lib/libOgrePaging.so +0 -0
  92. data/deps/lib/libOgrePaging.so.1.8.1 +0 -0
  93. data/deps/lib/libOgreProcedural.so +0 -0
  94. data/deps/lib/libOgreRTShaderSystem.so +0 -0
  95. data/deps/lib/libOgreRTShaderSystem.so.1.8.1 +0 -0
  96. data/deps/lib/libOgreTerrain.so +0 -0
  97. data/deps/lib/libOgreTerrain.so.1.8.1 +0 -0
  98. data/deps/share/OGRE/media/materials/programs/DiffuseOneTexture.glsles +17 -0
  99. data/deps/share/OGRE/media/packs/profiler.zip +0 -0
  100. data/lib/ogre.so +0 -0
  101. data/lib/ogrebites.so +0 -0
  102. data/lib/procedural.so +0 -0
  103. data/lib/version.rb +1 -1
  104. data/sample/charactor/sinbad.rb +8 -4
  105. metadata +16 -4
@@ -69,28 +69,28 @@ public:
69
69
  /**
70
70
  @see SubRenderState::getType.
71
71
  */
72
- virtual const String& getType () const;
72
+ virtual const String& getType() const;
73
73
 
74
74
  /**
75
75
  @see SubRenderState::getType.
76
76
  */
77
- virtual int getExecutionOrder () const;
77
+ virtual int getExecutionOrder() const;
78
78
 
79
79
  /**
80
80
  @see SubRenderState::updateGpuProgramsParams.
81
81
  */
82
- virtual void updateGpuProgramsParams (Renderable* rend, Pass* pass, const AutoParamDataSource* source, const LightList* pLightList);
82
+ virtual void updateGpuProgramsParams(Renderable* rend, Pass* pass, const AutoParamDataSource* source, const LightList* pLightList);
83
83
 
84
84
  /**
85
85
  @see SubRenderState::copyFrom.
86
86
  */
87
- virtual void copyFrom (const SubRenderState& rhs);
87
+ virtual void copyFrom(const SubRenderState& rhs);
88
88
 
89
89
 
90
90
  /**
91
91
  @see SubRenderState::preAddToRenderState.
92
92
  */
93
- virtual bool preAddToRenderState (const RenderState* renderState, Pass* srcPass, Pass* dstPass);
93
+ virtual bool preAddToRenderState(const RenderState* renderState, Pass* srcPass, Pass* dstPass);
94
94
 
95
95
 
96
96
 
@@ -103,18 +103,24 @@ protected:
103
103
  struct _OgreRTSSExport LightParams
104
104
  {
105
105
  Light::LightTypes mType; // Light type.
106
- UniformParameterPtr mPosition; // Light position.
107
- UniformParameterPtr mDirection; // Light direction.
108
- UniformParameterPtr mAttenuatParams; // Attenuation parameters.
109
- UniformParameterPtr mSpotParams; // Spot light parameters.
110
- UniformParameterPtr mDiffuseColour; // Diffuse colour.
111
- UniformParameterPtr mSpecularColour; // Specular colour.
106
+ // Light position.
107
+ UniformParameterPtr mPosition;
108
+ // Light direction.
109
+ UniformParameterPtr mDirection;
110
+ // Attenuation parameters.
111
+ UniformParameterPtr mAttenuatParams;
112
+ // Spot light parameters.
113
+ UniformParameterPtr mSpotParams;
114
+ // Diffuse colour.
115
+ UniformParameterPtr mDiffuseColour;
116
+ // Specular colour.
117
+ UniformParameterPtr mSpecularColour;
112
118
 
113
119
  };
114
120
 
115
- typedef vector<LightParams>::type LightParamsList;
116
- typedef LightParamsList::iterator LightParamsIterator;
117
- typedef LightParamsList::const_iterator LightParamsConstIterator;
121
+ typedef vector<LightParams>::type LightParamsList;
122
+ typedef LightParamsList::iterator LightParamsIterator;
123
+ typedef LightParamsList::const_iterator LightParamsConstIterator;
118
124
 
119
125
  // Protected methods
120
126
  protected:
@@ -124,110 +130,136 @@ protected:
124
130
  can be the vertex colour component. To establish such a link one should provide the matching flags to this
125
131
  sub render state.
126
132
  */
127
- void setTrackVertexColourType(TrackVertexColourType type) { mTrackVertexColourType = type; }
133
+ void setTrackVertexColourType(TrackVertexColourType type) { mTrackVertexColourType = type; }
128
134
 
129
135
  /**
130
136
  Return the current track per vertex type.
131
137
  */
132
- TrackVertexColourType getTrackVertexColourType() const { return mTrackVertexColourType; }
138
+ TrackVertexColourType getTrackVertexColourType() const { return mTrackVertexColourType; }
133
139
 
134
140
 
135
141
  /**
136
142
  Set the light count per light type that this sub render state will generate.
137
143
  @see ShaderGenerator::setLightCount.
138
144
  */
139
- void setLightCount (const int lightCount[3]);
145
+ void setLightCount(const int lightCount[3]);
140
146
 
141
147
  /**
142
148
  Get the light count per light type that this sub render state will generate.
143
149
  @see ShaderGenerator::getLightCount.
144
150
  */
145
- void getLightCount (int lightCount[3]) const;
151
+ void getLightCount(int lightCount[3]) const;
146
152
  /**
147
153
  Set the specular component state. If set to true this sub render state will compute a specular
148
154
  lighting component in addition to the diffuse component.
149
155
  @param enable Pass true to enable specular component computation.
150
156
  */
151
- void setSpecularEnable (bool enable) { mSpecularEnable = enable; }
157
+ void setSpecularEnable(bool enable) { mSpecularEnable = enable; }
152
158
 
153
159
  /**
154
160
  Get the specular component state.
155
161
  */
156
- bool getSpecularEnable () const { return mSpecularEnable; }
162
+ bool getSpecularEnable() const { return mSpecularEnable; }
157
163
 
158
164
 
159
165
  /**
160
166
  @see SubRenderState::resolveParameters.
161
167
  */
162
- virtual bool resolveParameters (ProgramSet* programSet);
168
+ virtual bool resolveParameters(ProgramSet* programSet);
163
169
 
164
170
  /** Resolve global lighting parameters */
165
- bool resolveGlobalParameters (ProgramSet* programSet);
171
+ bool resolveGlobalParameters(ProgramSet* programSet);
166
172
 
167
173
  /** Resolve per light parameters */
168
- bool resolvePerLightParameters (ProgramSet* programSet);
174
+ bool resolvePerLightParameters(ProgramSet* programSet);
169
175
 
170
176
  /**
171
177
  @see SubRenderState::resolveDependencies.
172
178
  */
173
- virtual bool resolveDependencies (ProgramSet* programSet);
179
+ virtual bool resolveDependencies(ProgramSet* programSet);
174
180
 
175
181
  /**
176
182
  @see SubRenderState::addFunctionInvocations.
177
183
  */
178
- virtual bool addFunctionInvocations (ProgramSet* programSet);
184
+ virtual bool addFunctionInvocations(ProgramSet* programSet);
179
185
 
180
186
 
181
187
  /**
182
188
  Internal method that adds related vertex shader functions invocations.
183
189
  */
184
- bool addVSInvocation (Function* vsMain, const int groupOrder, int& internalCounter);
190
+ bool addVSInvocation(Function* vsMain, const int groupOrder, int& internalCounter);
185
191
 
186
192
 
187
193
  /**
188
194
  Internal method that adds global illumination component functions invocations.
189
195
  */
190
- bool addPSGlobalIlluminationInvocation (Function* psMain, const int groupOrder, int& internalCounter);
196
+ bool addPSGlobalIlluminationInvocation(Function* psMain, const int groupOrder, int& internalCounter);
191
197
 
192
198
  /**
193
199
  Internal method that adds per light illumination component functions invocations.
194
200
  */
195
- bool addPSIlluminationInvocation (LightParams* curLightParams, Function* psMain, const int groupOrder, int& internalCounter);
201
+ bool addPSIlluminationInvocation(LightParams* curLightParams, Function* psMain, const int groupOrder, int& internalCounter);
196
202
 
197
203
  /**
198
204
  Internal method that adds the final colour assignments.
199
205
  */
200
- bool addPSFinalAssignmentInvocation (Function* psMain, const int groupOrder, int& internalCounter);
206
+ bool addPSFinalAssignmentInvocation(Function* psMain, const int groupOrder, int& internalCounter);
201
207
 
202
208
 
203
209
  // Attributes.
204
210
  protected:
205
- TrackVertexColourType mTrackVertexColourType; // Track per vertex colour type.
206
- bool mSpecularEnable; // Specular component enabled/disabled.
207
- LightParamsList mLightParamsList; // Light list.
208
- UniformParameterPtr mWorldViewMatrix; // World view matrix parameter.
209
- UniformParameterPtr mWorldViewITMatrix; // World view matrix inverse transpose parameter.
210
- ParameterPtr mVSInPosition; // Vertex shader input position parameter.
211
- ParameterPtr mVSOutViewPos; // Vertex shader output view position (position in camera space) parameter.
212
- ParameterPtr mPSInViewPos; // Pixel shader input view position (position in camera space) parameter.
213
- ParameterPtr mVSInNormal; // Vertex shader input normal.
214
- ParameterPtr mVSOutNormal; // Vertex shader output normal.
215
- ParameterPtr mPSInNormal; // Pixel shader input normal.
216
- ParameterPtr mPSTempDiffuseColour; // Pixel shader temporary diffuse calculation parameter.
217
- ParameterPtr mPSTempSpecularColour; // Pixel shader temporary specular calculation parameter.
218
- ParameterPtr mPSDiffuse; // Pixel shader input/local diffuse parameter.
219
- ParameterPtr mPSSpecular; // Pixel shader input/local specular parameter.
220
- ParameterPtr mPSOutDiffuse; // Pixel shader output diffuse parameter.
221
- ParameterPtr mPSOutSpecular; // Pixel shader output specular parameter.
222
- UniformParameterPtr mDerivedSceneColour; // Derived scene colour parameter.
223
- UniformParameterPtr mLightAmbientColour; // Ambient light colour parameter.
224
- UniformParameterPtr mDerivedAmbientLightColour; // Derived ambient light colour parameter.
225
- UniformParameterPtr mSurfaceAmbientColour; // Surface ambient colour parameter.
226
- UniformParameterPtr mSurfaceDiffuseColour; // Surface diffuse colour parameter.
227
- UniformParameterPtr mSurfaceSpecularColour; // Surface specular colour parameter.
228
- UniformParameterPtr mSurfaceEmissiveColour; // Surface emissive colour parameter.
229
- UniformParameterPtr mSurfaceShininess; // Surface shininess parameter.
230
- static Light msBlankLight; // Shared blank light.
211
+ // Track per vertex colour type.
212
+ TrackVertexColourType mTrackVertexColourType;
213
+ // Specular component enabled/disabled.
214
+ bool mSpecularEnable;
215
+ // Light list.
216
+ LightParamsList mLightParamsList;
217
+ // World view matrix parameter.
218
+ UniformParameterPtr mWorldViewMatrix;
219
+ // World view matrix inverse transpose parameter.
220
+ UniformParameterPtr mWorldViewITMatrix;
221
+ // Vertex shader input position parameter.
222
+ ParameterPtr mVSInPosition;
223
+ // Vertex shader output view position (position in camera space) parameter.
224
+ ParameterPtr mVSOutViewPos;
225
+ // Pixel shader input view position (position in camera space) parameter.
226
+ ParameterPtr mPSInViewPos;
227
+ // Vertex shader input normal.
228
+ ParameterPtr mVSInNormal;
229
+ // Vertex shader output normal.
230
+ ParameterPtr mVSOutNormal;
231
+ // Pixel shader input normal.
232
+ ParameterPtr mPSInNormal;
233
+ // Pixel shader temporary diffuse calculation parameter.
234
+ ParameterPtr mPSTempDiffuseColour;
235
+ // Pixel shader temporary specular calculation parameter.
236
+ ParameterPtr mPSTempSpecularColour;
237
+ // Pixel shader input/local diffuse parameter.
238
+ ParameterPtr mPSDiffuse;
239
+ // Pixel shader input/local specular parameter.
240
+ ParameterPtr mPSSpecular;
241
+ // Pixel shader output diffuse parameter.
242
+ ParameterPtr mPSOutDiffuse;
243
+ // Pixel shader output specular parameter.
244
+ ParameterPtr mPSOutSpecular;
245
+ // Derived scene colour parameter.
246
+ UniformParameterPtr mDerivedSceneColour;
247
+ // Ambient light colour parameter.
248
+ UniformParameterPtr mLightAmbientColour;
249
+ // Derived ambient light colour parameter.
250
+ UniformParameterPtr mDerivedAmbientLightColour;
251
+ // Surface ambient colour parameter.
252
+ UniformParameterPtr mSurfaceAmbientColour;
253
+ // Surface diffuse colour parameter.
254
+ UniformParameterPtr mSurfaceDiffuseColour;
255
+ // Surface specular colour parameter.
256
+ UniformParameterPtr mSurfaceSpecularColour;
257
+ // Surface emissive colour parameter.
258
+ UniformParameterPtr mSurfaceEmissiveColour;
259
+ // Surface shininess parameter.
260
+ UniformParameterPtr mSurfaceShininess;
261
+ // Shared blank light.
262
+ static Light msBlankLight;
231
263
  };
232
264
 
233
265
 
@@ -242,17 +274,17 @@ public:
242
274
  /**
243
275
  @see SubRenderStateFactory::getType.
244
276
  */
245
- virtual const String& getType () const;
277
+ virtual const String& getType() const;
246
278
 
247
279
  /**
248
280
  @see SubRenderStateFactory::createInstance.
249
281
  */
250
- virtual SubRenderState* createInstance (ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
282
+ virtual SubRenderState* createInstance(ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
251
283
 
252
284
  /**
253
285
  @see SubRenderStateFactory::writeInstance.
254
286
  */
255
- virtual void writeInstance (MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
287
+ virtual void writeInstance(MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
256
288
 
257
289
 
258
290
  protected:
@@ -260,7 +292,7 @@ protected:
260
292
  /**
261
293
  @see SubRenderStateFactory::createInstanceImpl.
262
294
  */
263
- virtual SubRenderState* createInstanceImpl ();
295
+ virtual SubRenderState* createInstanceImpl();
264
296
 
265
297
 
266
298
  };
@@ -166,9 +166,9 @@ public:
166
166
 
167
167
  // Protected methods
168
168
  protected:
169
- virtual bool resolveParameters (ProgramSet* programSet);
170
- virtual bool resolveDependencies (ProgramSet* programSet);
171
- virtual bool addFunctionInvocations (ProgramSet* programSet);
169
+ virtual bool resolveParameters(ProgramSet* programSet);
170
+ virtual bool resolveDependencies(ProgramSet* programSet);
171
+ virtual bool addFunctionInvocations(ProgramSet* programSet);
172
172
 
173
173
  /**
174
174
  Given an address mode returns the function name which calculates the UV values for that addressing mode
@@ -178,13 +178,18 @@ protected:
178
178
 
179
179
  // Attributes.
180
180
  protected:
181
- ParameterPtr mVSInpTextureTableIndex; // The index of the information on the texture in the table
181
+ // The index of the information on the texture in the table
182
+ ParameterPtr mVSInpTextureTableIndex;
182
183
 
183
184
  TextureUnitState::UVWAddressingMode mTextureAddressings[TAS_MAX_TEXTURES]; // The addressing mode for each texture
184
- ParameterPtr mVSOutTextureDatas[TAS_MAX_TEXTURES]; // The position and size of the texture in the atlas
185
- ParameterPtr mPSInpTextureDatas[TAS_MAX_TEXTURES]; // The position and size of the texture in the atlas
186
- UniformParameterPtr mPSTextureSizes[TAS_MAX_TEXTURES]; //A parameter carrying the sizes of the atlas textures
187
- UniformParameterPtr mVSTextureTable[TAS_MAX_TEXTURES]; // The table containing information on the textures in the atlas
185
+ // The position and size of the texture in the atlas
186
+ ParameterPtr mVSOutTextureDatas[TAS_MAX_TEXTURES];
187
+ // The position and size of the texture in the atlas
188
+ ParameterPtr mPSInpTextureDatas[TAS_MAX_TEXTURES];
189
+ //A parameter carrying the sizes of the atlas textures
190
+ UniformParameterPtr mPSTextureSizes[TAS_MAX_TEXTURES];
191
+ // The table containing information on the textures in the atlas
192
+ UniformParameterPtr mVSTextureTable[TAS_MAX_TEXTURES];
188
193
 
189
194
  //The position of the texture coordinates containing the index information
190
195
  ushort mAtlasTexcoordPos;
@@ -345,7 +350,7 @@ protected:
345
350
  /**
346
351
  @see SubRenderStateFactory::createInstanceImpl.
347
352
  */
348
- virtual SubRenderState* createInstanceImpl();
353
+ virtual SubRenderState* createInstanceImpl();
349
354
 
350
355
  private:
351
356
 
@@ -72,22 +72,22 @@ public:
72
72
  /**
73
73
  @see SubRenderState::getType.
74
74
  */
75
- virtual const String& getType () const;
75
+ virtual const String& getType() const;
76
76
 
77
77
  /**
78
78
  @see SubRenderState::getType.
79
79
  */
80
- virtual int getExecutionOrder () const;
80
+ virtual int getExecutionOrder() const;
81
81
 
82
82
  /**
83
83
  @see SubRenderState::copyFrom.
84
84
  */
85
- virtual void copyFrom (const SubRenderState& rhs);
85
+ virtual void copyFrom(const SubRenderState& rhs);
86
86
 
87
87
  /**
88
88
  @see SubRenderState::preAddToRenderState.
89
89
  */
90
- virtual bool preAddToRenderState (const RenderState* renderState, Pass* srcPass, Pass* dstPass);
90
+ virtual bool preAddToRenderState(const RenderState* renderState, Pass* srcPass, Pass* dstPass);
91
91
 
92
92
  /**
93
93
  Set the resolve stage flags that this sub render state will produce.
@@ -95,44 +95,53 @@ public:
95
95
  and the pixel shader should output diffuse component he should pass SF_VS_INPUT_DIFFUSE | SF_PS_OUTPUT_DIFFUSE.
96
96
  @param flags The stage flag to set.
97
97
  */
98
- void setResolveStageFlags (unsigned int flags) { mResolveStageFlags = flags; }
98
+ void setResolveStageFlags(unsigned int flags) { mResolveStageFlags = flags; }
99
99
 
100
100
  /**
101
101
  Get the current resolve stage flags.
102
102
  */
103
- unsigned int getResolveStageFlags () const { return mResolveStageFlags; }
103
+ unsigned int getResolveStageFlags() const { return mResolveStageFlags; }
104
104
 
105
105
  /**
106
106
  Add the given mask to resolve stage flags that this sub render state will produce.
107
107
  @param mask The mask to add to current flag set.
108
108
  */
109
- void addResolveStageMask (unsigned int mask) { mResolveStageFlags |= mask; }
109
+ void addResolveStageMask(unsigned int mask) { mResolveStageFlags |= mask; }
110
110
 
111
111
  /**
112
112
  Remove the given mask from the resolve stage flags that this sub render state will produce.
113
113
  @param mask The mask to remove from current flag set.
114
114
  */
115
- void removeResolveStageMask (unsigned int mask) { mResolveStageFlags &= ~mask; }
115
+ void removeResolveStageMask(unsigned int mask) { mResolveStageFlags &= ~mask; }
116
116
 
117
117
  static String Type;
118
118
 
119
119
  // Protected methods
120
120
  protected:
121
- virtual bool resolveParameters (ProgramSet* programSet);
122
- virtual bool resolveDependencies (ProgramSet* programSet);
123
- virtual bool addFunctionInvocations (ProgramSet* programSet);
121
+ virtual bool resolveParameters(ProgramSet* programSet);
122
+ virtual bool resolveDependencies(ProgramSet* programSet);
123
+ virtual bool addFunctionInvocations(ProgramSet* programSet);
124
124
 
125
125
  // Attributes.
126
126
  protected:
127
- ParameterPtr mVSInputDiffuse; // Vertex shader input diffuse component.
128
- ParameterPtr mVSInputSpecular; // Vertex shader input specular component.
129
- ParameterPtr mVSOutputDiffuse; // Vertex shader output diffuse component.
130
- ParameterPtr mVSOutputSpecular; // Vertex shader input specular component.
131
- ParameterPtr mPSInputDiffuse; // Pixel shader input diffuse component.
132
- ParameterPtr mPSInputSpecular; // Pixel shader input specular component.
133
- ParameterPtr mPSOutputDiffuse; // Pixel shader output diffuse component.
134
- ParameterPtr mPSOutputSpecular; // Pixel shader input specular component.
135
- unsigned int mResolveStageFlags; // Stage flags that defines resolve parameters definitions.
127
+ // Vertex shader input diffuse component.
128
+ ParameterPtr mVSInputDiffuse;
129
+ // Vertex shader input specular component.
130
+ ParameterPtr mVSInputSpecular;
131
+ // Vertex shader output diffuse component.
132
+ ParameterPtr mVSOutputDiffuse;
133
+ // Vertex shader input specular component.
134
+ ParameterPtr mVSOutputSpecular;
135
+ // Pixel shader input diffuse component.
136
+ ParameterPtr mPSInputDiffuse;
137
+ // Pixel shader input specular component.
138
+ ParameterPtr mPSInputSpecular;
139
+ // Pixel shader output diffuse component.
140
+ ParameterPtr mPSOutputDiffuse;
141
+ // Pixel shader input specular component.
142
+ ParameterPtr mPSOutputSpecular;
143
+ // Stage flags that defines resolve parameters definitions.
144
+ unsigned int mResolveStageFlags;
136
145
  };
137
146
 
138
147
 
@@ -147,17 +156,17 @@ public:
147
156
  /**
148
157
  @see SubRenderStateFactory::getType.
149
158
  */
150
- virtual const String& getType () const;
159
+ virtual const String& getType() const;
151
160
 
152
161
  /**
153
162
  @see SubRenderStateFactory::createInstance.
154
163
  */
155
- virtual SubRenderState* createInstance (ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
164
+ virtual SubRenderState* createInstance(ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
156
165
 
157
166
  /**
158
167
  @see SubRenderStateFactory::writeInstance.
159
168
  */
160
- virtual void writeInstance (MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
169
+ virtual void writeInstance(MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
161
170
 
162
171
 
163
172
  protected:
@@ -165,7 +174,7 @@ protected:
165
174
  /**
166
175
  @see SubRenderStateFactory::createInstanceImpl.
167
176
  */
168
- virtual SubRenderState* createInstanceImpl ();
177
+ virtual SubRenderState* createInstanceImpl();
169
178
 
170
179
 
171
180
  };
@@ -67,27 +67,27 @@ public:
67
67
  /**
68
68
  @see SubRenderState::getType.
69
69
  */
70
- virtual const String& getType () const;
70
+ virtual const String& getType() const;
71
71
 
72
72
  /**
73
73
  @see SubRenderState::getType.
74
74
  */
75
- virtual int getExecutionOrder () const;
75
+ virtual int getExecutionOrder() const;
76
76
 
77
77
  /**
78
78
  @see SubRenderState::updateGpuProgramsParams.
79
79
  */
80
- virtual void updateGpuProgramsParams (Renderable* rend, Pass* pass, const AutoParamDataSource* source, const LightList* pLightList);
80
+ virtual void updateGpuProgramsParams(Renderable* rend, Pass* pass, const AutoParamDataSource* source, const LightList* pLightList);
81
81
 
82
82
  /**
83
83
  @see SubRenderState::copyFrom.
84
84
  */
85
- virtual void copyFrom (const SubRenderState& rhs);
85
+ virtual void copyFrom(const SubRenderState& rhs);
86
86
 
87
87
  /**
88
88
  @see SubRenderState::preAddToRenderState.
89
89
  */
90
- virtual bool preAddToRenderState (const RenderState* renderState, Pass* srcPass, Pass* dstPass);
90
+ virtual bool preAddToRenderState(const RenderState* renderState, Pass* srcPass, Pass* dstPass);
91
91
 
92
92
  /**
93
93
  Set the fog properties this fog sub render state should emulate.
@@ -98,7 +98,7 @@ public:
98
98
  @param fogDensity Fog density used in exponential modes only.
99
99
  @see http://msdn.microsoft.com/en-us/library/bb173401.aspx
100
100
  */
101
- void setFogProperties (FogMode fogMode,
101
+ void setFogProperties(FogMode fogMode,
102
102
  const ColourValue& fogColour,
103
103
  float fogStart,
104
104
  float fogEnd,
@@ -108,12 +108,12 @@ public:
108
108
  Set the fog calculation mode. Either per vertex or per pixel.
109
109
  @param calcMode The calculation mode to set.
110
110
  */
111
- void setCalcMode (CalcMode calcMode) { mCalcMode = calcMode; }
111
+ void setCalcMode(CalcMode calcMode) { mCalcMode = calcMode; }
112
112
 
113
113
  /**
114
114
  Return the current calculation mode.
115
115
  */
116
- CalcMode getCalcMode () const { return mCalcMode; }
116
+ CalcMode getCalcMode() const { return mCalcMode; }
117
117
 
118
118
  static String Type;
119
119
 
@@ -123,35 +123,49 @@ protected:
123
123
  /**
124
124
  @see SubRenderState::resolveParameters.
125
125
  */
126
- virtual bool resolveParameters (ProgramSet* programSet);
126
+ virtual bool resolveParameters(ProgramSet* programSet);
127
127
 
128
128
  /**
129
129
  @see SubRenderState::resolveDependencies.
130
130
  */
131
- virtual bool resolveDependencies (ProgramSet* programSet);
131
+ virtual bool resolveDependencies(ProgramSet* programSet);
132
132
 
133
133
  /**
134
134
  @see SubRenderState::addFunctionInvocations.
135
135
  */
136
- virtual bool addFunctionInvocations (ProgramSet* programSet);
136
+ virtual bool addFunctionInvocations(ProgramSet* programSet);
137
137
 
138
138
  // Attributes.
139
139
  protected:
140
- CalcMode mCalcMode; // Fog calculation mode.
141
- FogMode mFogMode; // Fog formula.
142
- ColourValue mFogColourValue; // Fog colour value.
143
- Vector4 mFogParamsValue; // Fog parameters (density, start, end, 1/end-start).
144
- bool mPassOverrideParams; // True if the fog parameters should be taken from the pass.
145
-
146
- UniformParameterPtr mWorldViewProjMatrix; // World view projection parameter.
147
- UniformParameterPtr mFogColour; // Fog colour parameter.
148
- UniformParameterPtr mFogParams; // Fog parameters program parameter.
149
- ParameterPtr mVSInPos; // Vertex shader input position parameter.
150
- ParameterPtr mVSOutFogFactor; // Vertex shader output fog colour parameter.
151
- ParameterPtr mPSInFogFactor; // Pixel shader input fog factor.
152
- ParameterPtr mVSOutDepth; // Vertex shader output depth.
153
- ParameterPtr mPSInDepth; // Pixel shader input depth.
154
- ParameterPtr mPSOutDiffuse; // Pixel shader output diffuse colour.
140
+ // Fog calculation mode.
141
+ CalcMode mCalcMode;
142
+ // Fog formula.
143
+ FogMode mFogMode;
144
+ // Fog colour value.
145
+ ColourValue mFogColourValue;
146
+ // Fog parameters (density, start, end, 1/end-start).
147
+ Vector4 mFogParamsValue;
148
+ // True if the fog parameters should be taken from the pass.
149
+ bool mPassOverrideParams;
150
+
151
+ // World view projection parameter.
152
+ UniformParameterPtr mWorldViewProjMatrix;
153
+ // Fog colour parameter.
154
+ UniformParameterPtr mFogColour;
155
+ // Fog parameters program parameter.
156
+ UniformParameterPtr mFogParams;
157
+ // Vertex shader input position parameter.
158
+ ParameterPtr mVSInPos;
159
+ // Vertex shader output fog colour parameter.
160
+ ParameterPtr mVSOutFogFactor;
161
+ // Pixel shader input fog factor.
162
+ ParameterPtr mPSInFogFactor;
163
+ // Vertex shader output depth.
164
+ ParameterPtr mVSOutDepth;
165
+ // Pixel shader input depth.
166
+ ParameterPtr mPSInDepth;
167
+ // Pixel shader output diffuse colour.
168
+ ParameterPtr mPSOutDiffuse;
155
169
  };
156
170
 
157
171
 
@@ -166,17 +180,17 @@ public:
166
180
  /**
167
181
  @see SubRenderStateFactory::getType.
168
182
  */
169
- virtual const String& getType () const;
183
+ virtual const String& getType() const;
170
184
 
171
185
  /**
172
186
  @see SubRenderStateFactory::createInstance.
173
187
  */
174
- virtual SubRenderState* createInstance (ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
188
+ virtual SubRenderState* createInstance(ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
175
189
 
176
190
  /**
177
191
  @see SubRenderStateFactory::writeInstance.
178
192
  */
179
- virtual void writeInstance (MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
193
+ virtual void writeInstance(MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
180
194
 
181
195
 
182
196
  protected:
@@ -184,7 +198,7 @@ protected:
184
198
  /**
185
199
  @see SubRenderStateFactory::createInstanceImpl.
186
200
  */
187
- virtual SubRenderState* createInstanceImpl ();
201
+ virtual SubRenderState* createInstanceImpl();
188
202
 
189
203
 
190
204
  };