Changeset 2878 for GTP


Ignore:
Timestamp:
08/28/08 09:12:34 (16 years ago)
Author:
mattausch
Message:

for some reasons very slow even in small streets on my home computer!!

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/Readme.txt

    r2862 r2878  
    8585DevIL for texture loading / unloading 
    8686glfont2 (http://students.cs.byu.edu/~bfish/glfont2.php) for the antialiased fonts of the HUD. Thanks to the author Brad Fish.  
    87 The RenderTexture library. Thanks to the author Mark J. Harris. 
    8887 
    8988Thanks also to Alexander Kusternig for providing me his code for the SSAO shader. 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp

    r2864 r2878  
    104104                        } 
    105105                         
    106                         if (!resultAvailable) 
    107                                 ++ waitedForQueries; 
    108                         ++ returnedQueries; 
    109  
     106                        //++ returnedQueries; if (!resultAvailable) ++ waitedForQueries; 
     107                         
    110108                        OcclusionQuery *query = mQueryQueue.front(); 
    111109                        mQueryQueue.pop(); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp

    r2867 r2878  
    127127 
    128128 
     129ColorBufferObject::~ColorBufferObject() 
     130{ 
     131        glDeleteRenderbuffersEXT(1, &mId); 
     132        glDeleteTextures(1, &mTexId); 
     133} 
     134 
     135 
    129136FrameBufferObject::FrameBufferObject(int w, int h, DEPTH_FORMAT d, bool useDepthTex) 
    130137: mWidth(w), mHeight(h), mDepthTexId(0) 
     
    187194 
    188195 
     196FrameBufferObject::~FrameBufferObject() 
     197{ 
     198        glDeleteFramebuffersEXT(1, &mId); 
     199        glDeleteRenderbuffersEXT(1, &mDepthId); 
     200 
     201        if (mDepthTexId) glDeleteTextures(1, &mDepthTexId); 
     202 
     203        CLEAR_CONTAINER(mColorBuffers); 
     204} 
     205 
     206 
    189207int FrameBufferObject::AddColorBuffer(ColorBufferObject::FORMAT col,  
    190208                                                                          ColorBufferObject::WRAP_TYPE wrapType,  
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h

    r2877 r2878  
    2727                                          int attachment_idx); 
    2828 
     29        ~ColorBufferObject(); 
     30 
    2931        unsigned int GetTexture() const {return mTexId;} 
    3032 
     
    4749        */ 
    4850        FrameBufferObject(int w, int h, DEPTH_FORMAT d, bool useDepthTex = false); 
     51         
     52        ~FrameBufferObject(); 
    4953        /** Creates and adds a color buffer to the current frame buffer object. 
    5054                Returns the index that allows to retrieve the color buffer object. 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.cpp

    r2877 r2878  
    189189        GrabDepthBuffer(mDepth, fbo->GetDepthTex()); 
    190190         
    191         ExportDepthBuffer(mDepth);  
    192         PrintGLerror("grab"); 
     191        //ExportDepthBuffer(mDepth); PrintGLerror("grab"); 
    193192 
    194193        DEL_PTR(fbo); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2877 r2878  
    539539        // this fbo basicly stores the scene information we get from standard rendering of a frame 
    540540        // we store colors, normals, positions (for the ssao) 
    541         fbo = new FrameBufferObject(texWidth, texHeight, FrameBufferObject::DEPTH_32); 
     541        fbo = new FrameBufferObject(texWidth, texHeight, FrameBufferObject::DEPTH_24); 
    542542 
    543543        // the diffuse color buffer 
     
    871871         
    872872                glEnable(GL_MULTISAMPLE_ARB); 
    873                 //glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 
    874  
    875873                fbo->Release(); 
    876874 
     
    890888 
    891889                glEnable(GL_MULTISAMPLE_ARB); 
    892                 //glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 
    893  
    894890                fbo->Release(); 
    895891 
     
    912908        case RenderState::DEFERRED: 
    913909 
    914                 // multisampling not working with deferred shading 
    915                 //glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); 
     910                // multisampling does not work with deferred shading 
    916911                glDisable(GL_MULTISAMPLE_ARB); 
    917912 
Note: See TracChangeset for help on using the changeset viewer.