Reputation: 163
I'm writing completely native OpenGL ES 2.0 game engine for Android. Previously I developed with Samsung Galaxy S (Android 2.3.3) and now with Samsung Galaxy S II (updated to Android 4.0.3). I didn't try the engine on Galaxy S II while it still had Android 2.3.3 (hardware specific problem?).
Now the engine runs and renders fine on Android 2.3.3 (tested on Galaxy S), but it doesn't render on Android 4.0.3 (tested on Galaxy S II). The problem is similar to this: OpenGL Renderer not working on Ice Cream Sandwich
Everything else works without problems on 4.0.3 except the rendering, nothing appears on the screen. I managed to render a single triangle on 4.0.3 but a vertices extracted from a model won't render (using glDrawElements()) with or without textures.
I hope there is a simple solution for this.
Cheers
Upvotes: 3
Views: 2117
Reputation: 163
I should have checked GL errors earlier. The problem occurred with glDrawElements()
, where I used GL_UNSIGNED_INT
(GL_UNSIGNED_BYTE
and GL_UNSIGNED_SHORT
are only allowed values). Android 2.3.3 didn't seem to care about that. I changed it to GL_UNSIGNED_SHORT
and now it works perfectly.
Upvotes: 4