Compare commits
76 Commits
RELEASE_0_
...
RELEASE_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b6af2f0c2 | ||
|
|
5bdff41641 | ||
|
|
67e9d105cb | ||
|
|
f1fc99f16f | ||
|
|
f89e359d53 | ||
|
|
77ec170a50 | ||
|
|
34320f5f20 | ||
|
|
a26271e46e | ||
|
|
e2e7466250 | ||
|
|
1e24cc4643 | ||
|
|
dfc23c3528 | ||
|
|
cd11a5dc27 | ||
|
|
899734296b | ||
|
|
7a3a81c152 | ||
|
|
e62a4a05ac | ||
|
|
463ca207ce | ||
|
|
da6e1b31ea | ||
|
|
8c783b1680 | ||
|
|
efce88ff12 | ||
|
|
01608b7e18 | ||
|
|
a5f0e0395a | ||
|
|
0b723174fd | ||
|
|
5d248bf0df | ||
|
|
c039ccdeb0 | ||
|
|
d88fb32a73 | ||
|
|
37ac409586 | ||
|
|
7b24e94c66 | ||
|
|
e12cd2a50c | ||
|
|
98b2ba4fc1 | ||
|
|
2f0afdccc1 | ||
|
|
79734df554 | ||
|
|
c52657fa1a | ||
|
|
9cac8409cd | ||
|
|
18703ce02d | ||
|
|
709a166bd6 | ||
|
|
8048e6297c | ||
|
|
fb0dded103 | ||
|
|
055e969e7a | ||
|
|
f10db8a30e | ||
|
|
c19af3525e | ||
|
|
7c60ccfc35 | ||
|
|
84cba33aab | ||
|
|
a52b1ec64f | ||
|
|
f30c4720ae | ||
|
|
7fc8c02688 | ||
|
|
54a7a0d534 | ||
|
|
8d73160a75 | ||
|
|
ff10602c65 | ||
|
|
ca50fe386d | ||
|
|
39f3c6e41d | ||
|
|
ba1b96e518 | ||
|
|
ef486b2cc6 | ||
|
|
06f3cb4f8e | ||
|
|
074f5ff996 | ||
|
|
8c26f32d5f | ||
|
|
9a2ee54389 | ||
|
|
ab69c03698 | ||
|
|
fab1f4e7a0 | ||
|
|
41eed484c1 | ||
|
|
7d18f9bdde | ||
|
|
3a48c3de7a | ||
|
|
d769a9936b | ||
|
|
1697cb3b1a | ||
|
|
62aa32a417 | ||
|
|
a0d0852838 | ||
|
|
2f479cae69 | ||
|
|
4820d57fa8 | ||
|
|
04e3b0b3c1 | ||
|
|
a7f78b9f68 | ||
|
|
f3d8eb4665 | ||
|
|
090f79b951 | ||
|
|
88c0dbf661 | ||
|
|
9e3822ceaf | ||
|
|
007b0a8fe6 | ||
|
|
7f0ebf8871 | ||
|
|
5414e94a1a |
2
Doxyfile
2
Doxyfile
@@ -22,7 +22,7 @@ PROJECT_NAME = SimGear
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 0.3.6
|
||||
PROJECT_NUMBER = 0.3.8
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
|
||||
@@ -10,7 +10,7 @@ EXTRA_DIST = \
|
||||
SUBDIRS = src-libs simgear
|
||||
|
||||
dist-hook:
|
||||
(cd $(top_srcdir); $(HOME)/projects/FlightGear-0.9/admin/am2dsp.pl)
|
||||
(cd $(top_srcdir); $(HOME)/Projects/FlightGear-0.9/admin/am2dsp.pl)
|
||||
|
||||
#
|
||||
# Rule to build RPM distribution package
|
||||
|
||||
36
NEWS
36
NEWS
@@ -1,3 +1,39 @@
|
||||
New in 0.3.8
|
||||
* January 18, 2005
|
||||
|
||||
* Configure script does a sanity check for the existance of openal.
|
||||
* Better pthreads detection for FreeBSD.
|
||||
* Abstract out the location of gl.h, glu.h, and glut.h so we can more
|
||||
easily support MacOS which puts these in an oddball location.
|
||||
* Added two new debug output types for instrumentation and systems.
|
||||
* Add a name parameter to the waypoint class for supporting a route
|
||||
manager in the flightgear gps module.
|
||||
* Make display list usage optional.
|
||||
* Event manager: specifying a zero delay will force event execution in
|
||||
the next frame rather than entering an infinite loop.
|
||||
* gcc-4.0 fix.
|
||||
* Fixes to property tree loading and saving.
|
||||
* Make volume inaudible at startup.
|
||||
* Solaris fixes.
|
||||
* For low density cloud coverages, blend the layer to nothing as we pass
|
||||
through instead of fully engulfing the aircraft in the cloud.
|
||||
* Add several new capabilities to the texture management code for building
|
||||
normal maps and doing some simple on-the-fly effects on textures.
|
||||
* Better error message for sound problems.
|
||||
* Add support for binding a thread to a specific CPU.
|
||||
|
||||
|
||||
New in 0.3.7
|
||||
* October 12, 2004
|
||||
|
||||
* Add support for parsing xml from an in memory buffer, not just a file.
|
||||
* Don't reduce visibility for a "clear" cloud layer.
|
||||
* Add support for audio orientation (direction and cone) for internal
|
||||
view and tower view.
|
||||
* Add support for drawing from display lists rather than in immediate mode.
|
||||
This provides a big performance improvement on many systems.
|
||||
|
||||
|
||||
New in 0.3.6
|
||||
* July 29, 2004
|
||||
|
||||
|
||||
12
README.OpenAL
Normal file
12
README.OpenAL
Normal file
@@ -0,0 +1,12 @@
|
||||
[This file is mirrored in both the FlightGear and SimGear packages.]
|
||||
|
||||
You *must* have the development components of OpenAL installed on your system
|
||||
to build FlightGear!" You can get a copy here:
|
||||
|
||||
http://www.openal.org
|
||||
|
||||
Build notes:
|
||||
|
||||
The OpenAL developers do not make "versioned" releases so we recommend that
|
||||
you pull the latest version via anonymous CVS (follow the instructions at
|
||||
the OpenAL web site) and build/install that.
|
||||
4
Thanks
4
Thanks
@@ -90,7 +90,7 @@ David Megginson <david@megginson.com>
|
||||
SimGear property manager/registry
|
||||
|
||||
|
||||
Curt Olson <curt@flightgear.org>
|
||||
Curt Olson http://www.flightgear.org/~curt/
|
||||
Curt is responsible for overall project and source code management.
|
||||
He has his hands in many of the areas.
|
||||
|
||||
@@ -175,7 +175,7 @@ NOTE:
|
||||
----
|
||||
|
||||
THIS DOCUMENT WAS INITIALLY WRITTEN BY
|
||||
Curt L. Olson <curt@flightgear.org>
|
||||
Curt L. Olson <http://www.flightgear.org/~curt>
|
||||
|
||||
|
||||
05 Jul 2000 Removed non-SimGear entries (CLO)
|
||||
|
||||
62
configure.ac
62
configure.ac
@@ -1,7 +1,5 @@
|
||||
dnl Process this file with autoget.sh to produce a working configure
|
||||
dnl script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([simgear/bucket/newbucket.cxx])
|
||||
@@ -10,7 +8,7 @@ dnl Require at least automake 2.52
|
||||
AC_PREREQ(2.52)
|
||||
|
||||
dnl Initialize the automake stuff
|
||||
AM_INIT_AUTOMAKE(SimGear, 0.3.6)
|
||||
AM_INIT_AUTOMAKE(SimGear, 0.3.8)
|
||||
|
||||
dnl Specify KAI C++ compiler and flags.
|
||||
dnl Borrowed with slight modification from blitz distribution.
|
||||
@@ -165,33 +163,18 @@ dnl Checks for libraries.
|
||||
|
||||
dnl Thread related checks
|
||||
AC_CHECK_HEADER(pthread.h)
|
||||
AC_CHECK_LIB(pthread, pthread_exit)
|
||||
if test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||
AC_SEARCH_LIBS(pthread_exit, [pthread c_r])
|
||||
if test "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||
CXXFLAGS="$CXXFLAGS -D_REENTRANT"
|
||||
CFLAGS="$CFLAGS -D_REENTRANT"
|
||||
fi
|
||||
if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" -a "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||
dnl FreeBSD: System has pthread.h, but -lpthread library check
|
||||
dnl fails. See if we need -pthread instead of -lpthread and look
|
||||
dnl for the functions in libc_r.
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
|
||||
if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
|
||||
CXXFLAGS="-pthread $CXXFLAGS"
|
||||
CFLAGS="-pthread $FLAGS"
|
||||
save_LIBS=$LIBS
|
||||
AC_CHECK_LIB(c_r, pthread_exit)
|
||||
if test "x$ac_cv_lib_c_r_pthread_exit" != "xyes"; then
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
CFLAGS=$save_CFLAGS
|
||||
else
|
||||
dnl This is cheating a bit. pthread_exit comes with using -pthread, not
|
||||
-lpthread
|
||||
ac_cv_lib_pthread_pthread_exit="yes"
|
||||
fi
|
||||
LIBS=$save_LIBS
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes")
|
||||
AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_header_pthread_h" = "xyes")
|
||||
|
||||
thread_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
@@ -271,6 +254,7 @@ opengl_LIBS="$LIBS"
|
||||
LIBS="$base_LIBS"
|
||||
|
||||
dnl check for OpenAL libraries
|
||||
OPENAL_OK="no"
|
||||
case "${host}" in
|
||||
*-*-cygwin* | *-*-mingw32*)
|
||||
dnl CygWin under Windoze.
|
||||
@@ -278,23 +262,43 @@ case "${host}" in
|
||||
AC_SEARCH_LIBS(alGenBuffers, openal32)
|
||||
AC_SEARCH_LIBS(alutInit, [ openal32 ALut ] )
|
||||
LIBS="$LIBS -lwinmm -ldsound -ldxguid -lole32"
|
||||
openal_LIBS="$LIBS"
|
||||
OPENAL_OK="$ac_cv_search_alGenBuffers"
|
||||
;;
|
||||
|
||||
*-apple-darwin*)
|
||||
dnl Mac OS X
|
||||
|
||||
LIBS="$LIBS -framework IOKit -framework OpenAL"
|
||||
openal_LIBS="$LIBS"
|
||||
# not sure how to test if OpenAL exists on MacOS (does it come by default?)
|
||||
OPENAL_OK="yes"
|
||||
;;
|
||||
|
||||
*)
|
||||
dnl default unix style machines
|
||||
|
||||
save_LIBS=$LIBS
|
||||
LIBS="$LIBS $thread_LIBS"
|
||||
AC_SEARCH_LIBS(alGenBuffers, openal)
|
||||
OPENAL_OK="$ac_cv_search_alGenBuffers"
|
||||
openal_LIBS="$LIBS"
|
||||
LIBS=$save_LIBS
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
openal_LIBS="$LIBS"
|
||||
if test "$OPENAL_OK" == "no"; then
|
||||
echo
|
||||
echo "You *must* have the openal library installed on your system to build"
|
||||
echo "SimGear!"
|
||||
echo
|
||||
echo "Please see README.OpenAL for more details."
|
||||
echo
|
||||
echo "configure aborted."
|
||||
exit
|
||||
fi
|
||||
|
||||
LIBS="$base_LIBS"
|
||||
|
||||
AC_SUBST(base_LIBS)
|
||||
@@ -325,11 +329,11 @@ if test "x$ac_cv_header_plib_ul_h" != "xyes"; then
|
||||
exit
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for plib 1.6.0 or newer])
|
||||
AC_MSG_CHECKING([for plib 1.8.4 or newer])
|
||||
AC_TRY_RUN([
|
||||
#include <plib/ul.h>
|
||||
|
||||
#define MIN_PLIB_VERSION 160
|
||||
#define MIN_PLIB_VERSION 184
|
||||
|
||||
int main() {
|
||||
int major, minor, micro;
|
||||
@@ -344,7 +348,7 @@ int main() {
|
||||
],
|
||||
AC_MSG_RESULT(yes),
|
||||
[AC_MSG_RESULT(wrong version);
|
||||
AC_MSG_ERROR([Install plib 1.6.0 or later first...])],
|
||||
AC_MSG_ERROR([Install plib 1.8.4 or later first...])],
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
@@ -455,7 +459,7 @@ else
|
||||
echo "Without JPEG Factory support"
|
||||
fi
|
||||
|
||||
if test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||
if test "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||
echo "Threads: pthread lib found."
|
||||
else
|
||||
echo "Threads: no threads (pthread lib not found.)"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Written by Curtis L. Olson, started February 1999.
|
||||
*
|
||||
* Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
* Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt/
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Written by Curtis L. Olson, started February 1999.
|
||||
*
|
||||
* Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
* Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
# define STL_STRSTREAM <strstream>
|
||||
|
||||
# endif
|
||||
# elif __GNUC__ == 3
|
||||
# elif __GNUC__ >= 3
|
||||
// g++-3.0.x
|
||||
# define SG_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
# define SG_NEED_AUTO_PTR
|
||||
@@ -336,7 +336,9 @@
|
||||
extern void *memmove(void *, const void *, size_t);
|
||||
# endif // __cplusplus
|
||||
|
||||
# define SG_COMPILER_STR "Sun compiler version " SG_STRINGIZE(__SUNPRO_CC)
|
||||
# if !defined( __GNUC__ )
|
||||
# define SG_COMPILER_STR "Sun compiler version " SG_STRINGIZE(__SUNPRO_CC)
|
||||
# endif
|
||||
|
||||
#endif // sun
|
||||
|
||||
@@ -364,6 +366,23 @@
|
||||
|
||||
#endif // __ICC
|
||||
|
||||
//
|
||||
// Platform dependent gl.h and glut.h definitions
|
||||
//
|
||||
|
||||
#ifdef __APPLE__
|
||||
# define SG_GL_H <OpenGL/gl.h>
|
||||
# define SG_GLU_H <OpenGL/glu.h>
|
||||
# define SG_GLEXT_H <OpenGL/glext.h>
|
||||
# define SG_GLUT_H <GLUT/glut.h>
|
||||
#else
|
||||
# define SG_GL_H <GL/gl.h>
|
||||
# define SG_GLU_H <GL/glu.h>
|
||||
# define SG_GLEXT_H <GL/glext.h>
|
||||
# define SG_GLUT_H <GL/glut.h>
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// No user modifiable definitions beyond here.
|
||||
//
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started February 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -25,7 +25,9 @@ typedef enum {
|
||||
SG_NETWORK = 0x00004000,
|
||||
SG_ATC = 0x00008000,
|
||||
SG_NASAL = 0x00010000,
|
||||
SG_UNDEFD = 0x00020000, // For range checking
|
||||
SG_INSTR = 0x00020000,
|
||||
SG_SYSTEMS = 0x00040000,
|
||||
SG_UNDEFD = 0x00080000, // For range checking
|
||||
|
||||
SG_ALL = 0xFFFFFFFF
|
||||
} sgDebugClass;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started March 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// All the core code underneath this is written by Durk Talsma. See
|
||||
// the headers of all the other individual files for details.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
@@ -48,7 +48,7 @@
|
||||
/** Ephemeris class
|
||||
*
|
||||
* Written by Durk Talsma <d.talsma@direct.a2000.nl> and Curtis Olson
|
||||
* <curt@flightgear.org>
|
||||
* <http://www.flightgear.org/~curt>
|
||||
*
|
||||
* Introduction
|
||||
*
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started March 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started March 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// Shamelessly adapted from plib (plib.sourceforge.net) January 2001
|
||||
//
|
||||
// Original version Copyright (C) 2000 the plib team
|
||||
// Local changes Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Local changes Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// Shamelessly adapted from plib January 2001
|
||||
//
|
||||
// Original version Copyright (C) 2000 the plib team
|
||||
// Local changes Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Local changes Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started January 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started January 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
// Modified by Bernie Bright <bbright@bigpond.net.au>, May 2002.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started November 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started November 2001.
|
||||
//
|
||||
// Copyright (C) 2001 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started July 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started July 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started April 1998.
|
||||
//
|
||||
// Copyright (C) 1998 Curtis L. Olson - curt@me.umn.edu
|
||||
// Copyright (C) 1998 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
// Written by Curtis Olson, started April 1998.
|
||||
//
|
||||
// Copyright (C) 1998 Curtis L. Olson - curt@me.umn.edu
|
||||
// Copyright (C) 1998 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started September 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started September 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started September 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Adapted from algebra3 by Jean-Francois Doue, started October 1998.
|
||||
*/
|
||||
|
||||
// Copyright (C) 1998 Curtis L. Olson - curt@me.umn.edu
|
||||
// Copyright (C) 1998 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started June 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started June 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -108,7 +108,7 @@ static double seaLevelRadius(double r, double z)
|
||||
// starts making very poor guesses as to latitude. As altitude
|
||||
// approaches infinity, it should be guessing with geocentric
|
||||
// coordinates, not "local geodetic up" ones.
|
||||
void sgCartToGeod(double* xyz, double* lat, double* lon, double* alt)
|
||||
void sgCartToGeod(const double* xyz, double* lat, double* lon, double* alt)
|
||||
{
|
||||
// The error is expressed as a radian angle, and we want accuracy
|
||||
// to 1 part in 2^50 (an IEEE double has between 51 and 52
|
||||
|
||||
@@ -42,7 +42,7 @@ void sgGeodToGeoc(double lat_geod, double alt,
|
||||
* @param lon (out) Longitude, in radians
|
||||
* @param alt (out) Altitude, in meters above the WGS84 ellipsoid
|
||||
*/
|
||||
void sgCartToGeod(double* xyz, double* lat, double* lon, double* alt);
|
||||
void sgCartToGeod(const double* xyz, double* lat, double* lon, double* alt);
|
||||
|
||||
/**
|
||||
* Convert a cartesian point to a geodetic lat/lon/altitude.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started July 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started July 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started March 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started December 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started December 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Written by Curtis L. Olson, started April 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
// Written by Curtis L. Olson, started April 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started March 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started March 1999.
|
||||
//
|
||||
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -561,7 +561,7 @@ public:
|
||||
* Property value types.
|
||||
*/
|
||||
enum Type {
|
||||
NONE,
|
||||
NONE = 0,
|
||||
ALIAS,
|
||||
BOOL,
|
||||
INT,
|
||||
|
||||
@@ -322,6 +322,23 @@ readProperties (const string &file, SGPropertyNode * start_node)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Read properties from an in-memory buffer.
|
||||
*
|
||||
* @param buf A character buffer containing the xml data.
|
||||
* @param size The size/length of the buffer in bytes
|
||||
* @param start_node The root node for reading properties.
|
||||
* @return true if the read succeeded, false otherwise.
|
||||
*/
|
||||
void readProperties (const char *buf, const int size,
|
||||
SGPropertyNode * start_node)
|
||||
{
|
||||
PropsVisitor visitor(start_node, "");
|
||||
readXML(buf, size, visitor);
|
||||
if (visitor.hasException())
|
||||
throw visitor.getException();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Property list writer.
|
||||
@@ -466,7 +483,7 @@ writeNode (ostream &output, const SGPropertyNode * node,
|
||||
}
|
||||
|
||||
// If there are children, write them next.
|
||||
if (nChildren > 0 || node->isAlias()) {
|
||||
if (nChildren > 0) {
|
||||
doIndent(output, indent);
|
||||
output << '<' << name;
|
||||
writeAtts(output, node);
|
||||
@@ -563,6 +580,8 @@ copyProperties (const SGPropertyNode *in, SGPropertyNode *out)
|
||||
retval = false;
|
||||
break;
|
||||
default:
|
||||
if (in->isAlias())
|
||||
break;
|
||||
string message = "Unknown internal SGPropertyNode type";
|
||||
message += in->getType();
|
||||
throw sg_error(message, "SimGear Property Reader");
|
||||
|
||||
@@ -41,6 +41,13 @@ void readProperties (istream &input, SGPropertyNode * start_node,
|
||||
void readProperties (const string &file, SGPropertyNode * start_node);
|
||||
|
||||
|
||||
/**
|
||||
* Read properties from an in-memory buffer.
|
||||
*/
|
||||
void readProperties (const char *buf, const int size,
|
||||
SGPropertyNode * start_node);
|
||||
|
||||
|
||||
/**
|
||||
* Write properties to an XML output stream.
|
||||
*/
|
||||
|
||||
@@ -29,12 +29,13 @@
|
||||
|
||||
// Constructor
|
||||
SGWayPoint::SGWayPoint( const double lon, const double lat, const double alt,
|
||||
const modetype m, const string s ) {
|
||||
const modetype m, const string s, const string n ) {
|
||||
target_lon = lon;
|
||||
target_lat = lat;
|
||||
target_alt = alt;
|
||||
mode = m;
|
||||
id = s;
|
||||
name = n;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ private:
|
||||
double distance;
|
||||
|
||||
string id;
|
||||
string name;
|
||||
|
||||
public:
|
||||
|
||||
@@ -86,10 +87,11 @@ public:
|
||||
* @param alt target altitude
|
||||
* @param mode type of coordinates/math to use
|
||||
* @param s waypoint identifier
|
||||
* @param n waypoint name
|
||||
*/
|
||||
SGWayPoint( const double lon = 0.0, const double lat = 0.0,
|
||||
const double alt = 0.0, const modetype m = WGS84,
|
||||
const string s = "" );
|
||||
const string s = "", const string n = "" );
|
||||
|
||||
/** Destructor */
|
||||
~SGWayPoint();
|
||||
@@ -153,6 +155,9 @@ public:
|
||||
/** @return waypoint id */
|
||||
inline string get_id() const { return id; }
|
||||
|
||||
/** @return waypoint name */
|
||||
inline string get_name() const { return name; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started May 1998.
|
||||
//
|
||||
// Copyright (C) 1998 - 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1998 - 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// Written by Curtis Olson, started May 1998.
|
||||
// Overhauled by David Megginson, December 2001
|
||||
//
|
||||
// Copyright (C) 1998 - 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1998 - 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started May 1998.
|
||||
//
|
||||
// Copyright (C) 1998 Curtis L. Olson - curt@me.umn.edu
|
||||
// Copyright (C) 1998 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
@@ -33,12 +33,12 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/structure/exception.hxx>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include <string.h>
|
||||
#include STL_STRING
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started May 1998.
|
||||
//
|
||||
// Copyright (C) 1998 - 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1998 - 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by David Megginson, started May 1998.
|
||||
//
|
||||
// Copyright (C) 1998 - 2003 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1998 - 2003 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by David Megginson, December 2001
|
||||
//
|
||||
// Copyright (C) 1998 - 2003 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1998 - 2003 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Written by Jim Wilson, David Megginson, started April 2002.
|
||||
// Based largely on code by Curtis Olson and Norman Vine.
|
||||
//
|
||||
// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2002 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <string.h> // for strcmp()
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#include <plib/sg.h>
|
||||
#include <plib/ssg.h>
|
||||
@@ -26,8 +27,9 @@
|
||||
#include "model.hxx"
|
||||
|
||||
SG_USING_STD(vector);
|
||||
SG_USING_STD(set);
|
||||
|
||||
|
||||
bool sgUseDisplayList = true;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Global state
|
||||
@@ -122,8 +124,10 @@ sgMakeAnimation( ssgBranch * model,
|
||||
vector<SGPropertyNode_ptr> &name_nodes,
|
||||
SGPropertyNode *prop_root,
|
||||
SGPropertyNode_ptr node,
|
||||
double sim_time_sec )
|
||||
double sim_time_sec,
|
||||
set<ssgBranch *> &ignore_branches )
|
||||
{
|
||||
bool ignore = false;
|
||||
SGAnimation * animation = 0;
|
||||
const char * type = node->getStringValue("type", "none");
|
||||
if (!strcmp("none", type)) {
|
||||
@@ -152,6 +156,7 @@ sgMakeAnimation( ssgBranch * model,
|
||||
animation = new SGTexMultipleAnimation(prop_root, node);
|
||||
} else if (!strcmp("blend", type)) {
|
||||
animation = new SGBlendAnimation(prop_root, node);
|
||||
ignore = true;
|
||||
} else if (!strcmp("alpha-test", type)) {
|
||||
animation = new SGAlphaTestAnimation(node);
|
||||
} else if (!strcmp("flash", type)) {
|
||||
@@ -204,10 +209,26 @@ sgMakeAnimation( ssgBranch * model,
|
||||
branch->setUserData(animation);
|
||||
branch->setTravCallback(SSG_CALLBACK_PRETRAV, animation_callback);
|
||||
branch->setTravCallback(SSG_CALLBACK_POSTTRAV, restore_callback);
|
||||
if ( ignore ) {
|
||||
ignore_branches.insert( branch );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void makeDList( ssgBranch *b, const set<ssgBranch *> &ignore )
|
||||
{
|
||||
int nb = b->getNumKids();
|
||||
for (int i = 0; i<nb; i++) {
|
||||
ssgEntity *e = b->getKid(i);
|
||||
if (e->isAKindOf(ssgTypeLeaf())) {
|
||||
((ssgLeaf*)e)->makeDList();
|
||||
} else if (e->isAKindOf(ssgTypeBranch()) && ignore.find((ssgBranch *)e) == ignore.end()) {
|
||||
makeDList( (ssgBranch*)e, ignore );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -257,7 +278,6 @@ sgLoad3DModel( const string &fg_root, const string &path,
|
||||
if (model == 0)
|
||||
throw sg_exception("Failed to load 3D model");
|
||||
}
|
||||
|
||||
// Set up the alignment node
|
||||
ssgTransform * alignmainmodel = new ssgTransform;
|
||||
if ( load_panel == 0 )
|
||||
@@ -275,18 +295,6 @@ sgLoad3DModel( const string &fg_root, const string &path,
|
||||
|
||||
unsigned int i;
|
||||
|
||||
if ( load_panel ) {
|
||||
// Load panels
|
||||
vector<SGPropertyNode_ptr> panel_nodes = props.getChildren("panel");
|
||||
for (i = 0; i < panel_nodes.size(); i++) {
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, "Loading a panel");
|
||||
ssgEntity * panel = load_panel(panel_nodes[i]);
|
||||
if (panel_nodes[i]->hasValue("name"))
|
||||
panel->setName((char *)panel_nodes[i]->getStringValue("name"));
|
||||
model->addKid(panel);
|
||||
}
|
||||
}
|
||||
|
||||
// Load sub-models
|
||||
vector<SGPropertyNode_ptr> model_nodes = props.getChildren("model");
|
||||
for (i = 0; i < model_nodes.size(); i++) {
|
||||
@@ -310,13 +318,32 @@ sgLoad3DModel( const string &fg_root, const string &path,
|
||||
}
|
||||
|
||||
// Load animations
|
||||
set<ssgBranch *> ignore_branches;
|
||||
vector<SGPropertyNode_ptr> animation_nodes = props.getChildren("animation");
|
||||
for (i = 0; i < animation_nodes.size(); i++) {
|
||||
const char * name = animation_nodes[i]->getStringValue("name", 0);
|
||||
vector<SGPropertyNode_ptr> name_nodes =
|
||||
animation_nodes[i]->getChildren("object-name");
|
||||
sgMakeAnimation( model, name, name_nodes, prop_root, animation_nodes[i],
|
||||
sim_time_sec);
|
||||
sim_time_sec, ignore_branches);
|
||||
}
|
||||
|
||||
#if PLIB_VERSION > 183
|
||||
if ( model != 0 && sgUseDisplayList ) {
|
||||
makeDList( model, ignore_branches );
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( load_panel ) {
|
||||
// Load panels
|
||||
vector<SGPropertyNode_ptr> panel_nodes = props.getChildren("panel");
|
||||
for (i = 0; i < panel_nodes.size(); i++) {
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, "Loading a panel");
|
||||
ssgEntity * panel = load_panel(panel_nodes[i]);
|
||||
if (panel_nodes[i]->hasValue("name"))
|
||||
panel->setName((char *)panel_nodes[i]->getStringValue("name"));
|
||||
model->addKid(panel);
|
||||
}
|
||||
}
|
||||
|
||||
return alignmainmodel;
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
SG_USING_STD(vector);
|
||||
SG_USING_STD(set);
|
||||
|
||||
#include <plib/sg.h>
|
||||
#include <plib/ssg.h>
|
||||
@@ -63,7 +65,8 @@ sgMakeAnimation( ssgBranch * model,
|
||||
vector<SGPropertyNode_ptr> &name_nodes,
|
||||
SGPropertyNode *prop_root,
|
||||
SGPropertyNode_ptr node,
|
||||
double sim_time_sec );
|
||||
double sim_time_sec,
|
||||
set<ssgBranch *> &ignore_branches );
|
||||
|
||||
/**
|
||||
* Set the filter state on models
|
||||
@@ -71,4 +74,9 @@ sgMakeAnimation( ssgBranch * model,
|
||||
bool
|
||||
sgSetModelFilter( bool filter );
|
||||
|
||||
/**
|
||||
* Enable or disable Display list usage
|
||||
*/
|
||||
extern bool sgUseDisplayList;
|
||||
|
||||
#endif // __MODEL_HXX
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started June 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@@ -21,15 +21,13 @@
|
||||
// #include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#if defined (__APPLE__)
|
||||
#if defined (__APPLE__)
|
||||
// any C++ header file undefines isinf and isnan
|
||||
// so this should be included before <iostream>
|
||||
inline int (isinf)(double r) { return isinf(r); }
|
||||
inline int (isnan)(double r) { return isnan(r); }
|
||||
#endif
|
||||
|
||||
// #include STL_IOSTREAM
|
||||
|
||||
#include <plib/sg.h>
|
||||
#include <plib/ssg.h>
|
||||
|
||||
@@ -47,6 +45,14 @@ inline int (isnan)(double r) { return isnan(r); }
|
||||
#define isnan(x) _isnan(x)
|
||||
#endif
|
||||
|
||||
#if defined (__FreeBSD__)
|
||||
# if __FreeBSD_version < 500000
|
||||
extern "C" {
|
||||
inline int isnan(double r) { return !(r <= 0 || r >= 0); }
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
static ssgStateSelector *layer_states[SGCloudLayer::SG_MAX_CLOUD_COVERAGES];
|
||||
static bool state_initialized = false;
|
||||
@@ -191,9 +197,12 @@ generateNormalizationCubeMap()
|
||||
|
||||
// Constructor
|
||||
SGCloudLayer::SGCloudLayer( const string &tex_path ) :
|
||||
vertices(0),
|
||||
indices(0),
|
||||
layer_root(new ssgRoot),
|
||||
layer_transform(new ssgTransform),
|
||||
state_sel(0),
|
||||
cloud_alpha(1.0),
|
||||
texture_path(tex_path),
|
||||
layer_span(0.0),
|
||||
layer_asl(0.0),
|
||||
@@ -204,9 +213,7 @@ SGCloudLayer::SGCloudLayer( const string &tex_path ) :
|
||||
speed(0.0),
|
||||
direction(0.0),
|
||||
last_lon(0.0),
|
||||
last_lat(0.0),
|
||||
vertices(0),
|
||||
indices(0)
|
||||
last_lat(0.0)
|
||||
{
|
||||
cl[0] = cl[1] = cl[2] = cl[3] = NULL;
|
||||
vl[0] = vl[1] = vl[2] = vl[3] = NULL;
|
||||
@@ -489,7 +496,7 @@ SGCloudLayer::rebuild()
|
||||
cos( j * half_angle ),
|
||||
-sin( j * half_angle ) );
|
||||
sgVectorProductVec3( v1.normal, v1.tTangent, v1.sTangent );
|
||||
sgSetVec4( v1.color, 1.0f, 1.0f, 1.0f, (i == 0) ? 0.0f : 0.15f );
|
||||
sgSetVec4( v1.color, 1.0f, 1.0f, 1.0f, (i == 0) ? 0.0f : cloud_alpha * 0.15f );
|
||||
}
|
||||
}
|
||||
/*
|
||||
@@ -624,17 +631,33 @@ bool SGCloudLayer::repaint( sgVec3 fog_color ) {
|
||||
float *color;
|
||||
|
||||
for ( int i = 0; i < 4; i++ ) {
|
||||
for ( int j = 0; j < 10; ++j ) {
|
||||
color = cl[i]->get( j );
|
||||
color = cl[i]->get( 0 );
|
||||
sgCopyVec3( color, fog_color );
|
||||
color[3] = (i == 0) ? 0.0f : cloud_alpha * 0.15f;
|
||||
|
||||
for ( int j = 0; j < 4; ++j ) {
|
||||
color = cl[i]->get( (2*j) + 1 );
|
||||
sgCopyVec3( color, fog_color );
|
||||
color[3] =
|
||||
((j == 0) || (i == 3)) ?
|
||||
((j == 0) && (i == 3)) ? 0.0f : cloud_alpha * 0.15f : cloud_alpha;
|
||||
|
||||
color = cl[i]->get( (2*j) + 2 );
|
||||
sgCopyVec3( color, fog_color );
|
||||
color[3] =
|
||||
((j == 3) || (i == 0)) ?
|
||||
((j == 3) && (i == 0)) ? 0.0f : cloud_alpha * 0.15f : cloud_alpha;
|
||||
}
|
||||
|
||||
color = cl[i]->get( 9 );
|
||||
sgCopyVec3( color, fog_color );
|
||||
color[3] = (i == 3) ? 0.0f : cloud_alpha * 0.15f;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// reposition the cloud layer at the specified origin and orientation
|
||||
// lon specifies a rotation about the Z axis
|
||||
// lat specifies a rotation about the new Y axis
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Written by Curtis Olson, started June 2000.
|
||||
//
|
||||
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
@@ -143,6 +143,18 @@ public:
|
||||
/** get the cloud movement speed */
|
||||
inline float getSpeed() { return speed; }
|
||||
|
||||
/**
|
||||
* set the alpha component of the cloud base color. Normally this
|
||||
* should be 1.0, but you can set it anywhere in the range of 0.0
|
||||
* to 1.0 to fade a cloud layer in or out.
|
||||
* @param alpha cloud alpha value (0.0 to 1.0)
|
||||
*/
|
||||
inline void setAlpha( float alpha ) {
|
||||
if ( alpha < 0.0 ) { alpha = 0.0; }
|
||||
if ( alpha > 1.0 ) { alpha = 1.0; }
|
||||
cloud_alpha = alpha;
|
||||
}
|
||||
|
||||
/** build the cloud object */
|
||||
void rebuild();
|
||||
|
||||
@@ -191,6 +203,8 @@ private:
|
||||
ssgLeaf *layer[4];
|
||||
ssgStateSelector *state_sel;
|
||||
|
||||
float cloud_alpha; // 1.0 = drawn fully, 0.0 faded out completely
|
||||
|
||||
ssgColourArray *cl[4];
|
||||
ssgVertexArray *vl[4];
|
||||
ssgTexCoordArray *tl[4];
|
||||
|
||||
@@ -33,9 +33,12 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/glu.h>
|
||||
#include <plib/ul.h>
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GLU_H
|
||||
|
||||
#include "SkyCloud.hpp"
|
||||
#include "SkyRenderableInstance.hpp"
|
||||
#include "SkyContext.hpp"
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include "SkyUtil.hpp"
|
||||
#include "SkySingleton.hpp"
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/glu.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GLU_H
|
||||
|
||||
#include "glut_shapes.h"
|
||||
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include "vec4f.hpp"
|
||||
#include "SkyUtil.hpp"
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include "SkyMinMaxBox.hpp"
|
||||
#include "camutils.hpp"
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/glu.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GLU_H
|
||||
|
||||
#include "SkyUtil.hpp"
|
||||
#include "SkyCloud.hpp"
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include "SkyRenderableInstanceGroup.hpp"
|
||||
#include "SkySceneManager.hpp"
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#define __glext_h_
|
||||
#define __GLEXT_H_
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/glu.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GLU_H
|
||||
|
||||
#include "SkyTextureManager.hpp"
|
||||
#include "SkyContext.hpp"
|
||||
|
||||
@@ -48,10 +48,13 @@ OpenGL(TM) is a trademark of Silicon Graphics, Inc.
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include "glut_shapes.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <GL/glu.h>
|
||||
#include SG_GLU_H
|
||||
|
||||
|
||||
/* Some <math.h> files do not define M_PI... */
|
||||
@@ -509,7 +512,7 @@ static GLfloat idata[12][3] =
|
||||
{-Z, -X, 0}
|
||||
};
|
||||
|
||||
static int index[20][3] =
|
||||
static int iindex[20][3] =
|
||||
{
|
||||
{0, 4, 1},
|
||||
{0, 9, 4},
|
||||
@@ -539,7 +542,7 @@ icosahedron(GLenum shadeType)
|
||||
int i;
|
||||
|
||||
for (i = 19; i >= 0; i--) {
|
||||
drawtriangle(i, idata, index, shadeType);
|
||||
drawtriangle(i, idata, iindex, shadeType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Written by Curtis Olson, started December 1997.
|
||||
// SSG-ified by Curtis Olson, February 2000.
|
||||
//
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
@@ -33,7 +33,9 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include <plib/sg.h>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Written by Curtis Olson, started December 1997.
|
||||
// SSG-ified by Curtis Olson, February 2000.
|
||||
//
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Written by Curtis Olson, started December 1997.
|
||||
// SSG-ified by Curtis Olson, February 2000.
|
||||
//
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
@@ -171,34 +171,34 @@ bool SGSky::reposition( SGSkyState &st, double dt )
|
||||
void SGSky::preDraw( float alt, float fog_exp2_density ) {
|
||||
ssgCullAndDraw( pre_root );
|
||||
|
||||
// if we are closer than this to a cloud layer, don't draw clouds
|
||||
// if we are closer than this to a cloud layer, don't draw clouds
|
||||
static const float slop = 5.0;
|
||||
int i;
|
||||
|
||||
// check where we are relative to the cloud layers
|
||||
in_cloud = -1;
|
||||
for ( i = 0; i < (int)cloud_layers.size(); ++i ) {
|
||||
float asl = cloud_layers[i]->getElevation_m();
|
||||
float thickness = cloud_layers[i]->getThickness_m();
|
||||
float asl = cloud_layers[i]->getElevation_m();
|
||||
float thickness = cloud_layers[i]->getThickness_m();
|
||||
|
||||
if ( alt < asl - slop ) {
|
||||
// below cloud layer
|
||||
} else if ( alt < asl + thickness + slop ) {
|
||||
// in cloud layer
|
||||
if ( alt < asl - slop ) {
|
||||
// below cloud layer
|
||||
} else if ( alt < asl + thickness + slop ) {
|
||||
// in cloud layer
|
||||
|
||||
// bail now and don't draw any clouds
|
||||
in_cloud = i;
|
||||
} else {
|
||||
// above cloud layer
|
||||
}
|
||||
// bail now and don't draw any clouds
|
||||
in_cloud = i;
|
||||
} else {
|
||||
// above cloud layer
|
||||
}
|
||||
}
|
||||
|
||||
// determine rendering order
|
||||
cur_layer_pos = 0;
|
||||
while ( cur_layer_pos < (int)cloud_layers.size() &&
|
||||
alt > cloud_layers[cur_layer_pos]->getElevation_m())
|
||||
alt > cloud_layers[cur_layer_pos]->getElevation_m() )
|
||||
{
|
||||
++cur_layer_pos;
|
||||
++cur_layer_pos;
|
||||
}
|
||||
|
||||
// FIXME: This should not be needed, but at this time (08/15/2003)
|
||||
@@ -266,7 +266,10 @@ void SGSky::modify_vis( float alt, float time_factor ) {
|
||||
|
||||
double ratio = 1.0;
|
||||
|
||||
if ( alt < asl - transition ) {
|
||||
if ( cloud_layers[i]->getCoverage() == SGCloudLayer::SG_CLOUD_CLEAR ) {
|
||||
// less than 50% coverage -- assume we're in the clear for now
|
||||
ratio = 1.0;
|
||||
} else if ( alt < asl - transition ) {
|
||||
// below cloud layer
|
||||
ratio = 1.0;
|
||||
} else if ( alt < asl ) {
|
||||
@@ -283,9 +286,35 @@ void SGSky::modify_vis( float alt, float time_factor ) {
|
||||
ratio = 1.0;
|
||||
}
|
||||
|
||||
// accumulate effects from multiple cloud layers
|
||||
effvis *= ratio;
|
||||
if ( cloud_layers[i]->getCoverage() == SGCloudLayer::SG_CLOUD_CLEAR ) {
|
||||
// do nothing, clear layers aren't drawn, don't affect
|
||||
// visibility andn dont' need to be faded in or out.
|
||||
} else if ( (cloud_layers[i]->getCoverage() ==
|
||||
SGCloudLayer::SG_CLOUD_FEW)
|
||||
|| (cloud_layers[i]->getCoverage() ==
|
||||
SGCloudLayer::SG_CLOUD_SCATTERED) )
|
||||
{
|
||||
// set the alpha fade value for the cloud layer. For less
|
||||
// dense cloud layers we fade the layer to nothing as we
|
||||
// approach it because we stay clear visibility-wise as we
|
||||
// pass through it.
|
||||
float temp = ratio * 2.0;
|
||||
if ( temp > 1.0 ) { temp = 1.0; }
|
||||
cloud_layers[i]->setAlpha( temp );
|
||||
|
||||
// don't touch visibility
|
||||
} else {
|
||||
// maintain full alpha for denser cloud layer types.
|
||||
// Let's set the value explicitly in case someone changed
|
||||
// the layer type.
|
||||
cloud_layers[i]->setAlpha( 1.0 );
|
||||
|
||||
// lower visibility as we approach the cloud layer.
|
||||
// accumulate effects from multiple cloud layers
|
||||
effvis *= ratio;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if ( ratio < 1.0 ) {
|
||||
if ( ! in_puff ) {
|
||||
// calc chance of entering cloud puff
|
||||
@@ -342,12 +371,14 @@ void SGSky::modify_vis( float alt, float time_factor ) {
|
||||
in_puff = false;
|
||||
}
|
||||
}
|
||||
|
||||
// never let visibility drop below 25 meters
|
||||
if ( effvis <= 25.0 ) {
|
||||
effvis = 25.0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// never let visibility drop below 25 meters
|
||||
if ( effvis <= 25.0 ) {
|
||||
effvis = 25.0;
|
||||
}
|
||||
|
||||
} // for
|
||||
|
||||
effective_visibility = effvis;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Written by Curtis Olson, started December 1997.
|
||||
// SSG-ified by Curtis Olson, February 2000.
|
||||
//
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1997-2000 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started July 2001.
|
||||
//
|
||||
// Copyright (C) 2001 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started July 2001.
|
||||
//
|
||||
// Copyright (C) 2001 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started October 1997.
|
||||
//
|
||||
// Copyright (C) 1997 - 2003 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1997 - 2003 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started October 1997.
|
||||
//
|
||||
// Copyright (C) 1997 - 2003 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 1997 - 2003 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started October 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
@@ -177,7 +177,6 @@ bool sgGenTile( const string& path, SGBucket b,
|
||||
new ssgVtxTable ( GL_TRIANGLE_FAN, vl, nl, tl, cl );
|
||||
|
||||
leaf->setState( state );
|
||||
|
||||
geometry->addKid( leaf );
|
||||
|
||||
return true;
|
||||
@@ -448,7 +447,6 @@ bool sgBinObjLoad( const string& path, const bool is_base,
|
||||
nodes, normals, texcoords,
|
||||
tris_v[ind], tris_n[ind], tris_tc[ind],
|
||||
is_base, ground_lights );
|
||||
|
||||
if ( use_random_objects ) {
|
||||
SGMaterial *mat = matlib->find( tri_materials[ind] );
|
||||
if ( mat == NULL ) {
|
||||
@@ -467,7 +465,6 @@ bool sgBinObjLoad( const string& path, const bool is_base,
|
||||
nodes, normals, texcoords,
|
||||
strips_v[ind], strips_n[ind], strips_tc[ind],
|
||||
is_base, ground_lights );
|
||||
|
||||
if ( use_random_objects ) {
|
||||
SGMaterial *mat = matlib->find( strip_materials[ind] );
|
||||
if ( mat == NULL ) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started October 1997.
|
||||
//
|
||||
// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
|
||||
// Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started March 2002.
|
||||
//
|
||||
// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2002 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started March 2002.
|
||||
//
|
||||
// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2002 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Written by David Megginson, started December 2001.
|
||||
//
|
||||
// Copyright (C) 2001 - 2003 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2001 - 2003 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Written by David Megginson, started December 2001.
|
||||
//
|
||||
// Copyright (C) 2001 - 2003 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2001 - 2003 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Written by Curtis Olson, started December 2003.
|
||||
//
|
||||
// Copyright (C) 2003 Curtis L. Olson - curt@flightgear.org
|
||||
// Copyright (C) 2003 Curtis L. Olson - http://www.flightgear.org/~curt
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
#include <limits.h>
|
||||
#include <string.h> // memcpy()
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include "GLBitmaps.h"
|
||||
|
||||
|
||||
@@ -113,7 +113,11 @@ void *SGGetGLProcAddress(const char *func) {
|
||||
if (libHandle != NULL) {
|
||||
fptr = dlsym(libHandle, func);
|
||||
|
||||
#if defined (__FreeBSD__)
|
||||
const char *error = dlerror();
|
||||
#else
|
||||
char *error = dlerror();
|
||||
#endif
|
||||
if (error)
|
||||
SG_LOG(SG_GENERAL, SG_INFO, error);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef __SG_EXTENSIONS_HXX
|
||||
#define __SG_EXTENSIONS_HXX 1
|
||||
|
||||
#if defined(__CYGWIN__) /* && !defined(USING_X) */
|
||||
#if defined(__CYGWIN__) && !defined(WIN32) /* && !defined(USING_X) */
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
@@ -57,8 +57,7 @@ typedef struct {
|
||||
|
||||
typedef my_destination_mgr * my_dest_ptr;
|
||||
|
||||
/* Where should this go <simgear/screen/tr.h> ?? */
|
||||
extern void trRenderFrame( void );
|
||||
void (*jpgRenderFrame)(void) = NULL;
|
||||
|
||||
trJpgFactory::trJpgFactory() {
|
||||
imageWidth = imageHeight = 0;
|
||||
@@ -233,7 +232,7 @@ int trJpgFactory::compress()
|
||||
|
||||
int trJpgFactory::render()
|
||||
{
|
||||
if( !tr ) {
|
||||
if( !tr || !jpgRenderFrame ) {
|
||||
printf("!! NO tr !!\n trJpgFactory::render()\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -253,7 +252,7 @@ int trJpgFactory::render()
|
||||
|
||||
// printf("\ttrBeginTile(tr)\n");
|
||||
trBeginTile(tr);
|
||||
trRenderFrame();
|
||||
jpgRenderFrame();
|
||||
trEndTile(tr);
|
||||
|
||||
/* just to be safe */
|
||||
|
||||
@@ -36,6 +36,9 @@ extern "C" {
|
||||
|
||||
#include <simgear/screen/tr.h>
|
||||
|
||||
|
||||
extern void (*jpgRenderFrame)(void);
|
||||
|
||||
/* should look at how VNC does this */
|
||||
class trJpgFactory {
|
||||
private:
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include SG_GL_H
|
||||
|
||||
#include "screen-dump.hxx"
|
||||
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include SG_GL_H
|
||||
|
||||
/**
|
||||
* Dump the screen buffer to a ppm file.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user