Response time, buffers and optimisation - please help

Hello!

I am quite a new beginner in OpenGL, especially in ES.
I am trying to make some kind of game for my WM6.1 phone (HTC Diamond): a dice placed in a quad space and using the built in accelerometer to roll the dice.

So now i have drawed the dice only, and i am rotating it depending on the phones position (using the GVector from the accelerometer).
I have the problem now that the response is quite poor. What i mean is when i lean the phone in one direction, the dice is spinning, but when i lean the phone in the opposite direction, it take quite much time (a few seconds, i could not notice period) the dice to response.

I suppose it has something to do with the FRAME BUFFER. Frames are drawed faster than are diplayed, and that’s why i think a have this delay.
Or am i wrong?

Please help me, if you know how i can optimise my code to get a better response.

Thanx

First: you don’t give enough information about your target / environment / language / library / etc.,
Second: show us the code if you want us to comment/fix it.

Regards.

Or perhaps the other way around, maybe you’re getting too many updates on the position. If you’re rendering a frame for each position update you get, your queue of position updates could be getting backlogged. A strategy for this is to ensure you get the latest position between frames, even if it means throwing away some positions updates.

Thank you for your reply.

So, i am developing in Visual Studio 2008 for .NET Compact Framework 3.5, Windows Mobile 6.1
I am using a .Net wrapper for the OpenGl ES found on:

http://www.koushikdutta.com/2008/08/net … r-for.html

I am not queueing the position updates. The glDraw() method is called in the OnPaint event, which is called automatically. The position is determined for each frame.

The problem i see here is that there are too many frames buffered before the swap occurs. I tried reducing the buffer size through the Egl configuration, but i am don’t fully understand how it works and there is too less information about the configuration possibilities.

The basic code and structure is the same with the Test application provided with the wrapper… If you want you could take a look.

ex:
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);

        DrawGLScene();
        egl.SwapBuffers(myDisplay, mySurface);
        gl.Clear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT);
        Invalidate();

}

I try cleaning up my code a little bit and I will post some of it if it helps.

Thanx