> Great demo. Looks like we could add it somewhere to our demos.
> If not in test/ then maybe in examples/ ?
> Opinions?

Well, I guess the original code is in the public domain, so I imagine
that'd be OK, though my "additions" might need a little tidying up as
they might not be exhibiting the best fltk-way to do the things I
added...
I guess we could add a checkbox for selecting between the "desired frame
rate" and "idle loop" options, and a valuator for setting the frame rate
too (if that actually worked, that is!)

> > It was originally meant to run on the idle loop, and with this WIN32
> > that runs about 3,000 FPS.
> 
> I don't get more than approx. 60 (!) FPS on my Win7 box (4 cores, with
> the CPU at a minimum load)

Hmm, that may be a GL driver issue - on these boxes here, the (WIN32) GL
driver offers an option to synch to the monitor refresh, or not.
With the synch enabled (which IIRC may be the default) I get a solid 60
FPS in the "idle loop" case, which matches the monitor setting of 60Hz.
With the synch disabled, on this box I see something like 2759 FPS or
so, though with some variation...

> > I've added an fl_timer aiming for 100 FPS, and on this box I get a
> > rock-solid 64 FPS... Hmm, 64 != 100, so that's odd.
> 
> Same value: ~60 FPS
> 
> > I wonder if I'm hitting some issue with the resolution of the WIN32
> > timers or something, as the FPS I get is *exactly* 64, even though
> the
> > idle-loop version runs much, much faster...
> 
> Running at /desired/ frame rate 30 gives me 21.4 FPS. Strange.

Hmm, OK, I just tried setting desired to 30, and got exactly 21.4 too. 
That is odd, but since we see it on two distinct machines, I wonder if
there is some interaction with the way WIN32 handles it's timers, or
something?


> The same program, compiled in a Linux VM on the *same* Win7 box gives
> me up to 516 FPS with idle loop and ~450 FPS with timers.

I guess the VM is is emulating GL, e.g. MESA or whatever, so that
accounts for the low "idle" frame rate - but why is the "timed" version
higher than desired?

> I'm wondering what's going on...

That does not sound like the timers "worked" at all on the linux test
though, if it was running faster than desired.
That does sound weird.
Maybe my logic for counting the FPS is bad, or something? Though I
*think* it is OK...

I can't test on linux right now, as the setup I have here won't cope
with GL in an Xserver window (and I can't be bothered to walk across the
road to get on a physical machine...)




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
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to