David Megginson writes:
> Jim Wilson writes:
> 
>  > Well I've setup a bare bones class for FGScene and have been
>  > browsing through main.cxx.  I'm not quite sure what you mean by
>  > "all of the scene- and scenery-management code".
> 
> I mean the initialization, setup (clip planes, etc.), and drawing of
> the main scene graph.  It might not hurt to move more into there
> (i.e. lighting and sky), but one step at a time might not be a bad
> idea.
> 
> My ultimate goal is for fgMainLoop to look something like this:
> 
>   void
>   fgMainLoop ()
>   {
>     long dt = globals->getElapsedTimeSomeHow();
>     for (int i = 0; i < globals->getSubsystemCount(); i++)
>       globals->getSubsystem(i)->update(dt);
>   }
> 
> The main.cxx file should be only a couple of hundred lines long at
> most, and should give a good overview of the top-level control flow of
> the program.  Next, most modules should be moved out of src/Main,
> leaving only truly main ones like options.[ch]xx, globals.[ch]xx, and
> fgfs.[ch]xx.

My one *big* caution on this is to *think* about and pay *attention*
to opengl state management issues.  If you don't have a good handle on
the subtleties involved, you could make a real mess of things or
introduce subtle rendering bugs.

Regards,

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to