Kenji, ( , OpenGL ES).
, ( ).
- : (,
GL_TEXTURE_2D). glActiveTexture - : . (, 2D).
glBindTexture. - : , ( , ) (, ), . //,
glGenTextures, ( ) glBindTexture .
: , .
2D- (), 2D-, - 2D- 2D . glActiveTexture , glBindTexture, glBindTexture , , .
, , , texcoords. - OpenGL/GLSL, texcoords /, texcoords . , texcoord . , , - , glClientActiveTexture. , , , glActiveTexture , , gl_MultiTexCoord ( ) texcoords, glTexCoordPointer.
glActiveTexture , glClientActiveTexture - texcoord. API- , , :
glActiveTexture , , glBindTexture. glMultiTexCoord, glTexCoord glTexCoordPointer, texcoords, .glClientActiveTexture , , , glTexCoordPointer. glBindTexture, , texcoords.glMultiTexCoord, DSA glTexCoord, 0 (GL_TEXTURE0). glTexCoordPointer , , glTexCoordPointer glVertexAttribPointer, glClientActiveTexture. , glClientActiveTexture , , glWhateverPointer.
glActiveTexture + glBindTexture all . glClientActiveTexture + glTexCoordPointer, DrawArrays/DrawElements glVertexAttribPointer.
OpenGL . :
- (
glBegin/glEnd) GLSL, 130 , glMultiTexCoord texcoords. glBindVertexArray glBindBuffer + glDrawArrays/glDrawElements, , glVertexPointer, glNormalPointer, glTexCoordPointer .., .glBindVertexArray + glDrawArrays/glDrawElements, , glVertexAttribPointer, .
API 2D-, ( ):
.
glMultiTexCoord 0,0,0,1.
glMultiTexCoord2f == s, t, 0,1GL_TEXTURE0 + i, i.GL_TEXTURE0 + i, 0 - GL_MAX_TEXTURE_COORDS -1.GL_MAX_TEXTURE_COORDS , 80 OpenGL 4.0.glMultiTexCoord OpenGL 1.3+ ARB_multitextureglActiveTexture glBindTexture glBegin glEnd. , .