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.
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
@@ -52,22 +52,22 @@ public:
52
52
  /** Class constructor.
53
53
  @param type The type of this program.
54
54
  */
55
- HLSLProgramProcessor ();
55
+ HLSLProgramProcessor();
56
56
 
57
57
  /** Class destructor */
58
- virtual ~HLSLProgramProcessor ();
58
+ virtual ~HLSLProgramProcessor();
59
59
 
60
60
  /** Return the target language of this processor. */
61
- virtual const String& getTargetLanguage () const { return TargetLanguage; }
61
+ virtual const String& getTargetLanguage() const { return TargetLanguage; }
62
62
 
63
63
  /**
64
64
  @see ProgramProcessor::preCreateGpuPrograms
65
65
  */
66
- virtual bool preCreateGpuPrograms (ProgramSet* programSet);
66
+ virtual bool preCreateGpuPrograms(ProgramSet* programSet);
67
67
  /**
68
68
  @see ProgramProcessor::postCreateGpuPrograms
69
69
  */
70
- virtual bool postCreateGpuPrograms (ProgramSet* programSet);
70
+ virtual bool postCreateGpuPrograms(ProgramSet* programSet);
71
71
 
72
72
  static String TargetLanguage;
73
73
 
@@ -52,20 +52,20 @@ public:
52
52
  /** Class constructor.
53
53
  @param language The target shader language.
54
54
  */
55
- HLSLProgramWriter ();
55
+ HLSLProgramWriter();
56
56
 
57
57
  /** Class destructor */
58
- virtual ~HLSLProgramWriter ();
58
+ virtual ~HLSLProgramWriter();
59
59
 
60
60
  /**
61
61
  @see ProgramWriter::writeSourceCode.
62
62
  */
63
- virtual void writeSourceCode (std::ostream& os, Program* program);
63
+ virtual void writeSourceCode(std::ostream& os, Program* program);
64
64
 
65
65
  /**
66
66
  @see ProgramWriter::getTargetLanguage.
67
67
  */
68
- virtual const String& getTargetLanguage () const { return TargetLanguage; }
68
+ virtual const String& getTargetLanguage() const { return TargetLanguage; }
69
69
 
70
70
  static String TargetLanguage;
71
71
 
@@ -73,34 +73,36 @@ public:
73
73
  protected:
74
74
 
75
75
  /** Initialize string maps. */
76
- void initializeStringMaps ();
76
+ void initializeStringMaps();
77
77
 
78
78
  /** Write the program dependencies. */
79
- void writeProgramDependencies (std::ostream& os, Program* program);
79
+ void writeProgramDependencies(std::ostream& os, Program* program);
80
80
 
81
81
  /** Write a uniform parameter. */
82
- void writeUniformParameter (std::ostream& os, UniformParameterPtr parameter);
82
+ void writeUniformParameter(std::ostream& os, UniformParameterPtr parameter);
83
83
 
84
84
  /** Write a function parameter. */
85
- void writeFunctionParameter (std::ostream& os, ParameterPtr parameter);
85
+ void writeFunctionParameter(std::ostream& os, ParameterPtr parameter);
86
86
 
87
87
  /** Write a local parameter. */
88
- void writeLocalParameter (std::ostream& os, ParameterPtr parameter);
88
+ void writeLocalParameter(std::ostream& os, ParameterPtr parameter);
89
89
 
90
90
  /** Write a function declaration. */
91
- void writeFunctionDeclaration (std::ostream& os, Function* function, bool & needToTranslateHlsl4Color, ParameterPtr & colorParameter);
91
+ void writeFunctionDeclaration(std::ostream& os, Function* function, bool & needToTranslateHlsl4Color, ParameterPtr & colorParameter);
92
92
 
93
93
  /** Write function atom instance. */
94
- void writeAtomInstance (std::ostream& os, FunctionAtom* atom);
94
+ void writeAtomInstance(std::ostream& os, FunctionAtom* atom);
95
95
 
96
96
  protected:
