> Yes, I want to control some 2D sprites with mouse or keyboard > in real time and interact with the fast animation in real > time as fast as I can. It seemed that this is not easy to > implement in fltk.
There are examples of games implemented in fltk (Yuri's "Regame2" springs to mind) though it was not designed with that use in mind. So it is perfectly feasible. What does "as fast as I can" really mean, though? If you are writing an animation, you need to update the scene only as fast as necessary to make the animation smooth for the end user, and certainly no faster than the refresh rate of your monitor... Any faster, and you are simply wasting CPU cycles that would be better used updating the game physics or AI. > I am not sure what happened in xserver. As a opengl-based > reference, glxgears give about 4000fps. OK - but why do you think this is relevant? In this case, glxgears is probably using the DRI infrastructure to render directly to the screen, and runs independently of the X11 event queue. So this tells us that if you render your scene in GL, it can be drawn very quickly indeed... Which is what you would expect. That tells us nothing about how the basic 2D rendering queue on your server will operate, however, as it is inherently separate from the DRI infrastructure and it is that which you are trying to use. Perhaps you should use GL (via an Fl_GL_Window) to handle your rendering? However, I think you can probably get basic 2D rendering working, say at 30Hz, without doing anything too fancy, and the end result will be acceptably smoothly animated. SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

