Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is very odd.I want to load .png file via asset manager which is provided by android sdk. AssetManager manager; /........./ BitmapFactory.decodeStream(;

It returns BGR format data but opengl es 2.0 uses RGB format so , Blue seems red , red seems blue, how odd.

Is there any solution for it?

I use Nvıdia Tegra 2 (Android 2.2) device for test the application along with c++ via JNI.

share|improve this question

You should be able to specify the pixel-format to be GL_BGR instead of GL_RGB.

For glTexImage2D this would be the format parameter.

share|improve this answer

You can use this extension: EXT_texture_format_BGRA8888. But, you need to check that your device can handle it. Galaxt Spica or Moment doesn't. Otherwise just do a conversion. In my engine, i swap BGRA to RGBA before loading into glTexImage.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.