Ignore:
Timestamp:
10/17/08 16:32:37 (16 years ago)
Author:
mattausch
Message:

unified shader stuff, but phreetham sky not working anymore for forward rendering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.h

    r3027 r3038  
    2222 
    2323 
    24 typedef  std::vector<FrameBufferObject *> FBOContainer; 
    2524 
    2625/** This class implements a deferred shading algorithm that takes 
     
    6463 
    6564        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(); 
    7465 
     66        // hack: store the color buffer idx for the first flipflip-mrt here 
     67        // TODO matt: make this less hacky 
    7568        static int colorBufferIdx; 
     69 
    7670 
    7771protected: 
     
    9286        void FirstPassShadow(FrameBufferObject *fbo, DirectionalLight *light, ShadowMap *shadowMap); 
    9387 
    94         void ComputeToneParameters(FrameBufferObject *fbo, DirectionalLight *light, float &imageKey, float &whiteLum, float &middleGrey); 
     88        void ComputeToneParameters(FrameBufferObject *fbo,  
     89                                                           DirectionalLight *light, 
     90                                                           float &imageKey,  
     91                                                           float &whiteLum, 
     92                                                           float &middleGrey); 
    9593 
    9694        void ToneMap(FrameBufferObject *fbo, float imageKey, float whiteLum, float middleGrey); 
     
    113111        void DrawQuad(ShaderProgram *p); 
    114112 
    115         static bool InitProgram(ShaderProgram **program,  
    116                                     CGcontext context,  
    117                                                         const std::string &filename, 
    118                                                         const std::string &functionName); 
     113        /** Initialises the deferred shader and loads the required shaders: 
     114                This function has to be called only once. 
     115        */ 
     116        void InitCg(); 
    119117 
    120118 
     
    145143}; 
    146144 
     145 
    147146} // namespace  
    148147 
Note: See TracChangeset for help on using the changeset viewer.