Chris Lux
03-03-2004, 02:22 AM
the spec of ARB_fragment_program and ARB_shader_objects isn't clear about this topic. what must be bound to a sampler2D uniform parameter, the texture unit (GL_MAX_TEXTURE_UNITS is the maximum) or the texture object id (created with glGenTextures()).
in the first case this issue would limit the shader to 4 textures (on a geforce card) while GL_MAX_TEXTURE_IMAGE_UNITS reports 16 available units per shader. also would the first case imply quiet an overhead for the setup for multiple textures for one shader (glActiveTexture must be set for every texture and an texture object must be bound).
in the first case this issue would limit the shader to 4 textures (on a geforce card) while GL_MAX_TEXTURE_IMAGE_UNITS reports 16 available units per shader. also would the first case imply quiet an overhead for the setup for multiple textures for one shader (glActiveTexture must be set for every texture and an texture object must be bound).