Ignore:
Timestamp:
09/26/08 18:31:24 (16 years ago)
Author:
mattausch
Message:

cannot read mipmap, but stayed on gpu

File:
1 edited

Legend:

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

    r2974 r2976  
    168168PerfTimer frameTimer, algTimer; 
    169169 
    170  
     170static int sCurrentMrtSet = 0; 
    171171 
    172172/// the used render type for this render pass 
     
    617617 
    618618        // the diffuse color buffer 
    619         fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, ColorBufferObject::FILTER_NEAREST); 
     619        fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, ColorBufferObject::FILTER_LINEAR); 
    620620 
    621621        // the positions buffer 
     
    626626 
    627627        // another color buffer 
    628         fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, ColorBufferObject::FILTER_NEAREST); 
     628        fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, ColorBufferObject::FILTER_LINEAR); 
    629629 
    630630        PrintGLerror("fbo"); 
     
    10531053                // draw to 3 color buffers 
    10541054                // a color, normal, and positions buffer 
    1055                 glDrawBuffers(4, mrt); 
     1055                if (sCurrentMrtSet == 0) 
     1056                { 
     1057                        DeferredRenderer::colorBufferIdx = 0; 
     1058                        glDrawBuffers(3, mrt); 
     1059                } 
     1060                else  
     1061                { 
     1062                        DeferredRenderer::colorBufferIdx = 3; 
     1063                        glDrawBuffers(3, mrt2); 
     1064                } 
     1065                sCurrentMrtSet = 1 - sCurrentMrtSet; 
    10561066 
    10571067                glEnableClientState(GL_NORMAL_ARRAY); 
Note: See TracChangeset for help on using the changeset viewer.