]> git.mxchange.org Git - flightgear.git/commit
Modifed random-object code for more memory efficiency:
authordavid <david>
Thu, 18 Jul 2002 01:04:08 +0000 (01:04 +0000)
committerdavid <david>
Thu, 18 Jul 2002 01:04:08 +0000 (01:04 +0000)
commitf7a17c90205a0da0cac6d5f57a3cf8af7b0cb87f
tree83452ab45259989ec6398f9dbe8034931488dc74
parentcc8567ad63f7d3eb86c7ec4b60ba41b57afc6fbd
Modifed random-object code for more memory efficiency:

1. Only one copy of each object (and its texture) is stored in memory,
   no matter how many materials use it.

2. Random objects are added to a triangle only when the objects are in
   range, and they are deleted as soon as the objects are out of
   range.  That way, only a relatively small number of ssg nodes are
   used at any one time.

This patch seems to eliminate freezes when tiles are freed.  There are
occasional stutters at extremely high speeds (i.e. over 3,000kt), but
it seems smooth enough for normal aviation speeds.
src/Objects/newmat.cxx
src/Objects/obj.cxx