97
- typedef map<GpuConstantType, const char*>::type GpuConstTypeToStringMap;
98
- typedef map<Parameter::Semantic, const char*>::type ParamSemanticToStringMap;
97
+ typedef map<GpuConstantType, const char*>::type GpuConstTypeToStringMap;
98
+ typedef map<Parameter::Semantic, const char*>::type ParamSemanticToStringMap;
99
99
 
100
100
  // Attributes.
101
101
  protected:
102
- GpuConstTypeToStringMap mGpuConstTypeMap; // Map between GPU constant type to string value.
103
- ParamSemanticToStringMap mParamSemanticMap; // Map between parameter semantic to string value.
102
+ // Map between GPU constant type to string value.
103
+ GpuConstTypeToStringMap mGpuConstTypeMap;
104
+ // Map between parameter semantic to string value.
105
+ ParamSemanticToStringMap mParamSemanticMap;
104
106
  };
105
107
 
106
108
  /** HLSL program writer factory implementation.
@@ -87,7 +87,7 @@ protected:
87
87
  ~SGMaterialSerializerListener();
88
88
 
89
89
  /** Internal method that creates list of SGPass instances composing the given material. */
90
- void createSGPassList (Material* mat, SGPassList& passList);
90
+ void createSGPassList(Material* mat, SGPassList& passList);
91
91
 
92
92
  /** Internal method that returns SGPass instance from a given source pass. */
93
93
  ShaderGenerator::SGPass* getShaderGeneratedPass (const Pass* srcPass);
@@ -95,8 +95,10 @@ protected:
95
95
 
96
96
  // Attributes.
97
97
  protected:
98
- Material* mSourceMaterial; // The current source material that is being written.
99
- SGPassList mSGPassList; // List of SGPass instances composing this material.
98
+ // The current source material that is being written.
99
+ Material* mSourceMaterial;
100
+ // List of SGPass instances composing this material.
101
+ SGPassList mSGPassList;
100
102
 
101
103
 
102
104
  private:
@@ -321,43 +321,49 @@ public:
321
321
  virtual ~Parameter() {};
322
322
 
323
323
  /** Get the name of this parameter. */
324
- const String& getName () const { return mName; }
324
+ const String& getName() const { return mName; }
325
325
 
326
326
  /** Get the type of this parameter. */
327
- GpuConstantType getType () const { return mType; }
327
+ GpuConstantType getType() const { return mType; }
328
328
 
329
329
  /** Get the semantic of this parameter. */
330
- const Semantic& getSemantic () const { return mSemantic; }
330
+ const Semantic& getSemantic() const { return mSemantic; }
331
331
 
332
332
  /** Get the index of this parameter. */
333
- int getIndex () const { return mIndex; }
333
+ int getIndex() const { return mIndex; }
334
334
 
335
335
  /** Return the content of this parameter. */
336
- Content getContent () const { return mContent; }
336
+ Content getContent() const { return mContent; }
337
337
 
338
338
  /** Returns true if this instance is a ConstParameter otherwise false. */
339
- virtual bool isConstParameter () const { return false; }
339
+ virtual bool isConstParameter() const { return false; }
340
340
 
341
341
  /** Returns the string representation of this parameter. */
342
- virtual String toString () const { return mName; }
342
+ virtual String toString() const { return mName; }
343
343
 
344
344
  /** Returns Whether this parameter is an array. */
345
- bool isArray () const { return mSize > 0; }
345
+ bool isArray() const { return mSize > 0; }
346
346
 
347
347
  /** Returns the number of elements in the parameter (for arrays). */
348
- size_t getSize () const { return mSize; }
348
+ size_t getSize() const { return mSize; }
349
349
 
350
350
  /** Sets the number of elements in the parameter (for arrays). */
351
- void setSize (size_t size) { mSize = size; }
351
+ void setSize(size_t size) { mSize = size; }
352
352
 
353
353
  // Attributes.
354
354
  protected:
