Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Updating texture using glTexImage2D(..) in OpenglES2 [Android]
- GLES20.glGenTextures ( 1, textureId, 0 );
- GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, textureId[0] );
- GLES20.glTexImage2D ( GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, bitmap.getWidth(), bitmap.getHeight(), 0,GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, byteBuffer );|
- GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, 0 );
- GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, textureId[0] );
- GLES20.glTexImage2D ( GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, bitmap.getWidth(), bitmap.getHeight(), 0,GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, byteBuffer );|
- GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, 0 );
Advertisement
Add Comment
Please, Sign In to add comment