Frederic: Add display list support without changing plib.
This commit is contained in:
parent
e6c6c666c2
commit
f61014c2ea
2 changed files with 20 additions and 0 deletions
|
@ -982,6 +982,19 @@ FGTileEntry::load( const string_list &path_list, bool is_base )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FGTileEntry::makeDList( ssgBranch *b )
|
||||||
|
{
|
||||||
|
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())) {
|
||||||
|
makeDList( (ssgBranch*)e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch,
|
FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch,
|
||||||
|
@ -992,6 +1005,8 @@ FGTileEntry::add_ssg_nodes( ssgBranch *terrain_branch,
|
||||||
{
|
{
|
||||||
// bump up the ref count so we can remove this later without
|
// bump up the ref count so we can remove this later without
|
||||||
// having ssg try to free the memory.
|
// having ssg try to free the memory.
|
||||||
|
makeDList( terra_transform );
|
||||||
|
|
||||||
terra_transform->ref();
|
terra_transform->ref();
|
||||||
terrain_branch->addKid( terra_transform );
|
terrain_branch->addKid( terra_transform );
|
||||||
|
|
||||||
|
|
|
@ -259,6 +259,11 @@ public:
|
||||||
*/
|
*/
|
||||||
inline SGBucket get_tile_bucket() const { return tile_bucket; }
|
inline SGBucket get_tile_bucket() const { return tile_bucket; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply ssgLeaf::makeDList to all leaf of a branch
|
||||||
|
*/
|
||||||
|
void makeDList( ssgBranch *b );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add terrain mesh and ground lighting to scene graph.
|
* Add terrain mesh and ground lighting to scene graph.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue