I have a very strange issue where I don't know what else I could take into account.
My (Game)-Activity running on an Android 1.6 API generates a GlSurfaceView-inherated simple class that does nothing more than creating a renderer and handling touch events. It looks like this:
Using java Syntax Highlighting
- public class AndroidGameSurface extends GLSurfaceView {
- public AndroidGameSurface(Context context) {
- super(context);
- //setDebugFlags(DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS);
- mRenderer = new AndroidGameRenderer();
- setRenderer(mRenderer);
- }
- @Override
- public boolean onTouchEvent(final MotionEvent event) {
- queueEvent(new Runnable(){
- public void run() {
- ActualGame.onMotionEvent(event);
- }
- }
- );
- return true;
- }
- AndroidGameRenderer mRenderer;
- }
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
The renderer itself is like hits:
Using java Syntax Highlighting
- class AndroidGameRenderer implements GLSurfaceView.Renderer {
- public AndroidGameRenderer() {
- }
- public void onDrawFrame(GL10 gl) {
- ActualGame.update();
- ActualGame.render();
- }
- public int[] getConfigSpec() {
- // We don't need a depth buffer, and don't care about our
- // color depth.
- int[] configSpec = {
- EGL10.EGL_DEPTH_SIZE, 0,
- EGL10.EGL_NONE
- };
- return configSpec;
- }
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- PlatformGLInterface.sGlInterface = gl;
- try {
- ActualGame.create(true, width, height);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- gl.glDisable(GL10.GL_DITHER);
- gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,
- GL10.GL_FASTEST);
- }
- }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
So.. this _really_ is nothing special. As you see in OnDraw, I do all updating and drawing single threaded. While I have already begun creating a simple task queue, I still stick to single threaded operation, currently. For rendering, I use fixed point pointer methods, as example:
Using java Syntax Highlighting
- sGlInterface.glVertexPointer(3, GL10.GL_FIXED, 0, (IntBuffer)_pMesh.getBufferVtx());
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
for testing, I use most of the classes for a PC implementation as well and it is running absolutely fine there. Now my problem:
The actual on-screen events are not synchronous displayed. As instance, several meshes are broken, some are rendered once but not updated even if a new frame got rendered with updated positions. If I run the package as "Debug" using eclipse, most of my meshes are not even showing up at all!
Does anybody have a glue what I might have done wrong? I took the CubeRenderer example from the ApiDemos as reference and did mostly copy and paste (instead of my rather lengthy game code that does updating and rendering).
Every hint is helpful - I feel totally helpless and dumb because of the time already spent.
Thank you!

