ruby-ogre 0.0.3-x86-linux → 0.0.4-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -34,7 +34,7 @@ THE SOFTWARE.
|
|
34
34
|
//Bring in the specific platform's header file
|
35
35
|
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
36
36
|
# include "WIN32/OgreTimerImp.h"
|
37
|
-
#elif
|
37
|
+
#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX
|
38
38
|
# include "GLX/OgreTimerImp.h"
|
39
39
|
#elif OGRE_PLATFORM == OGRE_PLATFORM_NACL
|
40
40
|
# include "NaCl/OgreTimerImp.h"
|
@@ -132,8 +132,6 @@ namespace Ogre {
|
|
132
132
|
# else
|
133
133
|
# define OGRE_IS_NATIVE_WCHAR_T 0
|
134
134
|
# endif
|
135
|
-
#elif OGRE_PLATFORM == OGRE_PLATFORM_SYMBIAN
|
136
|
-
# define OGRE_IS_NATIVE_WCHAR_T 0
|
137
135
|
#else // OGRE_COMPILER != OGRE_COMPILER_MSVC
|
138
136
|
|
139
137
|
// Assumed wchar_t is natively for other compilers
|
@@ -32,7 +32,9 @@ THE SOFTWARE.
|
|
32
32
|
#include "OgrePlatform.h"
|
33
33
|
|
34
34
|
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
35
|
-
#
|
35
|
+
# if !defined(WIN32_LEAN_AND_MEAN)
|
36
|
+
# define WIN32_LEAN_AND_MEAN
|
37
|
+
# endif
|
36
38
|
# if !defined(NOMINMAX) && defined(_MSC_VER)
|
37
39
|
# define NOMINMAX // required to stop windows.h messing up std::min
|
38
40
|
# endif
|
@@ -472,7 +472,7 @@ namespace Ogre
|
|
472
472
|
class _OgreExport RequestHandlerHolder : public UtilityAlloc
|
473
473
|
{
|
474
474
|
protected:
|
475
|
-
OGRE_RW_MUTEX(mRWMutex)
|
475
|
+
OGRE_RW_MUTEX(mRWMutex)
|
476
476
|
RequestHandler* mHandler;
|
477
477
|
public:
|
478
478
|
RequestHandlerHolder(RequestHandler* handler)
|
@@ -529,7 +529,7 @@ namespace Ogre
|
|
529
529
|
OGRE_MUTEX(mRequestMutex)
|
530
530
|
OGRE_MUTEX(mProcessMutex)
|
531
531
|
OGRE_MUTEX(mResponseMutex)
|
532
|
-
OGRE_RW_MUTEX(mRequestHandlerMutex)
|
532
|
+
OGRE_RW_MUTEX(mRequestHandlerMutex)
|
533
533
|
|
534
534
|
|
535
535
|
void processRequestResponse(Request* r, bool synchronous);
|
@@ -52,23 +52,23 @@ public:
|
|
52
52
|
/** Class constructor.
|
53
53
|
@param type The type of this program.
|
54
54
|
*/
|
55
|
-
CGProgramProcessor
|
55
|
+
CGProgramProcessor();
|
56
56
|
|
57
57
|
/** Class destructor */
|
58
|
-
virtual ~CGProgramProcessor
|
58
|
+
virtual ~CGProgramProcessor();
|
59
59
|
|
60
60
|
/** Return the target language of this processor. */
|
61
|
-
virtual const String&
|
61
|
+
virtual const String& getTargetLanguage() const { return TargetLanguage; }
|
62
62
|
|
63
63
|
/**
|
64
64
|
@see ProgramProcessor::preCreateGpuPrograms
|
65
65
|
*/
|
66
|
-
virtual bool
|
66
|
+
virtual bool preCreateGpuPrograms(ProgramSet* programSet);
|
67
67
|
|
68
68
|
/**
|
69
69
|
@see ProgramProcessor::postCreateGpuPrograms
|
70
70
|
*/
|
71
|
-
virtual bool
|
71
|
+
virtual bool postCreateGpuPrograms(ProgramSet* programSet);
|
72
72
|
|
73
73
|
static String TargetLanguage;
|
74
74
|
|
@@ -52,20 +52,20 @@ public:
|
|
52
52
|
/** Class constructor.
|
53
53
|
@param language The target shader language.
|
54
54
|
*/
|
55
|
-
CGProgramWriter
|
55
|
+
CGProgramWriter();
|
56
56
|
|
57
57
|
/** Class destructor */
|
58
|
-
virtual ~CGProgramWriter
|
58
|
+
virtual ~CGProgramWriter();
|
59
59
|
|
60
60
|
/**
|
61
61
|
@see ProgramWriter::writeSourceCode.
|
62
62
|
*/
|
63
|
-
virtual void
|
63
|
+
virtual void writeSourceCode(std::ostream& os, Program* program);
|
64
64
|
|
65
65
|
/**
|
66
66
|
@see ProgramWriter::getTargetLanguage.
|
67
67
|
*/
|
68
|
-
virtual const String&
|
68
|
+
virtual const String& getTargetLanguage() const { return TargetLanguage; }
|
69
69
|
|
70
70
|
static String TargetLanguage;
|
71
71
|
|
@@ -73,35 +73,37 @@ public:
|
|
73
73
|
protected:
|
74
74
|
|
75
75
|
/** Initialize string maps. */
|
76
|
-
void
|
76
|
+
void initializeStringMaps();
|
77
77
|
|
78
78
|
/** Write the program dependencies. */
|
79
|
-
void
|
79
|
+
void writeProgramDependencies(std::ostream& os, Program* program);
|
80
80
|
|
81
81
|
/** Write a uniform parameter. */
|
82
|
-
void
|
82
|
+
void writeUniformParameter(std::ostream& os, UniformParameterPtr parameter);
|
83
83
|
|
84
84
|
/** Write a function parameter. */
|
85
|
-
void
|
85
|
+
void writeFunctionParameter(std::ostream& os, ParameterPtr parameter);
|
86
86
|
|
87
87
|
/** Write a local parameter. */
|
88
|
-
void
|
88
|
+
void writeLocalParameter(std::ostream& os, ParameterPtr parameter);
|
89
89
|
|
90
90
|
/** Write a function declaration. */
|
91
|
-
void
|
91
|
+
void writeFunctionDeclaration(std::ostream& os, Function* function, ParameterPtr & colorParameter);
|
92
92
|
|
93
93
|
/** Write function atom instance. */
|
94
|
-
void
|
94
|
+
void writeAtomInstance(std::ostream& os, FunctionAtom* atom);
|
95
95
|
|
96
96
|
|
97
97
|
protected:
|
98
|
-
typedef
|
99
|
-
typedef
|
98
|
+
typedef map<GpuConstantType, const char*>::type GpuConstTypeToStringMap;
|
99
|
+
typedef map<Parameter::Semantic, const char*>::type ParamSemanticToStringMap;
|
100
100
|
|
101
101
|
// Attributes.
|
102
102
|
protected:
|
103
|
-
|
104
|
-
|
103
|
+
// Map between GPU constant type to string value.
|
104
|
+
GpuConstTypeToStringMap mGpuConstTypeMap;
|
105
|
+
// Map between parameter semantic to string value.
|
106
|
+
ParamSemanticToStringMap mParamSemanticMap;
|
105
107
|
};
|
106
108
|
|
107
109
|
/** CG program writer factory implementation.
|
@@ -68,17 +68,17 @@ public:
|
|
68
68
|
/**
|
69
69
|
@see SubRenderState::resolveParameters.
|
70
70
|
*/
|
71
|
-
virtual bool resolveParameters
|
71
|
+
virtual bool resolveParameters(ProgramSet* programSet);
|
72
72
|
|
73
73
|
/**
|
74
74
|
@see SubRenderState::resolveDependencies.
|
75
75
|
*/
|
76
|
-
virtual bool resolveDependencies
|
76
|
+
virtual bool resolveDependencies(ProgramSet* programSet);
|
77
77
|
|
78
78
|
/**
|
79
79
|
@see SubRenderState::addFunctionInvocations.
|
80
80
|
*/
|
81
|
-
virtual bool addFunctionInvocations
|
81
|
+
virtual bool addFunctionInvocations(ProgramSet* programSet);
|
82
82
|
|
83
83
|
// Protected methods
|
84
84
|
protected:
|
@@ -156,23 +156,24 @@ protected:
|
|
156
156
|
/**
|
157
157
|
@see SubRenderState::resolveParameters.
|
158
158
|
*/
|
159
|
-
virtual bool resolveParameters
|
159
|
+
virtual bool resolveParameters(ProgramSet* programSet);
|
160
160
|
|
161
161
|
/**
|
162
162
|
@see SubRenderState::resolveDependencies.
|
163
163
|
*/
|
164
|
-
virtual bool resolveDependencies
|
164
|
+
virtual bool resolveDependencies(ProgramSet* programSet);
|
165
165
|
|
166
166
|
/**
|
167
167
|
@see SubRenderState::addFunctionInvocations.
|
168
168
|
*/
|
169
|
-
virtual bool addFunctionInvocations
|
169
|
+
virtual bool addFunctionInvocations(ProgramSet* programSet);
|
170
170
|
|
171
171
|
SharedPtr<LinearSkinning> mLinear;
|
172
172
|
SharedPtr<DualQuaternionSkinning> mDualQuat;
|
173
173
|
SharedPtr<HardwareSkinningTechnique> mActiveTechnique;
|
174
174
|
|
175
|
-
|
175
|
+
///The factory which created this sub render state
|
176
|
+
const HardwareSkinningFactory* mCreator;
|
176
177
|
SkinningType mSkinningType;
|
177
178
|
};
|
178
179
|
|
@@ -101,17 +101,17 @@ public:
|
|
101
101
|
/**
|
102
102
|
@see SubRenderState::resolveParameters.
|
103
103
|
*/
|
104
|
-
virtual bool resolveParameters
|
104
|
+
virtual bool resolveParameters(ProgramSet* programSet) = 0;
|
105
105
|
|
106
106
|
/**
|
107
107
|
@see SubRenderState::resolveDependencies.
|
108
108
|
*/
|
109
|
-
virtual bool resolveDependencies
|
109
|
+
virtual bool resolveDependencies(ProgramSet* programSet) = 0;
|
110
110
|
|
111
111
|
/**
|
112
112
|
@see SubRenderState::addFunctionInvocations.
|
113
113
|
*/
|
114
|
-
virtual bool addFunctionInvocations
|
114
|
+
virtual bool addFunctionInvocations(ProgramSet* programSet) = 0;
|
115
115
|
|
116
116
|
protected:
|
117
117
|
/** Translates an index number to a mask value */
|
@@ -67,28 +67,28 @@ 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
|
/**
|
89
89
|
@see SubRenderState::preAddToRenderState.
|
90
90
|
*/
|
91
|
-
virtual bool
|
91
|
+
virtual bool preAddToRenderState(const RenderState* renderState, Pass* srcPass, Pass* dstPass);
|
92
92
|
|
93
93
|
|
94
94
|
|
@@ -98,7 +98,7 @@ public:
|
|
98
98
|
far point, and each value in between is both a far point of the previous
|
99
99
|
split, and a near point for the next one.
|
100
100
|
*/
|
101
|
-
void
|
101
|
+
void setSplitPoints(const SplitPointList& newSplitPoints);
|
102
102
|
|
103
103
|
static String Type;
|
104
104
|
|
@@ -108,13 +108,20 @@ protected:
|
|
108
108
|
// Shadow texture parameters.
|
109
109
|
struct _OgreRTSSExport ShadowTextureParams
|
110
110
|
{
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
111
|
+
// The max range of this shadow texture in terms of PSSM (far plane of viewing camera).
|
112
|
+
Real mMaxRange;
|
113
|
+
// The shadow map sampler index.
|
114
|
+
unsigned int mTextureSamplerIndex;
|
115
|
+
// The shadow map sampler.
|
116
|
+
UniformParameterPtr mTextureSampler;
|
117
|
+
// The inverse texture
|
118
|
+
UniformParameterPtr mInvTextureSize;
|
119
|
+
// The source light view projection matrix combined with world matrix.
|
120
|
+
UniformParameterPtr mWorldViewProjMatrix;
|
121
|
+
// The vertex shader output position in light space.
|
122
|
+
ParameterPtr mVSOutLightPosition;
|
123
|
+
// The pixel shader input position in light space.
|
124
|
+
ParameterPtr mPSInLightPosition;
|
118
125
|
|
119
126
|
};
|
120
127
|
|
@@ -130,27 +137,27 @@ protected:
|
|
130
137
|
/**
|
131
138
|
@see SubRenderState::resolveParameters.
|
132
139
|
*/
|
133
|
-
virtual bool
|
140
|
+
virtual bool resolveParameters(ProgramSet* programSet);
|
134
141
|
|
135
142
|
/**
|
136
143
|
@see SubRenderState::resolveDependencies.
|
137
144
|
*/
|
138
|
-
virtual bool
|
145
|
+
virtual bool resolveDependencies(ProgramSet* programSet);
|
139
146
|
|
140
147
|
/**
|
141
148
|
@see SubRenderState::addFunctionInvocations.
|
142
149
|
*/
|
143
|
-
virtual bool
|
150
|
+
virtual bool addFunctionInvocations(ProgramSet* programSet);
|
144
151
|
|
145
152
|
/**
|
146
153
|
Internal method that adds related vertex shader functions invocations.
|
147
154
|
*/
|
148
|
-
bool
|
155
|
+
bool addVSInvocation(Function* vsMain, const int groupOrder, int& internalCounter);
|
149
156
|
|
150
157
|
/**
|
151
158
|
Internal method that adds related pixel shader functions invocations.
|
152
159
|
*/
|
153
|
-
bool
|
160
|
+
bool addPSInvocation(Program* psProgram, const int groupOrder, int& internalCounter);
|
154
161
|
|
155
162
|
|
156
163
|
|
@@ -158,17 +165,28 @@ protected:
|
|
158
165
|
|
159
166
|
// Attributes.
|
160
167
|
protected:
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
ParameterPtr
|
167
|
-
|
168
|
-
ParameterPtr
|
169
|
-
|
170
|
-
ParameterPtr
|
171
|
-
|
168
|
+
// Shadow texture parameter list.
|
169
|
+
ShadowTextureParamsList mShadowTextureParamsList;
|
170
|
+
// Split points parameter.
|
171
|
+
UniformParameterPtr mPSSplitPoints;
|
172
|
+
// Vertex shader input position parameter.
|
173
|
+
ParameterPtr mVSInPos;
|
174
|
+
// Vertex shader output position (clip space) parameter.
|
175
|
+
ParameterPtr mVSOutPos;
|
176
|
+
// Vertex shader output depth (clip space) parameter.
|
177
|
+
ParameterPtr mVSOutDepth;
|
178
|
+
// Pixel shader input depth (clip space) parameter.
|
179
|
+
ParameterPtr mPSInDepth;
|
180
|
+
// Pixel shader local computed shadow colour parameter.
|
181
|
+
ParameterPtr mPSLocalShadowFactor;
|
182
|
+
// Pixel shader in/local diffuse colour parameter.
|
183
|
+
ParameterPtr mPSDiffuse;
|
184
|
+
// Pixel shader output diffuse colour parameter.
|
185
|
+
ParameterPtr mPSOutDiffuse;
|
186
|
+
// Pixel shader in/local specular colour parameter.
|
187
|
+
ParameterPtr mPSSpecualr;
|
188
|
+
// Derived scene colour (ambient term).
|
189
|
+
UniformParameterPtr mPSDerivedSceneColour;
|
172
190
|
|
173
191
|
};
|
174
192
|
|
@@ -184,12 +202,12 @@ public:
|
|
184
202
|
/**
|
185
203
|
@see SubRenderStateFactory::getType.
|
186
204
|
*/
|
187
|
-
virtual const String&
|
205
|
+
virtual const String& getType() const;
|
188
206
|
|
189
207
|
/**
|
190
208
|
@see SubRenderStateFactory::createInstance.
|
191
209
|
*/
|
192
|
-
virtual SubRenderState*
|
210
|
+
virtual SubRenderState* createInstance(ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
|
193
211
|
|
194
212
|
|
195
213
|
protected:
|
@@ -197,7 +215,7 @@ protected:
|
|
197
215
|
/**
|
198
216
|
@see SubRenderStateFactory::createInstanceImpl.
|
199
217
|
*/
|
200
|
-
virtual SubRenderState*
|
218
|
+
virtual SubRenderState* createInstanceImpl();
|
201
219
|
|
202
220
|
|
203
221
|
};
|
@@ -97,10 +97,14 @@ public:
|
|
97
97
|
{
|
98
98
|
TextureBlend() : blendMode(LB_Invalid), sourceModifier(SM_Invalid), customNum(0) {}
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
100
|
+
//The blend mode to use
|
101
|
+
BlendMode blendMode;
|
102
|
+
//The source modification to use
|
103
|
+
SourceModifier sourceModifier;
|
104
|
+
// The number of the custom param controlling the source modification
|
105
|
+
int customNum;
|
106
|
+
//The parameter controlling the source modification
|
107
|
+
ParameterPtr modControlParam;
|
104
108
|
};
|
105
109
|
|
106
110
|
|
@@ -145,7 +149,7 @@ public:
|
|
145
149
|
/**
|
146
150
|
@see SubRenderState::copyFrom.
|
147
151
|
*/
|
148
|
-
virtual void copyFrom
|
152
|
+
virtual void copyFrom(const SubRenderState& rhs);
|
149
153
|
|
150
154
|
static String Type;
|
151
155
|
|
@@ -203,17 +207,17 @@ public:
|
|
203
207
|
/**
|
204
208
|
@see SubRenderStateFactory::getType.
|
205
209
|
*/
|
206
|
-
virtual const String&
|
210
|
+
virtual const String& getType() const;
|
207
211
|
|
208
212
|
/**
|
209
213
|
@see SubRenderStateFactory::createInstance.
|
210
214
|
*/
|
211
|
-
virtual SubRenderState*
|
215
|
+
virtual SubRenderState* createInstance(ScriptCompiler* compiler, PropertyAbstractNode* prop, TextureUnitState* texState, SGScriptTranslator* translator);
|
212
216
|
|
213
217
|
/**
|
214
218
|
@see SubRenderStateFactory::writeInstance.
|
215
219
|
*/
|
216
|
-
virtual void
|
220
|
+
virtual void writeInstance(MaterialSerializer* ser, SubRenderState* subRenderState, const TextureUnitState* srcTextureUnit, const TextureUnitState* dstTextureUnit);
|
217
221
|
|
218
222
|
|
219
223
|
protected:
|
@@ -221,7 +225,7 @@ protected:
|
|
221
225
|
/**
|
222
226
|
@see SubRenderStateFactory::createInstanceImpl.
|
223
227
|
*/
|
224
|
-
virtual SubRenderState*
|
228
|
+
virtual SubRenderState* createInstanceImpl();
|
225
229
|
|
226
230
|
/**
|
227
231
|
@Converts string to Enum
|
@@ -59,33 +59,33 @@ public:
|
|
59
59
|
/**
|
60
60
|
@see SubRenderState::resolveParameters.
|
61
61
|
*/
|
62
|
-
virtual bool resolveParameters
|
62
|
+
virtual bool resolveParameters(ProgramSet* programSet);
|
63
63
|
|
64
64
|
/**
|
65
65
|
@see SubRenderState::resolveDependencies.
|
66
66
|
*/
|
67
|
-
virtual bool resolveDependencies
|
67
|
+
virtual bool resolveDependencies(ProgramSet* programSet);
|
68
68
|
|
69
69
|
/**
|
70
70
|
@see SubRenderState::addFunctionInvocations.
|
71
71
|
*/
|
72
|
-
virtual bool addFunctionInvocations
|
72
|
+
virtual bool addFunctionInvocations(ProgramSet* programSet);
|
73
73
|
|
74
74
|
protected:
|
75
75
|
/** Adds functions to calculate position data in world, object and projective space */
|
76
|
-
void addPositionCalculations
|
76
|
+
void addPositionCalculations(Function* vsMain, int& funcCounter);
|
77
77
|
|
78
78
|
/** Adds the weight of a given position for a given index */
|
79
|
-
void addIndexedPositionWeight
|
79
|
+
void addIndexedPositionWeight(Function* vsMain, int index, int& funcCounter);
|
80
80
|
|
81
81
|
/** Adds the calculations for calculating a normal related element */
|
82
|
-
void addNormalRelatedCalculations
|
82
|
+
void addNormalRelatedCalculations(Function* vsMain,
|
83
83
|
ParameterPtr& pNormalRelatedParam,
|
84
84
|
ParameterPtr& pNormalWorldRelatedParam,
|
85
85
|
int& funcCounter);
|
86
86
|
|
87
87
|
/** Adds the weight of a given normal related parameter for a given index */
|
88
|
-
void addIndexedNormalRelatedWeight
|
88
|
+
void addIndexedNormalRelatedWeight(Function* vsMain, ParameterPtr& pNormalRelatedParam,
|
89
89
|
ParameterPtr& pNormalWorldRelatedParam,
|
90
90
|
int index, int& funcCounter);
|
91
91
|
};
|