The purpose of this posting is to help you understand the various texture-related resources available to NVIDIA GPUs, particularly for the GeForce FX and Quadro FX family of GPUs (as well as earlier NVIDIA GPUs).
On GeForceFX and QuadroFX GPUs (ie, NV3x) OpenGL drivers, these are the NV_fragment_program & ARB_multitexture implementation dependent limits:
valueof(GL_MAX_TEXTURE_UNITS_ARB) = 4
valueof(GL_MAX_TEXTURE_COORDS_NV) = 8
valueof(GL_MAX_TEXTURE_IMAGE_UNITS) = 16
All future GeForce FX/Quadro FX GPUs will support 8 texture coorindate sets and 16 texture image units, even the most inexpensive GeForce FX/Quadro FX GPU.
Here are the GeForce 256, GeForce2, and GeForce4 MX (ie, NV1x), and TNT and TNT2 (ie, NV4) limits:
valueof(GL_MAX_TEXTURE_UNITS_ARB) = 2
valueof(GL_MAX_TEXTURE_COORDS_NV) = 2 *
valueof(GL_MAX_TEXTURE_IMAGE_UNITS) = 2 *
Here are the GeForce3, Quadro DCC, and GeForce4 Ti (ie, NV2x) limits:
valueof(GL_MAX_TEXTURE_UNITS_ARB) = 4
valueof(GL_MAX_TEXTURE_COORDS_NV) = 4 *
valueof(GL_MAX_TEXTURE_IMAGE_UNITS) = 4 *
- = effective value since ARB_fragment_program and NV_fragment_program not actually supported.
What this means is that if you use texture units beyond 0-3, you need to write fragment programs. Fragment programs are considerably more powerful and considerably easier to write because you can use the Cg compiler and/or run-time to generate ARB_fragment_program and/or NV_fragment_program code for you.
Here’s a comprehensive list of which limit is used for setting which texture-related state:
depends on num texture units
glEnable/glDisable(GL_TEXTURE_xxx)
glTexEnv/glGetTexEnv(GL_TEXTURE_ENV_MODE, …)
glTexEnv/glGetTexEnviv(GL_TEXTURE_SHADER_NV, …)
glFinalCombinerInput()
glCombinerInput()
glCombinerOutput()
depends on num texture coordinate sets
glEnable/glDisable(GL_TEXTURE_GEN_xxx)
glTexGen(…)
glMatrixMode(GL_TEXTURE)/glLoadIdenity/glLoadMatrix/glRotate/…
glPointParameter(GL_POINT_SPRITE_R_MODE_NV, …)
glTexEnv/glGetTexEnv(GL_POINT_SPRITE_NV, …)
glClientActiveTexture(…)
glMultTexCoord(…)
The NV_vertex_program, NV_vertex_program1_1, and NV_vertex_program2 extensions specify which texture coordinate set an output goes to with the syntax “TEX#” where # is from 0 to 7. ARB_vertex_program specifies which texture coordinate set an output to with the syntax “result.texcoord[#]”.
depends on num texture image units
glTexImageXXX(…)
glGetTexImage(…)
glTexSubImageXXX(…)
glCopyTexImageXXX(…)
glCopySubTexImageXXX(…)
glTexParameter/glGetTexParameter(…)
glColorTable/glGetColorTable(GL_TEXTURE_xxx/GL_PROXY_TEXTURE_xxx, …)
glCopyColorTable/glCopyColorSubTable(GL_TEXTURE_xxx/GL_PROXY_TEXTURE_xxx, …)
glGetColorTableParameter(GL_TEXTURE_xxx/GL_PROXY_TEXTURE_xxx, …)
glTexEnv/glGetTexEnv(GL_TEXTURE_FILTER_CONTROL_EXT, …)
glGetTextureLevelParameter(…)
glBindTexture(…)
The ARB_fragment_program and NV_fragment_program extensions specify which texture image unit a fragment program texture instruction should sample.
NV_fragment_program specifies texture image units with the syntax “TEX#, <target>” where # is between 0 and 15, and <target> is one of 1D, 2D, 3D, CUBE (cube map), or RECT (texture rectangle). ARB_fragment_program specifies texture image units with the syntax “texture[#], <target>”.
glGet depends on how the gotten state corresponds to how the state is set based on the above list.
I hope this helps.
- Mark