What happens if you bind (different textures) to both GL_TEXTURE_2D
and GL_TEXTURE_CUBE_MAP
in the same texture image unit?
For example, suppose I bind one texture to GL_TEXTURE0
's GL_TEXTURE_2D
target and another texture to the same texture unit's GL_TEXTURE_CUBE_MAP
target. Can I then have two uniform variables, one a sampler2D
and the other a samplerCube
and set both to 0 (to refer to GL_TEXTURE0
)?
I suspect the answer is "no" (or that the result is undefined) but I haven't found anything in the spec that specifically prohibits using multiple texture targets in the same texture image unit.