glPopMatrix();
}
-void Track3D::render_route(int route) const
+void Track3D::render_path(int path) const
{
prepare_render(true);
varray.apply();
- if(route>=0 && static_cast<unsigned>(route)<route_seq.size())
- glDrawElements(GL_QUADS, route_seq[route].size(), GL_UNSIGNED_INT, &route_seq[route][0]);
+ if(path>=0 && static_cast<unsigned>(path)<path_seq.size())
+ glDrawElements(GL_QUADS, path_seq[path].size(), GL_UNSIGNED_INT, &path_seq[path][0]);
else
{
- for(unsigned i=0; i<route_seq.size(); ++i)
- glDrawElements(GL_QUADS, route_seq[i].size(), GL_UNSIGNED_INT, &route_seq[i][0]);
+ for(unsigned i=0; i<path_seq.size(); ++i)
+ glDrawElements(GL_QUADS, path_seq[i].size(), GL_UNSIGNED_INT, &path_seq[i][0]);
}
glPopMatrix();
base_seq.clear();
rail_seq.clear();
- route_seq.clear();
- route_seq.resize(track.get_type().get_n_routes());
+ path_seq.clear();
+ path_seq.resize(track.get_type().get_n_paths());
const vector<TrackPart> &parts = track.get_type().get_parts();
unsigned index = 0;
rail_seq.push_back(base_index+(i+1)*psize+1+j*2);
rail_seq.push_back(base_index+i*psize+1+j*2);
}
- route_seq[part.route].push_back(base_index+i*psize+18);
- route_seq[part.route].push_back(base_index+(i+1)*psize+18);
- route_seq[part.route].push_back(base_index+(i+1)*psize+19);
- route_seq[part.route].push_back(base_index+i*psize+19);
+ path_seq[part.path].push_back(base_index+i*psize+18);
+ path_seq[part.path].push_back(base_index+(i+1)*psize+18);
+ path_seq[part.path].push_back(base_index+(i+1)*psize+19);
+ path_seq[part.path].push_back(base_index+i*psize+19);
}
base_index += (nsegs+1)*psize;