355
- String mName; // Name of this parameter.
356
- GpuConstantType mType; // Type of this parameter.
357
- Semantic mSemantic; // Semantic of this parameter.
358
- int mIndex; // Index of this parameter.
359
- Content mContent; // The content of this parameter.
360
- size_t mSize; // Number of elements in the parameter (for arrays)
355
+ // Name of this parameter.
356
+ String mName;
357
+ // Type of this parameter.
358
+ GpuConstantType mType;
359
+ // Semantic of this parameter.
360
+ Semantic mSemantic;
361
+ // Index of this parameter.
362
+ int mIndex;
363
+ // The content of this parameter.
364
+ Content mContent;
365
+ // Number of elements in the parameter (for arrays)
366
+ size_t mSize;
361
367
 
362
368
  };
363
369
 
@@ -418,34 +424,34 @@ public:
418
424
 
419
425
 
420
426
  /** Get auto constant int data of this parameter, in case it is auto constant parameter. */
421
- size_t getAutoConstantIntData () const { return mAutoConstantIntData; }
427
+ size_t getAutoConstantIntData() const { return mAutoConstantIntData; }
422
428
 
423
429
  /** Get auto constant real data of this parameter, in case it is auto constant parameter. */
424
- Real getAutoConstantRealData () const { return mAutoConstantRealData; }
430
+ Real getAutoConstantRealData() const { return mAutoConstantRealData; }
425
431
 
426
432
  /** Return true if this parameter is a floating point type, false otherwise. */
427
- bool isFloat () const;
433
+ bool isFloat() const;
428
434
 
429
435
  /** Return true if this parameter is a texture sampler type, false otherwise. */
430
- bool isSampler () const;
436
+ bool isSampler() const;
431
437
 
432
438
  /** Return true if this parameter is an auto constant parameter, false otherwise. */
433
- bool isAutoConstantParameter () const { return mIsAutoConstantReal || mIsAutoConstantInt; }
439
+ bool isAutoConstantParameter() const { return mIsAutoConstantReal || mIsAutoConstantInt; }
434
440
 
435
441
  /** Return true if this parameter an auto constant with int data type, false otherwise. */
436
- bool isAutoConstantIntParameter () const { return mIsAutoConstantInt; }
442
+ bool isAutoConstantIntParameter() const { return mIsAutoConstantInt; }
437
443
 
438
444
  /** Return true if this parameter an auto constant with real data type, false otherwise. */
439
- bool isAutoConstantRealParameter () const { return mIsAutoConstantReal; }
445
+ bool isAutoConstantRealParameter() const { return mIsAutoConstantReal; }
440
446
 
441
447
  /** Return the auto constant type of this parameter. */
442
448
  GpuProgramParameters::AutoConstantType getAutoConstantType () const { return mAutoConstantType; }
443
449
 
444
450
  /** Return the variability of this parameter. */
445
- uint16 getVariability () const { return mVariability; }
451
+ uint16 getVariability() const { return mVariability; }
446
452
 
447
453
  /** Bind this parameter to the corresponding GPU parameter. */
448
- void bind (GpuProgramParametersSharedPtr paramsPtr);
454
+ void bind(GpuProgramParametersSharedPtr paramsPtr);
449
455
 
450
456
  public:
451
457
 
@@ -540,17 +546,24 @@ public:
540
546
  }
541
547
 
542
548
  protected:
543
- bool mIsAutoConstantReal; // Is it auto constant real based parameter.
544
- bool mIsAutoConstantInt; // Is it auto constant int based parameter.
549
+ // Is it auto constant real based parameter.
550
+ bool mIsAutoConstantReal;
551
+ // Is it auto constant int based parameter.
552
+ bool mIsAutoConstantInt;
545
553
  GpuProgramParameters::AutoConstantType mAutoConstantType; // The auto constant type of this parameter.
546
554
  union
547
555
  {
548
- size_t mAutoConstantIntData; // Auto constant int data.
549
- Real mAutoConstantRealData; // Auto constant real data.
556
+ // Auto constant int data.
557
+ size_t mAutoConstantIntData;
558
+ // Auto constant real data.
559
+ Real mAutoConstantRealData;
550
560
  };
