Fixed a couple small bugs with fragment creation in on-the-fly generated
tiles.
This commit is contained in:
parent
c3753bf620
commit
0925492e4c
1 changed files with 5 additions and 4 deletions
|
@ -150,8 +150,8 @@ ssgBranch *fgGenTile( const string& path, FGTileEntry *t) {
|
||||||
// set the texture width and height values for this
|
// set the texture width and height values for this
|
||||||
// material
|
// material
|
||||||
FGMaterial m = fragment.material_ptr->get_m();
|
FGMaterial m = fragment.material_ptr->get_m();
|
||||||
double tex_width = m.get_xsize();
|
// double tex_width = m.get_xsize();
|
||||||
double tex_height = m.get_ysize();
|
// double tex_height = m.get_ysize();
|
||||||
|
|
||||||
// set ssgState
|
// set ssgState
|
||||||
state = fragment.material_ptr->get_state();
|
state = fragment.material_ptr->get_state();
|
||||||
|
@ -182,6 +182,7 @@ ssgBranch *fgGenTile( const string& path, FGTileEntry *t) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Point3D cart[4], rel[4];
|
Point3D cart[4], rel[4];
|
||||||
|
t->nodes.clear();
|
||||||
for ( int i = 0; i < 4; ++i ) {
|
for ( int i = 0; i < 4; ++i ) {
|
||||||
cart[i] = fgGeodToCart(rad[i]);
|
cart[i] = fgGeodToCart(rad[i]);
|
||||||
rel[i] = cart[i] - center;
|
rel[i] = cart[i] - center;
|
||||||
|
@ -213,8 +214,8 @@ ssgBranch *fgGenTile( const string& path, FGTileEntry *t) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build flight gear structure
|
// Build flight gear structure
|
||||||
fragment.add_face(1, 2, 3);
|
fragment.add_face(0, 1, 2);
|
||||||
fragment.add_face(1, 3, 4);
|
fragment.add_face(0, 2, 3);
|
||||||
t->fragment_list.push_back(fragment);
|
t->fragment_list.push_back(fragment);
|
||||||
|
|
||||||
// Build ssg structure
|
// Build ssg structure
|
||||||
|
|
Loading…
Add table
Reference in a new issue