Ignore:
Timestamp:
08/20/08 09:03:55 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
4 edited

Legend:

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

    r2853 r2854  
    1616struct LODLevel 
    1717{ 
    18         //friend class SceneEntity; 
     18        friend class SceneEntity; 
    1919 
    2020public: 
     
    2222        LODLevel(float squaredDist): mSquaredDistance(squaredDist) {} 
    2323 
    24         inline float GetSquaredDistance() { return mSquaredDistance; } 
     24        inline float GetSquaredDistance() const { return mSquaredDistance; } 
    2525 
    26         inline int GetNumShapes() { return (int)mShapes.size(); } 
     26        inline int GetNumShapes() const { return (int)mShapes.size(); } 
    2727         
    28         inline int GetNumTriangles() { return mNumTriangles; } 
     28        inline int GetNumTriangles() const { return mNumTriangles; } 
    2929 
    30         inline Shape *GetShape(size_t i) { return mShapes[i]; } 
     30        inline Shape *GetShape(size_t i) const { return mShapes[i]; } 
    3131 
    3232        inline ShapeContainer &GetShapes() { return mShapes; } 
     
    3737        //////////////// 
    3838 
    39         /** Has to be called each frame in order to use proper LOD level. 
     39        /** Has to be called each frame in order to initialize the proper LOD level. 
    4040        */ 
    4141        static void InitFrame(const Vector3 &viewPoint); 
    4242 
    4343 
     44protected: 
     45 
     46        static Vector3 sViewPoint; 
     47        /** The current frame id is used to update LOD. 
     48        */ 
    4449        static int sFrameId; 
    45         static Vector3 sViewPoint; 
    4650 
    47  
    48  
    49 protected: 
    5051 
    5152        ///////////////////// 
    5253 
    53         float mNumTriangles; 
     54        int mNumTriangles; 
    5455 
    5556        /// distance of this LOD level 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderState.h

    r2844 r2854  
    4545        */ 
    4646        void SetState(bool texturing, bool alphaTest, bool cullFace); 
    47         /** Returns wether we are in query or render mode 
     47        /** Returns either query or render mode 
    4848        */ 
    4949        inline Mode GetMode() const { return mMode; } 
     
    5656        /** Returns the current vbo id. 
    5757        */ 
    58         inline int GetCurrentVboId() { return mCurrentVboId; } 
     58        inline int GetCurrentVboId() const { return mCurrentVboId; } 
    5959 
    6060        void SetRenderType(RenderType type) { mRenderType = type; } 
    61         RenderType GetRenderType() { return mRenderType; } 
     61        RenderType GetRenderType() const { return mRenderType; } 
    6262 
    6363 
    6464        /////////////////// 
     65 
     66 
     67        /////////////////// 
     68        //-- for deferred shading, we have to switch shaders on and off 
    6569 
    6670        static CGprofile sCgFragmentProfile; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2853 r2854  
    405405        InitGLstate(); 
    406406 
    407         //glEnable(GL_MULTISAMPLE_ARB); 
    408         //glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); 
     407        glEnable(GL_MULTISAMPLE_ARB); 
     408        glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); 
    409409 
    410410        InitFBO(); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2853 r2854  
    111111 
    112112 
     113/** Computes ambient occlusion + diffuse reflections 
     114*/ 
    113115float4 globIllum(fragment IN, 
    114116                                 uniform sampler2D colors, 
     
    202204 
    203205 
     206/** The mrt shader for screen space ambient occlusion 
     207*/ 
    204208pixel main_ssao(fragment IN,  
    205209                                uniform sampler2D colors, 
     
    268272 
    269273 
     274/** The mrt shader for standard rendering 
     275*/ 
    270276pixel main(fragment IN,  
    271277                   uniform sampler2D colors, 
Note: See TracChangeset for help on using the changeset viewer.