551
- uint16 mVariability; // How this parameter varies (bitwise combination of GpuProgramVariability).
552
- GpuProgramParameters* mParamsPtr; // The actual GPU parameters pointer.
553
- size_t mPhysicalIndex; // The physical index of this parameter in the GPU program.
561
+ // How this parameter varies (bitwise combination of GpuProgramVariability).
562
+ uint16 mVariability;
563
+ // The actual GPU parameters pointer.
564
+ GpuProgramParameters* mParamsPtr;
565
+ // The physical index of this parameter in the GPU program.
566
+ size_t mPhysicalIndex;
554
567
  };
555
568
 
556
569
  typedef SharedPtr<UniformParameter> UniformParameterPtr;
@@ -577,17 +590,17 @@ public:
577
590
  virtual ~ConstParameter () {}
578
591
 
579
592
  /** Returns the native value of this parameter. (for example a Vector3) */
580
- const valueType& getValue () const { return mValue; }
593
+ const valueType& getValue() const { return mValue; }
581
594
 
582
595
  /**
583
596
  @see Parameter::isConstParameter.
584
597
  */
585
- virtual bool isConstParameter () const { return true; }
598
+ virtual bool isConstParameter() const { return true; }
586
599
 
587
600
  /**
588
601
  @see Parameter::toString.
589
602
  */
590
- virtual String toString () const = 0;
603
+ virtual String toString() const = 0;
591
604
 
592
605
  protected:
593
606
  valueType mValue;
@@ -601,44 +614,44 @@ class _OgreRTSSExport ParameterFactory
601
614
  // Interface.
602
615
  public:
603
616
 
