What is the difference between glClient *** gl ***?

I study GLES. There are many paired functions, such as glClientActiveTexture/ glActiveTexture. What is the difference between the two? (Especially in case glClientActiveTexture)

+3
source share
2 answers

From openGL documentation :

  • glActiveTexture glActiveTexture determines which texture units will follow the state states of the texture.
  • glClientActiveTexture selects the client state parameters of the vertex array that should be changed using glTexCoordPointer.

, glClientActiveTexture glTexCoordPointer ( ). , glActiveTexture glTexCoord ( ( OpenGL ES (AFAIK)).

+4

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,1
  • GL_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_multitexture
  • glActiveTexture glBindTexture glBegin glEnd. , .
+1

Source: https://habr.com/ru/post/1731986/


All Articles