DGL
https://delphigl.com/forum/

multi texture vs multi pass
https://delphigl.com/forum/viewtopic.php?f=19&t=2466
Seite 1 von 1

Autor:  noeska [ Do Feb 05, 2004 19:21 ]
Betreff des Beitrags:  multi texture vs multi pass

I am using the following multi texture code to add a highlight:
Code:
  1.  
  2.   //before i apply texture0 and textur1 for bumpmapping
  3.  
  4.  
  5.   glActiveTexture(GL_TEXTURE2);
  6.   specmap.apply;
  7.   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
  8.  
  9.   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
  10.   glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
  11.  
  12.   glEnable(GL_TEXTURE_GEN_S);
  13.   glEnable(GL_TEXTURE_GEN_T);
  14.  
  15.   renderobject;
  16.  
  17.  glDisable(GL_TEXTURE_GEN_S);
  18.   glDisable(GL_TEXTURE_GEN_T);
  19.   glDisable(GL_TEXTURE_2D);
  20.  
  21.  

How do i convert this to multipass? I cannot get the same end result. What blending mode should i use?

Autor:  Sascha Willems [ Do Feb 05, 2004 19:58 ]
Betreff des Beitrags: 

Code:
  1. glBlendMode(GL_ONE, GL_ONE)

Should do the additive blending.

Autor:  noeska [ Do Feb 05, 2004 22:48 ]
Betreff des Beitrags: 

i have a go at it, although i have this feeling i already tried it.

Autor:  noeska [ Fr Feb 06, 2004 19:11 ]
Betreff des Beitrags: 

I solved it. I forgot to disable the depth buffer. Using:
Code:
  1. glDisable(GL_DEPTH_TEST);

solved my problem...

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/