Ignore:
Timestamp:
08/29/08 00:00:59 (16 years ago)
Author:
mattausch
Message:

working quite well

File:
1 edited

Legend:

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

    r2880 r2881  
    112112static void CreateNoiseTex2D(int w, int h) 
    113113{ 
    114         // hack: should be able to recalc noise texture 
    115         //if (noiseTex > 0) return; 
    116  
    117114        //GLubyte *randomNormals = new GLubyte[mWidth * mHeight * 3]; 
    118115        float *randomNormals = new float[w * h * 3]; 
     
    167164        //-- the flip-flop fbos 
    168165 
    169         w = 256; h = 256; 
     166        //w = 512; h = 512; 
    170167        mNewFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 
    171168         
     
    173170        mNewFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false); 
    174171         
     172 
     173        /////////////////////// 
     174 
    175175        mOldFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 
    176176         
     
    457457        glDrawBuffers(1, mymrt); 
    458458 
    459         glPushAttrib(GL_VIEWPORT_BIT); 
    460         glViewport(0, 0, 256, 256); 
    461  
    462         glMatrixMode(GL_PROJECTION); 
    463         glPushMatrix(); 
    464         glLoadIdentity(); 
    465  
    466         glMatrixMode(GL_MODELVIEW); 
    467         glPushMatrix(); 
    468         glLoadIdentity(); 
    469  
    470         const float offs = 0.5f; 
    471         glOrtho(-offs, offs, -offs, offs, 0, 1); 
    472  
    473459 
    474460        GLuint oldTex = mOldFbo->GetColorBuffer(0)->GetTexture(); 
     
    537523        cgGLDisableTextureParameter(sOldTexParam); 
    538524 
    539         glMatrixMode(GL_PROJECTION); 
    540         glPopMatrix(); 
    541  
    542         glMatrixMode(GL_MODELVIEW); 
    543         glPopMatrix(); 
    544  
    545         glPopAttrib(); 
    546525 
    547526        FrameBufferObject::Release(); 
     
    805784        glDrawBuffers(1, mymrt); 
    806785 
     786        cgGLEnableProfile(RenderState::sCgFragmentProfile); 
     787 
     788        cgGLBindProgram(sCgCombinedIllumProgram); 
     789 
    807790        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    808791         
    809         cgGLEnableProfile(RenderState::sCgFragmentProfile); 
    810  
    811         cgGLBindProgram(sCgCombinedIllumProgram); 
    812792 
    813793        cgGLSetTextureParameter(sColorsTexCombinedIllumParam, colorsTex); 
Note: See TracChangeset for help on using the changeset viewer.