Texture units and vertex arrays in OpenGL
问题 I'm trying to draw one cube with different textures for each face. I've come across many tutorials which state that in the display() routines, you need to enable all texture units before calling glDrawElements() . I do this my calling: gl.glClientActiveTexture(GL.GL_TEXTURE0); gl.glBindTexture(GL.GL_TEXTURE_2D, textureId); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, getTexCoordBufferObject()); gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0); gl.glClientActiveTexture(GL.GL_TEXTURE1); gl.glBindTexture(GL.GL