1
0
Fork 0
Commit graph

52 commits

Author SHA1 Message Date
curt
11a561872a Fixes so that the sim can start out at an airport below sea level. 1999-01-27 04:49:48 +00:00
curt
f450f4a9af Converted "class fgVIEW" to "class FGView" and updated to make data
members private and make required accessor functions.
1998-12-09 18:50:12 +00:00
curt
1c789b7ab6 Turned "struct fgWEATHER" into "class FGWeather". 1998-12-06 13:51:20 +00:00
curt
71f334cc0d Renamed class fgFLIGHT to class FGState as per request by JSB. 1998-12-05 15:53:59 +00:00
curt
2d0e4dbacd Looking into a terrain intersection problem. 1998-12-05 14:20:21 +00:00
curt
de6e4747b1 Sun portability tweak. 1998-12-05 14:11:19 +00:00
curt
cfc9e51128 Actually set the current scenery elevation based on scenery intersection point
rather than calculating the intesection point and throwing it away.
1998-12-03 14:15:24 +00:00
curt
f7bdff08ce Converted fgFLIGHT to a class.
Tweaks for Sun Portability.
Tweaked current terrain elevation code as per NHV.
1998-12-03 01:18:16 +00:00
curt
be02039e9c minor tweaks. 1998-11-23 21:49:48 +00:00
curt
f8e4de2d13 Bernie Bright <bbright@c031.aone.net.au> writes:
I've made some changes to the Scenery handling.  Basically just tidy ups.
The main difference is in tile.[ch]xx where I've changed list<fgFRAGMENT> to
vector<fgFRAGMENT>.  Studying our usage patterns this seems reasonable.
Lists are good if you need to insert/delete elements randomly but we
don't do that.  All access seems to be sequential.  Two additional
benefits are smaller memory usage - each list element requires pointers
to the next and previous elements, and faster access - vector iterators
are smaller and faster than list iterators.  This should also help
Charlie Hotchkiss' problem when compiling with Borland and STLport.

./Lib/Bucket/bucketutils.hxx
  Convenience functions for fgBUCKET.

./Simulator/Scenery/tile.cxx
./Simulator/Scenery/tile.hxx
  Changed fragment list to a vector.
  Added some convenience member functions.

./Simulator/Scenery/tilecache.cxx
./Simulator/Scenery/tilecache.hxx
  use const fgBUCKET& instead of fgBUCKET* where appropriate.

./Simulator/Scenery/tilemgr.cxx
./Simulator/Scenery/tilemgr.hxx
  uses all the new convenience functions.
1998-11-09 23:40:46 +00:00
curt
c74350c4fe Converted to new logstream debugging facility. This allows release
builds with no messages at all (and no performance impact) by using
the -DFG_NDEBUG flag.
1998-11-06 21:17:31 +00:00
curt
7efee52485 Point3D tweaks. 1998-10-18 01:17:16 +00:00
curt
5b752bfb5f C++ ifying ... 1998-10-17 01:33:52 +00:00
curt
7e240adff1 Converted to Point3D class. 1998-10-16 00:51:46 +00:00
curt
f7e6fca7dd Tweaks and optimizations by Norman Vine. 1998-09-17 18:35:52 +00:00
curt
b4abef6ab8 cleaned up my fragment.num_faces hack :-) to use the STL (no need in
duplicating work.)
Tweaked fgTileMgrRender() do not calc tile matrix unless necessary.
removed some unneeded stuff from fgTileMgrCurElev()
1998-09-15 01:35:03 +00:00
curt
9e65cd11b0 minor tweaks. 1998-09-14 12:45:23 +00:00
curt
42728f52c2 /Simulator/Objects/fragment.hxx
Nested fgFACE inside fgFRAGMENT since its not used anywhere else.

./Simulator/Objects/material.cxx
./Simulator/Objects/material.hxx
  Made fgMATERIAL and fgMATERIAL_MGR bona fide classes with private
  data members - that should keep the rabble happy :)

./Simulator/Scenery/tilemgr.cxx
  In viewable() delay evaluation of eye[0] and eye[1] in until they're
  actually needed.
  Change to fgTileMgrRender() to call fgMATERIAL_MGR::render_fragments()
  method.

./Include/fg_stl_config.h
./Include/auto_ptr.hxx
  Added support for g++ 2.7.
  Further changes to other files are forthcoming.

Brief summary of changes required for g++ 2.7.
  operator->() not supported by iterators: use (*i).x instead of i->x
  default template arguments not supported,
  <functional> doesn't have mem_fun_ref() needed by callbacks.
  some std include files have different names.
  template member functions not supported.
