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.
- data/Rakefile +7 -8
- data/bindings/ogre/interface/ogre_all.i +1 -0
- data/bindings/ogre/interface/ogre_wrap.cpp +591 -46
- data/bindings/ogre/interface/ogre_wrap.o +0 -0
- data/bindings/ogrebites/interface/ogrebites_wrap.o +0 -0
- data/bindings/procedural/interface/procedural_wrap.o +0 -0
- data/deps/include/OGRE/OgreAny.h +23 -1
- data/deps/include/OGRE/OgreBillboardChain.h +5 -1
- data/deps/include/OGRE/OgreBillboardParticleRenderer.h +2 -0
- data/deps/include/OGRE/OgreConfigDialog.h +0 -2
- data/deps/include/OGRE/OgreDynLib.h +1 -7
- data/deps/include/OGRE/OgreErrorDialog.h +0 -2
- data/deps/include/OGRE/OgreHeaderSuffix.h +3 -3
- data/deps/include/OGRE/OgreInstanceBatch.h +4 -0
- data/deps/include/OGRE/OgreInstanceManager.h +5 -0
- data/deps/include/OGRE/OgreIteratorRange.h +13 -2
- data/deps/include/OGRE/OgreParticleSystem.h +2 -0
- data/deps/include/OGRE/OgreParticleSystemRenderer.h +4 -0
- data/deps/include/OGRE/OgrePlatform.h +5 -28
- data/deps/include/OGRE/OgrePrerequisites.h +1 -1
- data/deps/include/OGRE/OgreProfiler.h +102 -59
- data/deps/include/OGRE/OgreProgressiveMesh.h +2 -2
- data/deps/include/OGRE/OgreRenderSystem.h +18 -1
- data/deps/include/OGRE/OgreRoot.h +1 -1
- data/deps/include/OGRE/OgreSearchOps.h +0 -5
- data/deps/include/OGRE/OgreSimpleRenderable.h +1 -1
- data/deps/include/OGRE/OgreStdHeaders.h +2 -2
- data/deps/include/OGRE/OgreStringConverter.h +5 -0
- data/deps/include/OGRE/OgreTimer.h +1 -1
- data/deps/include/OGRE/OgreUTFString.h +0 -2
- data/deps/include/OGRE/OgreWindowEventUtilities.h +3 -1
- data/deps/include/OGRE/OgreWorkQueue.h +2 -2
- data/deps/include/OGRE/RTShaderSystem/OgreShaderCGProgramProcessor.h +5 -5
- data/deps/include/OGRE/RTShaderSystem/OgreShaderCGProgramWriter.h +17 -15
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExDualQuaternionSkinning.h +3 -3
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExHardwareSkinning.h +5 -4
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExHardwareSkinningTechnique.h +3 -3
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExIntegratedPSSM3.h +50 -32
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExLayeredBlending.h +13 -9
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExLinearSkinning.h +7 -7
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExNormalMapLighting.h +149 -95
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExPerPixelLighting.h +91 -59
- data/deps/include/OGRE/RTShaderSystem/OgreShaderExTextureAtlasSampler.h +14 -9
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPColour.h +33 -24
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPFog.h +44 -30
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPLighting.h +70 -45
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPRenderStateBuilder.h +11 -10
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPTexturing.h +73 -64
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFFPTransform.h +8 -8
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFunction.h +42 -35
- data/deps/include/OGRE/RTShaderSystem/OgreShaderFunctionAtom.h +38 -32
- data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLESProgramProcessor.h +9 -8
- data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLESProgramWriter.h +45 -36
- data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLProgramProcessor.h +9 -8
- data/deps/include/OGRE/RTShaderSystem/OgreShaderGLSLProgramWriter.h +26 -20
- data/deps/include/OGRE/RTShaderSystem/OgreShaderGenerator.h +211 -160
- data/deps/include/OGRE/RTShaderSystem/OgreShaderHLSLProgramProcessor.h +5 -5
- data/deps/include/OGRE/RTShaderSystem/OgreShaderHLSLProgramWriter.h +17 -15
- data/deps/include/OGRE/RTShaderSystem/OgreShaderMaterialSerializerListener.h +5 -3
- data/deps/include/OGRE/RTShaderSystem/OgreShaderParameter.h +86 -73
- data/deps/include/OGRE/RTShaderSystem/OgreShaderProgram.h +36 -30
- data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramManager.h +38 -31
- data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramProcessor.h +54 -43
- data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramSet.h +18 -14
- data/deps/include/OGRE/RTShaderSystem/OgreShaderProgramWriter.h +10 -10
- data/deps/include/OGRE/RTShaderSystem/OgreShaderRenderState.h +28 -23
- data/deps/include/OGRE/RTShaderSystem/OgreShaderScriptTranslator.h +2 -1
- data/deps/include/OGRE/RTShaderSystem/OgreShaderSubRenderState.h +35 -32
- data/deps/include/OGRE/RenderSystems/GL/GL/wglew.h +2 -2
- data/deps/include/OGRE/RenderSystems/GL/GL/wglext.h +2 -2
- data/deps/include/OGRE/RenderSystems/GL/OgreGLRenderSystem.h +10 -1
- data/deps/include/OGRE/RenderSystems/GL/OgreGLTextureManager.h +2 -0
- data/deps/include/OGRE/Sample.h +5 -0
- data/deps/include/OGRE/SampleContext.h +13 -3
- data/deps/lib/OGRE/Plugin_BSPSceneManager.so +0 -0
- data/deps/lib/OGRE/Plugin_BSPSceneManager.so.1.8.1 +0 -0
- data/deps/lib/OGRE/Plugin_CgProgramManager.so +0 -0
- data/deps/lib/OGRE/Plugin_CgProgramManager.so.1.8.1 +0 -0
- data/deps/lib/OGRE/Plugin_OctreeSceneManager.so +0 -0
- data/deps/lib/OGRE/Plugin_OctreeSceneManager.so.1.8.1 +0 -0
- data/deps/lib/OGRE/Plugin_OctreeZone.so +0 -0
- data/deps/lib/OGRE/Plugin_OctreeZone.so.1.8.1 +0 -0
- data/deps/lib/OGRE/Plugin_PCZSceneManager.so +0 -0
- data/deps/lib/OGRE/Plugin_PCZSceneManager.so.1.8.1 +0 -0
- data/deps/lib/OGRE/Plugin_ParticleFX.so +0 -0
- data/deps/lib/OGRE/Plugin_ParticleFX.so.1.8.1 +0 -0
- data/deps/lib/OGRE/RenderSystem_GL.so +0 -0
- data/deps/lib/OGRE/RenderSystem_GL.so.1.8.1 +0 -0
- data/deps/lib/libOgreMain.so +0 -0
- data/deps/lib/libOgreMain.so.1.8.1 +0 -0
- data/deps/lib/libOgrePaging.so +0 -0
- data/deps/lib/libOgrePaging.so.1.8.1 +0 -0
- data/deps/lib/libOgreProcedural.so +0 -0
- data/deps/lib/libOgreRTShaderSystem.so +0 -0
- data/deps/lib/libOgreRTShaderSystem.so.1.8.1 +0 -0
- data/deps/lib/libOgreTerrain.so +0 -0
- data/deps/lib/libOgreTerrain.so.1.8.1 +0 -0
- data/deps/share/OGRE/media/materials/programs/DiffuseOneTexture.glsles +17 -0
- data/deps/share/OGRE/media/packs/profiler.zip +0 -0
- data/lib/ogre.so +0 -0
- data/lib/ogrebites.so +0 -0
- data/lib/procedural.so +0 -0
- data/lib/version.rb +1 -1
- data/sample/charactor/sinbad.rb +8 -4
- metadata +16 -4
@@ -69,28 +69,28 @@ public:
|
|
69
69
|
/**
|
70
70
|
@see SubRenderState::getType.
|
71
71
|
*/
|
72
|
-
virtual const String&
|
72
|
+
virtual const String& getType() const;
|
73
73
|
|
74
74
|
/**
|
75
75
|
@see SubRenderState::getType.
|
76
76
|
*/
|
77
|
-
virtual int
|
77
|
+
virtual int getExecutionOrder() const;
|
78
78
|
|
79
79
|
/**
|
80
80
|
@see SubRenderState::updateGpuProgramsParams.
|
81
81
|
*/
|
82
|
-
virtual void
|
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
|
87
|
+
virtual void copyFrom(const SubRenderState& rhs);
|
88
88
|
|
89
89
|
|
90
90
|
/**
|
91
91
|
@see SubRenderState::preAddToRenderState.
|
92
92
|
*/
|
93
|
-
virtual bool
|
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
|
-
|
107
|
-
UniformParameterPtr
|
108
|
-
|
109
|
-
UniformParameterPtr
|
110
|
-
|
111
|
-
UniformParameterPtr
|
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
|
116
|
-
typedef LightParamsList::iterator
|
117
|
-
typedef LightParamsList::const_iterator
|
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
|
133
|
+
void setTrackVertexColourType(TrackVertexColourType type) { mTrackVertexColourType = type; }
|
128
134
|
|
129
135
|
/**
|
130
136
|
Return the current track per vertex type.
|
131
137
|
*/
|
132
|
-
TrackVertexColourType
|
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
|
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
|
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
|
157
|
+
void setSpecularEnable(bool enable) { mSpecularEnable = enable; }
|
152
158
|
|
153
159
|
/**
|
154
160
|
Get the specular component state.
|
155
161
|
*/
|
156
|
-
bool
|
162
|
+
bool getSpecularEnable() const { return mSpecularEnable; }
|
157
163
|
|
158
164
|
|
159
165
|
/**
|
160
166
|
@see SubRenderState::resolveParameters.
|
161
167
|
*/
|
162
|
-
virtual bool
|
168
|
+
virtual bool resolveParameters(ProgramSet* programSet);
|
163
169
|
|
164
170
|
/** Resolve global lighting parameters */
|
165
|
-
bool
|
171
|
+
bool resolveGlobalParameters(ProgramSet* programSet);
|
166
172
|
|
167
173
|
/** Resolve per light parameters */
|
168
|
-
bool
|
174
|
+
bool resolvePerLightParameters(ProgramSet* programSet);
|
169
175
|
|
170
176
|
/**
|
171
177
|
@see SubRenderState::resolveDependencies.
|
172
178
|
*/
|
173
|
-
virtual bool
|
179
|
+
virtual bool resolveDependencies(ProgramSet* programSet);
|
174
180
|
|
175
181
|
/**
|
176
182
|
@see SubRenderState::addFunctionInvocations.
|
177
183
|
*/
|
178
|
-
virtual bool
|
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
|
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
|
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
|
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
|
206
|
+
bool addPSFinalAssignmentInvocation(Function* psMain, const int groupOrder, int& internalCounter);
|
201
207
|
|
202
208
|
|
203
209
|
// Attributes.
|
204
210
|
protected:
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
ParameterPtr
|
217
|
-
|
218
|
-
ParameterPtr
|
219
|
-
|
220
|
-
ParameterPtr
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
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&
|
277
|
+
virtual const String& getType() const;
|
246
278
|
|
247
279
|
/**
|
248
280
|
@see SubRenderStateFactory::createInstance.
|
249
281
|
*/
|
250
|
-
virtual SubRenderState*
|
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
|
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*
|
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
|
170
|
-
virtual bool
|
171
|
-
virtual bool
|
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
|
-
|
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
|
-
|
185
|
-
ParameterPtr
|
186
|
-
|
187
|
-
|
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*
|
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&
|
75
|
+
virtual const String& getType() const;
|
76
76
|
|
77
77
|
/**
|
78
78
|
@see SubRenderState::getType.
|
79
79
|
*/
|
80
|
-
virtual int
|
80
|
+
virtual int getExecutionOrder() const;
|
81
81
|
|
82
82
|
/**
|
83
83
|
@see SubRenderState::copyFrom.
|
84
84
|
*/
|
85
|
-
virtual void
|
85
|
+
virtual void copyFrom(const SubRenderState& rhs);
|
86
86
|
|
87
87
|
/**
|
88
88
|
@see SubRenderState::preAddToRenderState.
|
89
89
|
*/
|
90
|
-
virtual bool
|
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
|
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
|
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
|
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
|
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
|
122
|
-
virtual bool
|
123
|
-
virtual bool
|
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
|
-
|
128
|
-
ParameterPtr
|
129
|
-
|
130
|
-
ParameterPtr
|
131
|
-
|
132
|
-
ParameterPtr
|
133
|
-
|
134
|
-
ParameterPtr
|
135
|
-
|
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&
|
159
|
+
virtual const String& getType() const;
|
151
160
|
|
152
161
|
/**
|
153
162
|
@see SubRenderStateFactory::createInstance.
|
154
163
|
*/
|
155
|
-
virtual SubRenderState*
|
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
|
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*
|
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&
|
70
|
+
virtual const String& getType() const;
|
71
71
|
|
72
72
|
/**
|
73
73
|
@see SubRenderState::getType.
|
74
74
|
*/
|
75
|
-
virtual int
|
75
|
+
virtual int getExecutionOrder() const;
|
76
76
|
|
77
77
|
/**
|
78
78
|
@see SubRenderState::updateGpuProgramsParams.
|
79
79
|
*/
|
80
|
-
virtual void
|
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
|
85
|
+
virtual void copyFrom(const SubRenderState& rhs);
|
86
86
|
|
87
87
|
/**
|
88
88
|
@see SubRenderState::preAddToRenderState.
|
89
89
|
*/
|
90
|
-
virtual bool
|
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
|
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
|
111
|
+
void setCalcMode(CalcMode calcMode) { mCalcMode = calcMode; }
|
112
112
|
|
113
113
|
/**
|
114
114
|
Return the current calculation mode.
|
115
115
|
*/
|
116
|
-
CalcMode
|
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
|
126
|
+
virtual bool resolveParameters(ProgramSet* programSet);
|
127
127
|
|
128
128
|
/**
|
129
129
|
@see SubRenderState::resolveDependencies.
|
130
130
|
*/
|
131
|
-
virtual bool
|
131
|
+
virtual bool resolveDependencies(ProgramSet* programSet);
|
132
132
|
|
133
133
|
/**
|
134
134
|
@see SubRenderState::addFunctionInvocations.
|
135
135
|
*/
|
136
|
-
virtual bool
|
136
|
+
virtual bool addFunctionInvocations(ProgramSet* programSet);
|
137
137
|
|
138
138
|
// Attributes.
|
139
139
|
protected:
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
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&
|
183
|
+
virtual const String& getType() const;
|
170
184
|
|
171
185
|
/**
|
172
186
|
@see SubRenderStateFactory::createInstance.
|
173
187
|
*/
|
174
|
-
virtual SubRenderState*
|
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
|
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*
|
201
|
+
virtual SubRenderState* createInstanceImpl();
|
188
202
|
|
189
203
|
|
190
204
|
};
|