- Timestamp:
- 10/10/08 13:53:22 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.h
r3019 r3021 4 4 #include "common.h" 5 5 #include "glInterface.h" 6 #include "ShaderProgram.h" 6 7 7 8 #include <Cg/cg.h> … … 20 21 21 22 22 class ShaderProgram23 {24 public:25 23 26 ShaderProgram(CGprogram program): mProgram(program) {}27 28 ~ShaderProgram() { cgDestroyProgram(mProgram); }29 30 CGprogram mProgram;31 };32 33 34 typedef std::vector<ShaderProgram *> ShaderContainer;35 24 typedef std::vector<FrameBufferObject *> FBOContainer; 36 25 … … 54 43 a smoothing factor for temporal coherence 55 44 */ 45 46 ~DeferredRenderer(); 47 56 48 void Render(FrameBufferObject *fbo, 57 49 const Matrix4x4 &oldProjViewMatrix, … … 63 55 ); 64 56 65 /** Initialises the deferred shader and loads the required shaders: 66 This function has to be called only once. 67 */ 68 static void Init(CGcontext context); 69 70 ~DeferredRenderer(); 71 57 72 58 void SetUseTemporalCoherence(bool temporal); 73 59 … … 78 64 79 65 void SetShadingMethod(SHADING_METHOD s); 66 67 /** Initialises the deferred shader and loads the required shaders: 68 This function has to be called only once. 69 */ 70 static void InitCG(CGcontext context); 71 /** Releases all shader resources. 72 */ 73 static void ReleaseCG(); 74 80 75 static int colorBufferIdx; 81 76
Note: See TracChangeset
for help on using the changeset viewer.