Guest User

Untitled

a guest
Aug 10th, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Updating texture using glTexImage2D(..) in OpenglES2 [Android]
  2. GLES20.glGenTextures ( 1, textureId, 0 );
  3. GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, textureId[0] );
  4. GLES20.glTexImage2D ( GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, bitmap.getWidth(), bitmap.getHeight(), 0,GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, byteBuffer );|
  5. GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, 0 );
  6.  
  7. GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, textureId[0] );
  8. GLES20.glTexImage2D ( GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, bitmap.getWidth(), bitmap.getHeight(), 0,GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, byteBuffer );|
  9. GLES20.glBindTexture ( GLES20.GL_TEXTURE_2D, 0 );
Advertisement
Add Comment
Please, Sign In to add comment