Reputation: 23
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.
Upvotes: 0
Views: 192
Reputation: 6073
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
Upvotes: 0