Does calling glActiveTexture()
even make sense when not using shaders?
I only have to switch the textures before drawing a buffer with glBindTexture()
, right?
|
Yes, you do need texture units when not using shaders; if you look at the evolution of graphics hardware this will be obvious as multitexturing predated the programmable pipeline. The classic old-school use case is Quake-style lightmapping, and in fact if you look at the Quake source code you'll see that it used multitexturing (via the old GL_SGIS_multitexture extension) and most definitely did not use shaders. For this use you have one texture representing the diffuse colour, one representing the light colour/intensity, and you modulate them together to get the final surface colour. The exception to this rule is if you're not doing multitexturing, of course. If you're only ever applying a single texture to your geometry then you can quite happily forget that texture units ever existed (since the default active texture unit is texture unit 0). There is, by the way, no excuse to not use shaders in 2013; the old "old hardware" excuse is not valid any more and hasn't been for many years. Everything supports shaders nowadays and using them will make your life a lot easier. |
|||||
|