604
- static ParameterPtr createInPosition (int index);
605
- static ParameterPtr createOutPosition (int index);
606
-
607
- static ParameterPtr createInNormal (int index);
608
- static ParameterPtr createInWeights (int index);
609
- static ParameterPtr createInIndices (int index);
610
- static ParameterPtr createOutNormal (int index);
611
- static ParameterPtr createInBiNormal (int index);
612
- static ParameterPtr createOutBiNormal (int index);
613
- static ParameterPtr createInTangent (int index);
614
- static ParameterPtr createOutTangent (int index);
615
- static ParameterPtr createInColor (int index);
616
- static ParameterPtr createOutColor (int index);
617
-
618
- static ParameterPtr createInTexcoord (GpuConstantType type, int index, Parameter::Content content);
619
- static ParameterPtr createOutTexcoord (GpuConstantType type, int index, Parameter::Content content);
620
- static ParameterPtr createInTexcoord1 (int index, Parameter::Content content);
621
- static ParameterPtr createOutTexcoord1 (int index, Parameter::Content content);
622
- static ParameterPtr createInTexcoord2 (int index, Parameter::Content content);
623
- static ParameterPtr createOutTexcoord2 (int index, Parameter::Content content);
624
- static ParameterPtr createInTexcoord3 (int index, Parameter::Content content);
625
- static ParameterPtr createOutTexcoord3 (int index, Parameter::Content content);
626
- static ParameterPtr createInTexcoord4 (int index, Parameter::Content content);
627
- static ParameterPtr createOutTexcoord4 (int index, Parameter::Content content);
628
-
629
- static ParameterPtr createConstParamVector2 (Vector2 val);
630
- static ParameterPtr createConstParamVector3 (Vector3 val);
631
- static ParameterPtr createConstParamVector4 (Vector4 val);
632
- static ParameterPtr createConstParamFloat (float val);
633
-
634
- static UniformParameterPtr createSampler (GpuConstantType type, int index);
635
- static UniformParameterPtr createSampler1D (int index);
636
- static UniformParameterPtr createSampler2D (int index);
637
- static UniformParameterPtr createSampler2DArray (int index);
638
- static UniformParameterPtr createSampler3D (int index);
639
- static UniformParameterPtr createSamplerCUBE (int index);
640
-
641
- static UniformParameterPtr createUniform (GpuConstantType type, int index, uint16 variability, const String& suggestedName, size_t size);
617
+ static ParameterPtr createInPosition(int index);
618
+ static ParameterPtr createOutPosition(int index);
619
+
620
+ static ParameterPtr createInNormal(int index);
621
+ static ParameterPtr createInWeights(int index);
622
+ static ParameterPtr createInIndices(int index);
623
+ static ParameterPtr createOutNormal(int index);
624
+ static ParameterPtr createInBiNormal(int index);
625
+ static ParameterPtr createOutBiNormal(int index);
626
+ static ParameterPtr createInTangent(int index);
627
+ static ParameterPtr createOutTangent(int index);
628
+ static ParameterPtr createInColor(int index);
629
+ static ParameterPtr createOutColor(int index);
630
+
631
+ static ParameterPtr createInTexcoord(GpuConstantType type, int index, Parameter::Content content);
632
+ static ParameterPtr createOutTexcoord(GpuConstantType type, int index, Parameter::Content content);
633
+ static ParameterPtr createInTexcoord1(int index, Parameter::Content content);
634
+ static ParameterPtr createOutTexcoord1(int index, Parameter::Content content);
635
+ static ParameterPtr createInTexcoord2(int index, Parameter::Content content);
636
+ static ParameterPtr createOutTexcoord2(int index, Parameter::Content content);
637
+ static ParameterPtr createInTexcoord3(int index, Parameter::Content content);
638
+ static ParameterPtr createOutTexcoord3(int index, Parameter::Content content);
639
+ static ParameterPtr createInTexcoord4(int index, Parameter::Content content);
640
+ static ParameterPtr createOutTexcoord4(int index, Parameter::Content content);
641
+
642
+ static ParameterPtr createConstParamVector2(Vector2 val);
643
+ static ParameterPtr createConstParamVector3(Vector3 val);
644
+ static ParameterPtr createConstParamVector4(Vector4 val);
645
+ static ParameterPtr createConstParamFloat(float val);
646
+
647
+ static UniformParameterPtr createSampler(GpuConstantType type, int index);
648
+ static UniformParameterPtr createSampler1D(int index);
649
+ static UniformParameterPtr createSampler2D(int index);
650
+ static UniformParameterPtr createSampler2DArray(int index);
651
+ static UniformParameterPtr createSampler3D(int index);
652
+ static UniformParameterPtr createSamplerCUBE(int index);
653
+
654
+ static UniformParameterPtr createUniform(GpuConstantType type, int index, uint16 variability, const String& suggestedName, size_t size);
642
655
  };
643
656
 
644
657
 
@@ -53,7 +53,7 @@ class _OgreRTSSExport Program : public RTShaderSystemAlloc
53
53
  // Interface.
54
54
  public:
55
55
  /** Get the type of this program. */
56
- GpuProgramType getType () const;
56
+ GpuProgramType getType() const;
57
57
 
58
58
  /** Resolve uniform auto constant parameter with associated real data of this program.
59
59
  @param autoType The auto type of the desired parameter.
@@ -61,7 +61,7 @@ public:
61
61
  @param size number of elements in the parameter.
62
62
  Return parameter instance in case of that resolve operation succeeded.
63
63
  */
64
- UniformParameterPtr resolveAutoParameterReal (GpuProgramParameters::AutoConstantType autoType, Real data, size_t size = 0);
64
+ UniformParameterPtr resolveAutoParameterReal(GpuProgramParameters::AutoConstantType autoType, Real data, size_t size = 0);
65
65
 
66
66
  /** Resolve uniform auto constant parameter with associated real data of this program.
67
67
  @param autoType The auto type of the desired parameter.
@@ -70,7 +70,7 @@ public:
70
70
  @param size number of elements in the parameter.
71
71
  Return parameter instance in case of that resolve operation succeeded.
72
72
  */