1998-09-10 19:07:09 +00:00
curt
e641ccb51d Tweaks to loop constructs with STL usage. 1998-09-09 20:58:09 +00:00
curt
780814812a Optimization by Norman Vine. 1998-09-08 15:05:10 +00:00
curt
aa408d2829 material.cxx material.hxx obj.cxx obj.hxx texload.c texload.h moved to
../Objects
1998-08-25 16:52:38 +00:00
curt
aaa7174002 Tweaks ... 1998-08-24 20:11:39 +00:00
curt
e33dbca814 Attempting to iron out seg faults and crashes.
Did some shuffling to fix a initialization order problem between view
position, scenery elevation.
1998-08-22 14:49:55 +00:00
curt
5f1fd50f6a Used a forward declaration of classes fgTILE and fgMATERIAL to eliminate
the need for "void" pointers and casts.
Quick hack to count the number of scenery polygons that are being drawn.
1998-08-20 15:12:03 +00:00
curt
d212b2d459 material.cxx: don't load textures if they are disabled
obj.cxx: optimizations from Norman Vine
tile.cxx: minor tweaks
tile.hxx: addition of num_faces
tilemgr.cxx: minor tweaks
1998-08-12 21:13:03 +00:00
curt
a7cf4f0a53 material.cxx: whups, double method declaration with no definition.
obj.cxx: tweaks to avoid errors in SGI's CC.
tile.cxx: optimizations by Norman Vine.
tilemgr.cxx: optimizations by Norman Vine.
1998-07-24 21:42:06 +00:00
curt
adee4bc151 Added far clip plane to fragment clipping calculations and tie this to
weather->visibility.  This way you can increase framerates by increasing
for and lowering visibility.
1998-07-20 12:51:26 +00:00
curt
4abe562805 Wrote access functions for current fgOPTIONS. 1998-07-13 21:00:09 +00:00
curt
262b2f0607 Added ground collision detection. This involved:
- saving the entire vertex list for each tile with the tile records.
- saving the face list for each fragment with the fragment records.
- code to intersect the current vertical line with the proper face in
  an efficient manner as possible.
Fixed a bug where the tiles weren't being shifted to "near" (0,0,0)
1998-07-12 03:18:27 +00:00
curt
a0f58259dd Fix GL_MODULATE vs. GL_DECAL problem introduced by splash screen.
polare3d.h renamed to polar3d.hxx
fg{Cartesian,Polar}Point3d consolodated.
Added some initial support for calculating local current ground elevation.
1998-07-08 14:47:20 +00:00
curt
6d48ba08a0 Added automatic mipmap generation.
When rendering fragments, use saved model view matrix from associated tile
rather than recalculating it with push() translate() pop().
1998-07-04 00:54:28 +00:00
curt
be9d6ea4ea Check for GL_VERSION_1_1 or GL_EXT_texture_object to decide whether to use
"EXT" versions of texture management routines.
1998-06-27 16:54:59 +00:00
curt
24c78e8146 Load and manage multiple textures defined in the Materials library.
Boost max material fagments for each material property to 800.
Multiple texture support when rendering.
1998-06-17 21:36:39 +00:00
curt
a6c7336cad Working first pass at material proporty sorting. 1998-06-08 17:57:54 +00:00
curt
d0b19c0ce1 I goofed on the log message in the last commit ... now fixed. 1998-06-06 01:09:31 +00:00
curt
0a840e1dbd Increased per material fragment list size from 100 to 400. 1998-06-06 01:07:17 +00:00
curt
5c10725624 Working on sorting by, and rendering by material properties. 1998-06-05 22:39:53 +00:00
curt
eda1cfe31c No .h for STL includes.
Minor view culling optimizations.
1998-06-03 00:47:50 +00:00
curt
3615dd708a Incremental additions to material.cxx (not fully functional)
Tweaked vfc_ratio math to avoid divide by zero.
1998-06-01 17:56:20 +00:00
curt
922f9e9ba1 Implimented fragment level view frustum culling. 1998-05-24 02:49:09 +00:00
curt
a60f1d812d Added tile.cxx and tile.hxx.
Working on rewriting the tile management system so a tile is just a list
fragments, and the fragment record contains the display list for that fragment.
1998-05-23 14:09:20 +00:00
curt
70fae724a7 Moved global ref point and radius (bounding sphere info, and offset) to
data file rather than calculating it on the fly.
Fixed polygon winding problem in scenery generation stage rather than
compensating for it on the fly.
Made a fgTILECACHE class.
1998-05-20 20:53:53 +00:00
curt
e57fd21bd3 Frist pass at view frustum culling now operational. 1998-05-17 16:59:34 +00:00
curt
7f1d04962e Beginning to add support for view frustum culling.
Added some temporary code to calculate bouding radius, until the
  scenery generation tools and scenery can be updated.
1998-05-16 13:09:57 +00:00
curt
a205e76218 Fixed a glTexImage2D() usage bug where width and height were mis-swapped.
Added support for --tile-radius=n option.
1998-05-07 23:15:20 +00:00
curt
36ba635389 Added an option to control square tile radius. 1998-05-06 03:16:42 +00:00
curt
5a4b56c58e Playing around with texture coordinates. 1998-05-02 01:52:14 +00:00
curt
401b414feb Added a command line rendering option specify smooth/flat shading. 1998-04-30 12:35:26 +00:00
curt
ed0acbad5b Minor transformation adjustments to try to keep scenery tiles closer to
(0, 0, 0)  GLfloats run out of precision at the distances we need to model
the earth, but we can do a bunch of pre-transformations using double math
and then cast to GLfloat once everything is close in where we have less
precision problems.
1998-04-27 03:30:13 +00:00
curt
0b782544a3 Edited cvs log messages in source files ... bad bad bad! 1998-04-25 22:06:24 +00:00