android bitmap pixel format for glTexImage2D
问题 I'm trying to load textures to use with NDK OpenGL from Java with the Bitmap class. It works, but I'm having problems with the pixel format. First, in Java, I load a bitmap from the assets folder like this: Bitmap bitmap = BitmapFactory.decodeStream(amgr.open(path)); return bitmap.copy(Bitmap.Config.ARGB_8888, false); the bitmap config does not have an option for RGBA channel order. [JNI things happen here] Using GLES 1, I then buffer the texture like so: glTexImage2D(GL_TEXTURE_2D, 0, GL