MyProject run in Emulator ok but run in devide not true

Problems with Canvas, OpenGL, etc...

MyProject run in Emulator ok but run in devide not true

Postby nvmanh90 » Sun Jul 24, 2011 8:13 am

Hi all.

I'm newbie of openGL in android.

I have project to draw text and a square.

I has run project in emulator and it ok, show my text and square in background.

But i run project in device ( Nexus One) , it only show text, don't show square.

I can't fix this bug.

Please help me fix this bug, for my project can run true in device.

Sorry for my language not good.


Project draw text and square
(86.67 KiB) Downloaded 127 times
Once Poster
Once Poster
Posts: 1
Joined: Fri Jul 22, 2011 11:15 am


Re: MyProject run in Emulator ok but run in devide not true

Postby MichaelEGR » Sun Jul 24, 2011 9:03 am

Ditch the emulator. It's worthless for OpenGL. Is your texture a power of 2 texture 128x128, 256x256, 256x512, etc? Unfortunately I don't have time to look at your code. Quite likely you are doing a newbie GL mistake. Power of 2 texture size is usually a common culprit. I've not touched the emulator in years and I recall it working for non-power of 2 sized textures, but devices won't in standard operation. Because you can see your text and some other rendering that means you have a valid context and you are drawing at least something. I'd first check the texture size that is being used for the cube. If that is not it then then just try drawing a quad or triangle with the same texture and verify it renders. If it does you're not too far from getting your cube to work again. Best of luck!
Founder & Principal Architect; EGR Software LLC
User avatar
Senior Developer
Senior Developer
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA


Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 2 guests