ARGH!! Which GetTexEnv do I USE?!

BlitzMax Forums/OpenGL Module/ARGH!! Which GetTexEnv do I USE?!

sswift(Posted 2006) [#1]
Stupid OpenGL docs SUCK! The GetTexEnv command comes in FOUR flavors, two of which seem to be the one I need to use, but people seem to use them interchangeably and no matter what search terms I use in Google I can find NO explanation about which I'm supposed to use in what situation!

I'm talking about GetTexEnvf() and GetTexEnvi(). One requires a float for the params, and one an int. WHY DO WE HAVE THIS OPTION? The params parameter seems ONLY to be used for flags, and FLAGS usually are combined with OR right? So why wouldn't it just be an int? And why does 90% of the code I see use the FLOAT version, but sometimes intersperse it with a few int calls?

It's driving me crazy because it's like it doesn't matter which one you use but WHY WOULD THERE BE FOUR DIFFERENT VERSIONS in GL 1.1 THEN?!


BlackSp1der(Posted 2006) [#2]
hehe, you need to use GlTexEnvf if you're trying to change the texture to one solid color. :P


sswift(Posted 2006) [#3]
No, you don't. :-)

You do however seem to need to use glTexEnvfv instead of glTexEnviv, and I'm not sure why.


Tom(Posted 2006) [#4]
glTexEnvfv GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, texUnit[unitIndex].constColor

constColor is a float array