Ignore:
Timestamp:
08/28/08 21:17:15 (16 years ago)
Author:
mattausch
Message:

improved performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredShader.cpp

    r2868 r2879  
    2424 
    2525 
     26static GLenum mymrt[] = {GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_COLOR_ATTACHMENT2_EXT,  GL_COLOR_ATTACHMENT3_EXT}; 
     27 
    2628 
    2729static CGprogram sCgDeferredProgram; 
     
    4042mWidth(w), mHeight(h) 
    4143{ 
    42         mFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 
    43         // the diffuse color buffer 
    44         mFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false); 
     44        //mFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 
     45        //mFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false); 
    4546} 
    4647 
     
    5051        if (sCgDeferredProgram) 
    5152                cgDestroyProgram(sCgDeferredProgram); 
     53 
     54        //DEL_PTR(mFbo); 
    5255} 
    5356 
     
    111114        GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture(); 
    112115 
    113         mFbo->Bind(); 
     116        fbo->Bind(); 
     117        glDrawBuffers(1, mymrt + 3); 
     118 
    114119 
    115120        glPushAttrib(GL_VIEWPORT_BIT); 
     
    199204void DeferredShader::AntiAliasing(FrameBufferObject *fbo) 
    200205{ 
    201         GLuint colorsTex = mFbo->GetColorBuffer(0)->GetTexture(); 
     206        GLuint colorsTex = fbo->GetColorBuffer(3)->GetTexture(); 
    202207        GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture(); 
    203208 
Note: See TracChangeset for help on using the changeset viewer.