/[libvob]/libvob/src/paper/Paper.cxx
ViewVC logotype

Diff of /libvob/src/paper/Paper.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mudyc, Fri May 2 00:06:30 2003 UTC revision 1.5 by tjl, Fri Oct 10 13:52:27 2003 UTC
# Line 332  namespace Paper { Line 332  namespace Paper {
332                 mat[2] * Li.x + mat[3] * Li.y, Li.z);                 mat[2] * Li.x + mat[3] * Li.y, Li.z);
333          glColor3f(.5 * L.x + .5, .5 * L.y + .5, .5 * L.z + .5);          glColor3f(.5 * L.x + .5, .5 * L.y + .5, .5 * L.z + .5);
334        }        }
335    
336      void PaperPass::independentSetup() {
337          setupcode();
338          for(unsigned i=0; i<indirectTextureBinds.size(); i++) {
339              indirectTextureBinds[i]->bind();
340          }
341      }
342      void PaperPass::independentTeardown() {
343          for(unsigned i=0; i<indirectTextureBinds.size(); i++) {
344              indirectTextureBinds[i]->unbind();
345          }
346          teardowncode();
347      }
348        
349    void PaperPass::setUp_texgen(LightParam *param) {    void PaperPass::setUp_texgen(LightParam *param) {
350      setupcode();      independentSetup();
351            
352      /* Set up TexGen for each texture unit */      /* Set up TexGen for each texture unit */
353      GLenum unit = GL_TEXTURE0_ARB;      GLenum unit = GL_TEXTURE0_ARB;
# Line 374  namespace Paper { Line 387  namespace Paper {
387    void PaperPass::setUp_VP(LightParam *param) {    void PaperPass::setUp_VP(LightParam *param) {
388      if (texgenvp.getSource().length() == 0) loadVP();      if (texgenvp.getSource().length() == 0) loadVP();
389            
390      setupcode();      independentSetup();
391            
392      /* Set up VP TexGen parameters for each texture unit */      /* Set up VP TexGen parameters for each texture unit */
393      int unit = 0;      int unit = 0;
# Line 397  namespace Paper { Line 410  namespace Paper {
410    }    }
411        
412    void PaperPass::tearDown_VP() {    void PaperPass::tearDown_VP() {
413      teardowncode();      independentTeardown();
414  #ifdef GL_VERTEX_PROGRAM_NV  #ifdef GL_VERTEX_PROGRAM_NV
415      glDisable(GL_VERTEX_PROGRAM_NV);      glDisable(GL_VERTEX_PROGRAM_NV);
416  #endif  #endif
417    }    }
418    
419    void PaperPass::setUp_explicit(LightParam *param) {    void PaperPass::setUp_explicit(LightParam *param) {
420      setupcode();      independentSetup();
421            
422      /* Set up explicit TexGen parameters for each texture unit */      /* Set up explicit TexGen parameters for each texture unit */
423      for (vector<shared_ptr<TexGen> >::iterator it = texgen.begin(); it != texgen.end(); ++it) {      for (vector<shared_ptr<TexGen> >::iterator it = texgen.begin(); it != texgen.end(); ++it) {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26