X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fengineer.cpp;h=5cf22ba0f2f9c8390f557a26fb000bd1f5a6c23d;hb=f409cd39a687900724d987c9db629cbff0dd49be;hp=59aaeeca9f9e3aef5677ccc5196c7a0d6b57a1a1;hpb=fcaa883538f98bac71ba1a90f98950bb2aa08d88;p=r2c2.git diff --git a/source/engineer/engineer.cpp b/source/engineer/engineer.cpp index 59aaeec..5cf22ba 100644 --- a/source/engineer/engineer.cpp +++ b/source/engineer/engineer.cpp @@ -97,14 +97,20 @@ Engineer::Engineer(int argc, char **argv): DataFile::load(arrow_mesh, "arrow.mesh"); pipeline.set_camera(&camera); - pipeline.add_renderable(layout_3d.get_scene()); + pipeline.add_renderable_for_pass(layout_3d.get_scene(), 0); + pipeline.add_renderable_for_pass(layout_3d.get_path_scene(), "unlit"); - light.set_position(0, -0.259, 0.966, 0); + light.set_position(GL::Vector4(0, -0.259, 0.966, 0)); + light.set_diffuse(GL::Color(0.9)); + lighting.set_ambient(GL::Color(0.4)); lighting.attach(0, light); - GL::PipelinePass &pass = pipeline.add_pass(0); - pass.depth_test = &GL::DepthTest::lequal(); - pass.lighting = &lighting; + GL::PipelinePass *pass = &pipeline.add_pass(0); + pass->depth_test = &GL::DepthTest::lequal(); + pass->lighting = &lighting; + + pass = &pipeline.add_pass("unlit"); + pass->depth_test = &GL::DepthTest::lequal(); view_all(); @@ -192,10 +198,6 @@ void Engineer::tick() GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT); pipeline.render_all(); - { - GL::Bind depth(GL::DepthTest::lequal()); - layout_3d.get_path_scene().render(); - } { GL::Bind blend(GL::Blend::alpha()); overlay->render(0);