using namespace R2C2;
using namespace Msp;
-Application::RegApp<Designer> Designer::reg;
-
Designer::Designer(int argc, char **argv):
window(1280, 960),
ui_res("r2c2.res"),
main_view = new View3D(*layout_3d, window.get_width(), window.get_height());
GL::Pipeline *pipeline = &main_view->get_pipeline();
- GL::PipelinePass *pass = &pipeline->add_pass("unlit");
- pass->depth_test = &GL::DepthTest::lequal();
- pass->blend = &GL::Blend::alpha();
+ GL::Pipeline::Pass *pass = &pipeline->add_pass("unlit");
+ pass->set_depth_test(&GL::DepthTest::lequal());
+ pass->set_blend(&GL::Blend::alpha());
pass = &pipeline->add_pass("blended");
- pass->lighting = &layout_3d->get_lighting();
- pass->depth_test = &GL::DepthTest::lequal();
- pass->blend = &GL::Blend::alpha();
+ pass->set_lighting(&layout_3d->get_lighting());
+ pass->set_depth_test(&GL::DepthTest::lequal());
+ pass->set_blend(&GL::Blend::alpha());
pass = &pipeline->add_pass("overlay");
- pass->blend = &GL::Blend::alpha();
+ pass->set_blend(&GL::Blend::alpha());
if(base_object)
pipeline->add_renderable(*base_object);
{
cur_route->add_tracks(selection.get_tracks());
}
- catch(const Exception &e)
+ catch(const exception &e)
{
lbl_status->set_text(e.what());
}
{
cur_zone->add_tracks(selection.get_tracks());
}
- catch(const Exception &e)
+ catch(const exception &e)
{
lbl_status->set_text(e.what());
}
measure.render();
}
- GL::matrix_mode(GL::PROJECTION);
- GL::load_identity();
- GL::ortho_bottomleft(window.get_width(), window.get_height());
- GL::matrix_mode(GL::MODELVIEW);
- GL::load_identity();
-
- GL::Bind bind_blend(GL::Blend::alpha());
root.render();
- // XXX Should fix GLtk so these would not be needed
- GL::Texture::unbind();
+ // XXX Should fix GLtk so this would not be needed
glColor3f(1.0, 1.0, 1.0);
}
if(unsigned sid = track.get_track().get_sensor_id())
{
overlay->add_graphic(track, "sensor");
- overlay->set_label(track, lexical_cast(sid));
+ overlay->set_label(track, lexical_cast<string>(sid));
}
else if(unsigned tid = track.get_track().get_turnout_id())
{
if(tid<0x800)
{
overlay->add_graphic(track, "turnout");
- overlay->set_label(track, lexical_cast(tid));
+ overlay->set_label(track, lexical_cast<string>(tid));
}
}
}