You need to define glColorPointer(4, GL_FIXED, 0, colors); before you use glBindtexture, because with most things in open GL you have to define something before you can use it directly or indirectly.
Just keeps opengl running happly, (and helps with performance abit doing it this way i think.)
Main Topics
Browse All Topics





by: aqua9880Posted on 2005-10-12 at 12:31:37ID: 15072004
glColorPointer is only one way of going about it. OpenGL is a giant state machine. It churns through in a state and when you call functions like colorpointer it gives it a state of variance to apply your texture to. All this does in the long run is set things up for glBindTexture to operate. Its kind of like before you can use a while loop you have to give it some form of prior initilization.
The concept is the same through all of openGL... before you can apply a light you have to define your lighting, before you can develope 3D perspective you have to specify your viewing window as perspective instead of 2d ortho. *shrugs* To really get an understanding you can always look at the header files and get into some of the news groups where people live that helped develope openGL but to get a working knowledge all you need to know is...
...You must define certain things before using other things. If you never define it, you can't use it.
~Aqua