Android OpenGL ES2.0 Texture Swapping

后端 未结 1 1463
难免孤独
难免孤独 2021-01-22 18:42

First off I am new to OpenGL, but on my phone (Motorola Bionic) the following code works as intended.

GLES20.glActiveTexture(GLES20.GL_TEXTURE1);
GLES20.glBindTe         


        
1条回答
  •  有刺的猬
    2021-01-22 19:07

    You're probably hitting some limit of maximum active textures, for example as docs says:

    glActivateTexture - The number of texture units is implementation dependent, but must be at least two

    Also you might want to check GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS (with glGet).

    To debug problem you might want to check for glGetError after each call glActiveTexture/glBindTexture and maybe those glUniform1i.

    0 讨论(0)
提交回复
热议问题