Tim Moore wrote:
> Hans Ulrich Niedermann wrote:

>> puInitSDL(), puInitGLUT(), puInitNativ() instead of puInit(). These
>> three functions cannot go away without plib breaking binary
>> compatibility, and plib development is not very daring these days, so
>> using these functions directly is not very risky.
> 
> Binary compatibility with what? These functions don't appear in any plib 
> library.
> I think you can just call puSetWindowFuncs(), puRealInit() yourself in
> gui_init().

Indeed, but that presumes a little too much knowledge of plib internals
than I am comfortable with right now :)

Anyway, The Patch is ready - for a RfC phase. As its 58KB is too large
for the ML, you can get it from

   http://flightgear.lauft.net/FG-unified-fgfs.patch

It is against this morning's CVS HEAD aka the FG/OSG branch.

sloccount says the patch adds 165 SLOC to the complete source tree, and
diffstat says this:

 configure.ac                 |   70 +++++++++++++++-----
 src/GUI/gui.cxx              |   42 +++++++++++-
 src/GUI/gui.h                |    4 -
 src/GUI/mouse.cxx            |   13 ++-
 src/GUI/property_list.cxx    |    6 -
 src/Input/input.cxx          |   29 ++++----
 src/Main/FGManipulator.cxx   |    5 -
 src/Main/Makefile.am         |   35 ++++++----
 src/Main/bootstrap.cxx       |   10 ++
 src/Main/fg_gsa.cxx          |  121 +++++++++++++++++++++++++++++++++++
 src/Main/fg_gsa.hxx          |  112 ++++++++++++++++++++++++++++++++
 src/Main/fg_os.cxx           |   64 +++++++++++-------
 src/Main/fg_os.hxx           |   32 ---------
 src/Main/fg_os_glut.hxx      |   44 ++++++++++++
 src/Main/fg_os_osgviewer.cxx |   56 ++++++++++------
 src/Main/fg_os_osgviewer.hxx |   45 +++++++++++++
 src/Main/fg_os_sdl.cxx       |   54 +++++++++------
 src/Main/fg_os_sdl.hxx       |   44 ++++++++++++
 src/Main/main.cxx            |   36 +++++-----
 src/Main/options.cxx         |   13 +++
 src/Main/renderer.cxx        |   30 +++++---
 src/Main/renderer.hxx        |   12 +++
 src/Main/splash.cxx          |    5 -
 23 files changed, 698 insertions(+), 184 deletions(-)

A few notes:

 * Tim Moore has suggested to name the feature Graphics Surface Adapter.
   I have shortened that to GSA in many places. The three GSAs are
   GLUT, SDL, and osgViewer.

 * There are three configure parameters now:
      --enable-glut --enable-sdl --enable-osgviewer
   The latter two need to be explicitly activated, the former is
   enabled by default and can be disabled with --disable-glut.

 * Without any command line or $HOME/.fgfsrc parameters, fgfs will
   choose its compile time default which has been designed to be the
   very same GSA used by fgfs in CVS as its only one.

 * With a command line or $HOME/.fgfsrc parameter of
       --gsa=GLUT      --gsa=glut
       --gsa=SDL       --gsa=sdl
       --gsa=osgViewer --gsa=osgviewer --gsa=OSGVIEWER
   the respective GSAs will be chosen.
   If the chosen GSA is not compiled into fgfs, fgfs will use its
   compile time default, similar to --airport or --aircraft being
   ignored when given with invalid values.
   If multiple --gsa= parameters are present, the last one takes
   precedence.

 * There are a number of things to clean up until it will look nice.
   Indentation and a few logic issues come to mind.

 * If it was not for the PU_USE_NONE thing in GUI/gui.cxx, I could have
   moved all GSA specific stuff into Main/*.{cxx,hxx}.

 * Someone should take a look whether catching std::exception
   objects in bootstrap.cxx is OK.

 * Is the "if (gsa)" in bootstrap.cxx really necessary?

 * Will some people's 1998 automake have problems with
    foobar_SOURCES +=
   ?

 * I have tried to update the MSVC8 project file in a way it makes
   sense, but I am not totally sure I succeeded.

 * Main/fg_os.cxx should really be renamed to Main/fg_os_glut.cxx

 * If some linkers have problems with -lfoo -lbar -lfoo -lbar, we
   need a little more tuning in the opengl_LIBS/sdl_LIBS department.

I'm looking forward to comments.


Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to