简体   繁体   中英

Android OpenGL ES read PHONE inconsistant with EMULATOR

Hey, i wrote a small application, a client application which receives images from a server, and then display them on a rotating cube using openGL ES. this works just fine in the emulator, but on real phone SGS , blank white images displayed instead. what could be the problem ???

the photos are saved using

     fos = openFileOutput(i+".jpg",MODE_WORLD_READABLE);

and then read and converted to Bitmap using

     File myImage= context.getFilesDir();
     String imgPath=myImage.getAbsolutePath();

     BitmapDrawable bmd = new BitmapDrawable(imgPath+"/"+face+".jpg");
     bitmap[face]= bmd.getBitmap();

The Rendering Code used is same as supposed in Example 6a: Photo-Cube , under MYGLRenderer.java

Thanks in Advance.

This sounds somewhat similar situation I faced some time ago. Reason was that I didn't resize Bitmap to size of power of two before sending it to GL context.

https://gamedev.stackexchange.com/questions/10829/loading-png-textures-for-use-in-android-opengl-es1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM