specular effects and textures?

Started by
2 comments, last by EvilProgrammer 19 years, 8 months ago
The book OpenGL Game Programming states that specular effects do not work well with textures, and I have seen this in my program. The book recommends using glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); However, my compiler doesn't like this line, and says the parameters GL_LIGHT_MODEL_COLOR_CONTROL and GL_SEPARATE_SPECULAR_CONTROL aren't defined. I'm sure there's a simple solution to this. Anyone know what's wrong? Is there an extra file I need to include?
Advertisement
from glLightModeli. its for python, but the point is the same.
Quote:
GL_LIGHT_MODEL_COLOR_CONTROL is available only if the GL version is 1.2 or greater

check your version of opengl, you might need to upgrade.
- stormrunner
I had the same problem.
Get the latest version of glext.h e.g. from the NVidia homepage. The constants your compiler doesn't like are defined there.
If it still doesn't compile or run properly, you need to update your driver (but thats not very probable since this extension is rather old I think).
Thanks guys I'll upgrade.

This topic is closed to new replies.

Advertisement