point_list normals; normals.clear();
point_list texcoords; texcoords.clear();
int_list vertex_index; vertex_index.clear();
+ int_list normal_index; normal_index.clear();
int_list tex_index; tex_index.clear();
nodes.push_back( Point3D( -offset + i, 0, 0.25 ) );
nodes.push_back( Point3D( -offset + i, 0, 1.25 ) );
nodes.push_back( Point3D( -offset + i + 1, 0, 1.25 ) );
- normals.push_back( Point3D( 0, -1, 0 ) );
- normals.push_back( Point3D( 0, -1, 0 ) );
- normals.push_back( Point3D( 0, -1, 0 ) );
normals.push_back( Point3D( 0, -1, 0 ) );
texcoords.push_back( Point3D( 0, 0, 0 ) );
vertex_index.push_back( 2 );
vertex_index.push_back( 3 );
+ normal_index.push_back( 0 );
+ normal_index.push_back( 0 );
+ normal_index.push_back( 0 );
+ normal_index.push_back( 0 );
+
tex_index.push_back( 0 );
tex_index.push_back( 1 );
tex_index.push_back( 2 );
ssgLeaf *leaf = gen_leaf( path, GL_TRIANGLE_STRIP, material,
nodes, normals, texcoords,
- vertex_index, tex_index,
+ vertex_index, normal_index, tex_index,
false, NULL );
object->addKid( leaf );
point_list normals; normals.clear();
point_list texcoords; texcoords.clear();
int_list vertex_index; vertex_index.clear();
+ int_list normal_index; normal_index.clear();
int_list tex_index; tex_index.clear();
nodes.push_back( Point3D( -width, 0, 0.25 ) );
nodes.push_back( Point3D( -width, 0, 1.25 ) );
nodes.push_back( Point3D( width + 1, 0, 1.25 ) );
- normals.push_back( Point3D( 0, -1, 0 ) );
- normals.push_back( Point3D( 0, -1, 0 ) );
- normals.push_back( Point3D( 0, -1, 0 ) );
normals.push_back( Point3D( 0, -1, 0 ) );
texcoords.push_back( Point3D( 0, 0, 0 ) );
vertex_index.push_back( 2 );
vertex_index.push_back( 3 );
+ normal_index.push_back( 0 );
+ normal_index.push_back( 0 );
+ normal_index.push_back( 0 );
+ normal_index.push_back( 0 );
+
tex_index.push_back( 0 );
tex_index.push_back( 1 );
tex_index.push_back( 2 );
ssgLeaf *leaf = gen_leaf( path, GL_TRIANGLE_STRIP, material,
nodes, normals, texcoords,
- vertex_index, tex_index,
+ vertex_index, normal_index, tex_index,
false, NULL );
object->addKid( leaf );