73
- UniformParameterPtr resolveAutoParameterReal (GpuProgramParameters::AutoConstantType autoType, GpuConstantType type, Real data, size_t size = 0);
73
+ UniformParameterPtr resolveAutoParameterReal(GpuProgramParameters::AutoConstantType autoType, GpuConstantType type, Real data, size_t size = 0);
74
74
 
75
75
  /** Resolve uniform auto constant parameter with associated int data of this program.
76
76
  @param autoType The auto type of the desired parameter.
@@ -78,7 +78,7 @@ public:
78
78
  @param size number of elements in the parameter.
79
79
  Return parameter instance in case of that resolve operation succeeded.
80
80
  */
81
- UniformParameterPtr resolveAutoParameterInt (GpuProgramParameters::AutoConstantType autoType, size_t data, size_t size = 0);
81
+ UniformParameterPtr resolveAutoParameterInt(GpuProgramParameters::AutoConstantType autoType, size_t data, size_t size = 0);
82
82
 
83
83
  /** Resolve uniform auto constant parameter with associated int data of this program.
84
84
  @param autoType The auto type of the desired parameter.
@@ -87,7 +87,7 @@ public:
87
87
  @param size number of elements in the parameter.
88
88
  Return parameter instance in case of that resolve operation succeeded.
89
89
  */
90
- UniformParameterPtr resolveAutoParameterInt (GpuProgramParameters::AutoConstantType autoType, GpuConstantType type, size_t data, size_t size = 0);
90
+ UniformParameterPtr resolveAutoParameterInt(GpuProgramParameters::AutoConstantType autoType, GpuConstantType type, size_t data, size_t size = 0);
91
91
 
92
92
  /** Resolve uniform parameter of this program.
93
93
  @param type The type of the desired parameter.
@@ -98,68 +98,68 @@ public:
98
98
  Return parameter instance in case of that resolve operation succeeded.
99
99
  @remarks Pass -1 as index parameter to create a new parameter with the desired type and index.
100
100
  */
101
- UniformParameterPtr resolveParameter (GpuConstantType type, int index, uint16 variability, const String& suggestedName, size_t size = 0);
101
+ UniformParameterPtr resolveParameter(GpuConstantType type, int index, uint16 variability, const String& suggestedName, size_t size = 0);
102
102
 
103
103
  /** Get parameter by a given name.
104
104
  @param name The name of the parameter to search for.
105
105
  @remarks Return NULL if no matching parameter found.
106
106
  */
107
- UniformParameterPtr getParameterByName (const String& name);
107
+ UniformParameterPtr getParameterByName(const String& name);
108
108
 
109
109
  /** Get parameter by a given auto constant type.
110
110
  @param autoType The auto type of the parameter to search for.
111
111
  @remarks Return NULL if no matching parameter found.
112
112
  */
113
- UniformParameterPtr getParameterByAutoType (GpuProgramParameters::AutoConstantType autoType);
113
+ UniformParameterPtr getParameterByAutoType(GpuProgramParameters::AutoConstantType autoType);
114
114
 
115
115
  /** Get parameter by a given type and index.
116
116
  @param type The type of the parameter to search for.
117
117
  @param index The index of the parameter to search for.
118
118
  @remarks Return NULL if no matching parameter found.
119
119
  */
120
- UniformParameterPtr getParameterByType (GpuConstantType type, int index);
120
+ UniformParameterPtr getParameterByType(GpuConstantType type, int index);
121
121
 
122
122
  /** Get the list of uniform parameters of this program.
123
123
  */
124
- const UniformParameterList& getParameters () const { return mParameters; };
124
+ const UniformParameterList& getParameters() const { return mParameters; };
125
125
 
126
126
  /** Create new function in this program. Return the newly created function instance.
127
127
  @param name The name of the function to create.
128
128
  @param desc The description of the function.
129
129
  */
130
- Function* createFunction (const String& name, const String& desc, const Function::FunctionType functionType);
130
+ Function* createFunction(const String& name, const String& desc, const Function::FunctionType functionType);
131
131
 
