View Full Version : Textureunits

01-26-2003, 03:59 AM

I have a Geforce 2 Ti, which has 2 texture units. However i think of doing some stuff, for which i would need more textureunits (textureanimation, etc.).
So, of course, i have to do multiple passes. However i still need more than 2 texture coordinates per vertex. So i wonder, if OpenGL supports more texture coordinates per vertex, than the gfx card supports texture units.
That means: If i enable texture unit 3, does this mean, that my gfx MUST have more than 2 units? Because if i have ONLY TU 3 enabled, than the card could use TU 1 internally.

Or should i just put all my vertex coords into memory, and swap the pointer to it, each time i draw another pass, so that i always use TU 1?

If anyone has a better idea, how to do this, please let me know.


01-26-2003, 06:25 AM
opengl is not limited to what the graphics card has. It can do anything in software mode. There is a query function I think it's something like

GLint val;
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &val)

that will tell you what the maximum is. If it returns 2, then that's all you have.

01-26-2003, 06:34 AM
This will return 2 for a GF2 GTS http://www.opengl.org/discussion_boards/ubb/biggrin.gif.


01-26-2003, 07:19 AM
If you use multiple passes, you can pass different texture coordinates in the different passes. However, any LockArraysEXT() optimization you've done may or may not still be valid if you re-specify the TexCoordPointer().