View Full Version : Want "glTextureNamePointer" !

07-18-2000, 04:57 AM
What I really dislike on using vertex-arrays is the leck of a method for changing the current texture within an array.
At the moment you just can choose one of the following workarounds (at least I only know of these two methods - correct me if I'm wrong):
a) create one big texture holding all your small ones. Problem: texture wrapping won't work.
b) create one vertex array per texture. Problem: Sometimes kind of hard to implement.

So, why isn't there a function like "glTextureNamePointer". The array it
points to would just hold a sequence of
texturenames used when binding the textures.

Is there any not-so-easily-solveable problem with that, or why has a mechanism like that still not been implemented?

07-18-2000, 06:03 AM
Yes, there's a good reason why this feature doesn't exist. On most hardware, changing a texture binding is one of the most expensive things you can do, and so you should try to do it as infrequently as possible. So a function to change texture binding per VERTEX is not going to get any serious use, and would just leave beginning OpenGL programmers scratching their heads and wondering why they're only getting 0.5 fps on their 1-GHz Athlon GeForce2 systems.

07-18-2000, 09:45 PM
What happens, if you change the texture binding during the specification of a triangle, triangle strip, triangle fan, ...?

Something like:
Vertex #1: Texture #1,
Vertex #2: Texture #1,
Vertex #3: Texture #2


07-28-2000, 11:01 PM
And how will you do that ( without that topic function ) in normal OpenGL, not breakig the glBegin/glEnd scheme ? http://www.opengl.org/discussion_boards/ubb/smile.gif