Changeset 3067 for GTP


Ignore:
Timestamp:
10/24/08 13:24:10 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
2 edited

Legend:

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

    r3066 r3067  
    142142        mFbo = new FrameBufferObject(size, size, FrameBufferObject::DEPTH_32, true); 
    143143 
    144         // need a color buffer to keep opengl happy 
     144        // need a color buffer to keep driver happy 
    145145        mFbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, 
    146146                                 ColorBufferObject::WRAP_CLAMP_TO_EDGE,  
    147147                                                 ColorBufferObject::FILTER_NEAREST); 
    148148 
    149  
    150149        mShadowCam = new PerspectiveCamera(1); 
    151         //mShadowCam->SetOrtho(true); 
    152150} 
    153151 
     
    598596        glViewport(0, 0, mSize, mSize); 
    599597 
    600         //glDisable(GL_LIGHTING); 
    601         //glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 
    602  
     598        glDisable(GL_LIGHTING); 
     599        glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 
    603600        glShadeModel(GL_FLAT); 
    604601 
     
    612609         
    613610        glShadeModel(GL_SMOOTH); 
    614         //glEnable(GL_LIGHTING); 
    615         //glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 
     611        glEnable(GL_LIGHTING); 
     612        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 
    616613 
    617614#if 0 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3066 r3067  
    923923                // the scene is rendered withouth any shading    
    924924                glShadeModel(GL_FLAT); 
    925                 //glDisable(GL_LIGHTING); 
    926                 //glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 
     925                glDisable(GL_LIGHTING); 
     926                glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 
    927927 
    928928 
     
    935935                state.SetRenderTechnique(RenderState::DEPTH_PASS); 
    936936 
     937                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
     938 
    937939                // the scene is rendered withouth any shading    
    938940                glShadeModel(GL_FLAT); 
    939941                glDisable(GL_LIGHTING); 
    940          
    941                 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    942                 //glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 
     942                glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); 
    943943 
    944944 
     
    18801880                } 
    18811881 
    1882                 glDisable(GL_LIGHTING); 
    18831882                glViewport(0, 0, texWidth, texHeight); 
    18841883                // rese the state before the final visible objects pass 
     
    18881887        else 
    18891888        { 
    1890                 glEnable(GL_LIGHTING); 
    18911889                state.SetRenderTechnique(RenderState::FORWARD); 
    18921890                // rese the state before the final visible objects pass 
     
    18941892        } 
    18951893 
     1894        glEnableClientState(GL_NORMAL_ARRAY); 
     1895 
    18961896        glShadeModel(GL_SMOOTH); 
    1897         glEnableClientState(GL_NORMAL_ARRAY); 
    1898  
    18991897        // draw all objects that have exactly the same depth as the current sample 
    19001898        glDepthFunc(GL_LEQUAL); 
     1899 
    19011900        //glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 
    1902  
     1901        state.SetUseAlphaToCoverage(true); 
     1902        // clear color 
    19031903        glClear(GL_COLOR_BUFFER_BIT); 
    1904  
    1905         state.SetUseAlphaToCoverage(true); 
    19061904         
    19071905 
Note: See TracChangeset for help on using the changeset viewer.