Save a texture to a file in Android & OpenGL ES 2.0
As far as I understand sending a texture to OGLES2 is done using GLUtils.texImage2D
, 开发者_Go百科i.e. I upload the texture to the GPU. How do I send it back to Android then (download it from the GPU)?
Thanks!
Obviously using glReadPixels
, e.g.:
GLES20.glReadPixels(0, 0, mFboWidth, mFboHeight, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, mPixels);
精彩评论