[SDL] Re: sdl GL with stencil buffer

Mike Powell belar at earthling.net
Fri Apr 28 12:26:53 PDT 2000


>so I would be quite stupid to use multi texture as it would be done
>in software
>- but im wondering how the hell quake 3 does it ? (and  it does
>it fast)
>does quake3 do another render to do its lightmaps or what ?
>
>Oliver

Actually, that's precisely what it does. It's called multipass 
texturing. It does an unlit render, locks the depth buffer, then 
renders the lightmaps. In order to make it work right, you need to 
either set the depth test to GL_LEQUAL or apply a polygon offset. I 
would suggest changing the depth test, though. It's easier, more 
efficient, and never causes visual artifacts (at least, not that I've 
seen).

      ,---------------------------------------------------------.
     / _/_/_/    _/_/_/  _/        _/    _/_/   Michael Powell  /
    / _/    _/  _/      _/      _/  _/  _/  _/                 /
   / _/_/_/    _/_/    _/      _/_/_/  _/_/     Aspiring      /
  / _/    _/  _/      _/      _/  _/  _/  _/   Video Game    /
/ _/_/_/    _/_/_/  _/_/_/  _/  _/  _/  _/   Programmer    /
`---------------------------------------------------------'



More information about the SDL mailing list