1
0
Fork 0
No description
Find a file
ehofman d1168b493a Frederic Bouvier:
Norman Vine wrote :

> Frederic Bouvier writes:
>
>> Quoting Andy Ross:
>>> * Hopefully in a CPU-friendly way.  I know that older versions of
>>>  the NVidia drivers did this by spinning in a polling loop
>>>  inside the driver.  I'm not sure if this has been fixed or not.
>>>
>>> From my experience, the latest non-beta Windows NVidia driver seems to eat CPU
>>
>> even with sync to vblank enabled. The CPU usage is always 100%.
>
> Buried in the PPE sources is a 'hackish' but portable way to limit CPU usage if the desired framerate is met
>
>  /*
>    Frame Rate Limiter.
>
>    This prevents any one 3D window from updating faster than
>    about 60Hz.  This saves a ton of CPU time on fast machines.
>
>    ! I THINK I MUNGED THE VALUE FOR ulMilliSecondSleep() NHV !
>  */
>
>  static ulClock *ck = NULL ;
>
>  if ( frame_rate_limiter )
>  {
>     if ( ck == NULL )
>     {
>       ck = new ulClock ;
>       ck -> update () ;
>     }
>
>     int t_ms = (int) ( ck->getDeltaTime() * 1000.0 ) ; /* Convert to ms */
>
>     if ( t_ms < 16 )
>       ulMilliSecondSleep ( 16 - t_ms ) ;
>  }
>
>

I implemented the method pointed out by Norman. It works great on windows and saves me a lot of CPU cycles. This way, I can get the same framerate in moderately populated areas and have CPU idle 50% of the time instead of wildly looping in the NVidia driver while waiting to sync on vblank.

It has been tested on Linux by Melchior. He saw the same gain in CPU cycles.
2005-03-09 15:12:01 +00:00
docs-mini Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
examples/netfdm Add an example implementation for the NetFDM structure. 2004-04-27 08:55:04 +00:00
man Cameron Moore: 2003-10-23 15:53:32 +00:00
package Initial revision. 2005-01-19 22:52:34 +00:00
scripts Remove gif support, add png support. 2005-01-17 20:14:55 +00:00
src Frederic Bouvier: 2005-03-09 15:12:01 +00:00
tests Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
utils yet another Cygwin fix. 2005-02-18 17:42:46 +00:00
.cvsignore Ignore generated GPL. 2004-04-04 20:56:26 +00:00
acinclude.m4 automake 1.8+ fixes 2005-02-15 18:16:18 +00:00
am2dsp.cfg Updated am2dsp.cfg from Bernie. 2002-04-22 22:42:23 +00:00
AUTHORS Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
autogen.sh Fixes to better support the native irix compilers. 2002-09-06 17:30:21 +00:00
ChangeLog Updated ... 2001-06-18 22:25:59 +00:00
configure.ac Another Cygwin fix. 2005-02-18 14:17:03 +00:00
FlightGear.dsp Updates for the 0.9.8-pre2 release. 2005-01-03 20:06:51 +00:00
FlightGear.dsw Initial revision. 2000-10-16 22:02:10 +00:00
Makefile.am Changes for v0.9.6 2004-10-12 16:18:05 +00:00
NEWS Ready for v0.9.8. 2005-01-19 02:11:52 +00:00
README Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
Thanks Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00

Welcome to the FlightGear Flight Simulator project.
===================================================

The primary web page for this project is: http://www.flightgear.org

For basic installation instructions see the "INSTALL" file.

Before you can run FlightGear you will also need to download and
install the "base" package which is a collection of textures, sounds,
sample scenery, and other data files need by the sim.

For additional install help for specific platforms please browse the
"docs-mini/" subdirectory.

More complete documentation is available from our web page as a
separate distribution.

Please take a look at the "Thanks" file for a list of people who have
contributed to this project.  If you have contributed something but
don't find your name in this file.  Please send a polite reminder to
http://www.flightgear.org/~curt

For a summary of changes/additions by version see the "NEWS" file.

This project is GPL'd.  For complete details on our licensing please
see the "COPYING" file.

For information on available mailing lists, mailing list archives, and
other available source code and documenation, please visit our web
site.

FlightGear is a product of the collaboration of large international
group of volunteers.  FlightGear is a work in progress.  FlightGear
comes with no warrantee.  We hope you enjoy FlightGear and/or find it
of some value!