132
132
  /** Get a function by a given name. Return NULL if no matching function found.
133
133
  @param name The name of the function to search for.
134
134
  */
135
- Function* getFunctionByName (const String& name);
135
+ Function* getFunctionByName(const String& name);
136
136
 
137
137
  /** Get the function list of this program.
138
138
  */
139
- const ShaderFunctionList& getFunctions () const { return mFunctions; };
139
+ const ShaderFunctionList& getFunctions() const { return mFunctions; };
140
140
 
141
141
  /** Set the entry point function.
142
142
  @param function The function that will use as entry point of this program.
143
143
  */
144
- void setEntryPointFunction (Function* function) { mEntryPointFunction = function; }
144
+ void setEntryPointFunction(Function* function) { mEntryPointFunction = function; }
145
145
 
146
146
  /** Get the entry point function of this program.*/
147
- Function* getEntryPointFunction () { return mEntryPointFunction; }
147
+ Function* getEntryPointFunction() { return mEntryPointFunction; }
148
148
 
149
149
  /** Add dependency for this program. Basically a filename that will be included in this
150
150
  program and provide predefined shader functions code.
151
151
  One should verify that the given library file he provides can be reached by the resource manager.
152
152
  This step can be achieved using the ResourceGroupManager::addResourceLocation method.
153
153
  */
154
- void addDependency (const String& libFileName);
154
+ void addDependency(const String& libFileName);
155
155
 
156
156
  /** Get the number of external libs this program depends on */
157
- size_t getDependencyCount () const;
157
+ size_t getDependencyCount() const;
158
158
 
159
159
  /** Get the library name of the given index dependency.
160
160
  @param index The index of the dependecy.
161
161
  */
162
- const String& getDependency (unsigned int index) const;
162
+ const String& getDependency(unsigned int index) const;
163
163
 
164
164
 
165
165
  /** Sets whether a vertex program includes the required instructions
@@ -178,32 +178,38 @@ protected:
178
178
  /** Class constructor.
179
179
  @param type The type of this program.
180
180
  */
181
- Program (GpuProgramType type);
181
+ Program(GpuProgramType type);
182
182
 
183
183
  /** Class destructor */
184
- ~Program ();
184
+ ~Program();
185
185
 
186
186
  /** Destroy all parameters of this program. */
187
- void destroyParameters ();
187
+ void destroyParameters();
188
188
 
189
189
  /** Destroy all functions of this program. */
190
- void destroyFunctions ();
190
+ void destroyFunctions();
191
191
 
192
192
  /** Add parameter to this program. */
193
- void addParameter (UniformParameterPtr parameter);
193
+ void addParameter(UniformParameterPtr parameter);
194
194
 
195
195
  /** Remove parameter from this program. */
196
- void removeParameter (UniformParameterPtr parameter);
196
+ void removeParameter(UniformParameterPtr parameter);
197
197
 
198
198
 
199
199
  // Attributes.
200
200
  protected:
201
- GpuProgramType mType; // Program type. (Vertex, Fragment, Geometry).
202
- UniformParameterList mParameters; // Program uniform parameters.
203
- ShaderFunctionList mFunctions; // Function list.
204
- Function* mEntryPointFunction; // Entry point function for this program.
205
- StringVector mDependencies; // Program dependencies.
206
- bool mSkeletalAnimation; // Skeletal animation calculation
201
+ // Program type. (Vertex, Fragment, Geometry).
202
+ GpuProgramType mType;
203
+ // Program uniform parameters.
204
+ UniformParameterList mParameters;
205
+ // Function list.
206
+ ShaderFunctionList mFunctions;
207
+ // Entry point function for this program.
208
+ Function* mEntryPointFunction;
209
+ // Program dependencies.
210
+ StringVector mDependencies;
211
+ // Skeletal animation calculation
212
+ bool mSkeletalAnimation;
207
213
  private:
208
214
  friend class ProgramManager;
209
215
  };