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);
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);
}