frame updating

hey im totally new to openglES i’ve worked with opengl a lot. I think my code is correct, it basically comes from the redbook but it doesnt seem to update the frames. So i increased a counter with every frame and printed a message box to see if it’s updated. Weird thing is when i print the box it actually updates…

that’s my code:


the util functions are not necessary, oh and im using the emulator 2003 only atm.

Is there anything i should know?

thanks :smiley:

You need to hook up a timer event to trigger repeated updates. I think the message box essentially invalidates your windows rect, that’s why you get a redraw.

The alpha3d.c demo from the redbook examples should demonstrate how to set up an animation loop.

Hope that helps,
HM

hey man,
thanks for your reply, I got it working immediately :).

The best way to refresh the screen is to call ugPostRedisplay(uwin) after swapping buffer isn’t it ?

That will trigger an immediate redraw. If you need a steady framerate, you’d be probably better off with the timer approach.

  • HM

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.