]> git.tdb.fi Git - libs/gl.git/commitdiff
Add debug names to things in viewer
authorMikko Rasa <tdb@tdb.fi>
Wed, 20 Oct 2021 13:02:05 +0000 (16:02 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 20 Oct 2021 13:02:05 +0000 (16:02 +0300)
tools/viewer.cpp

index 666372c3e6bbcdf3de0c5c3ed37a83e9e91cc009..fde5b8d4e757d1defdf37d7149bf2d7776387769 100644 (file)
@@ -204,6 +204,7 @@ Viewer::Viewer(int argc, char **argv):
        {
                GL::SequenceTemplate *tmpl = load<GL::SequenceTemplate>(opts.renderable_name);
                GL::SequenceBuilder bld(*tmpl);
+               bld.set_debug_name(FS::basename(opts.renderable_name));
                sequence = bld.build(view);
        }
        else
@@ -229,12 +230,14 @@ Viewer::Viewer(int argc, char **argv):
        light.set_direction(GL::Vector3(0, 0, -1));
        lighting.attach(light);
 
+       camera.set_debug_name("Camera");
        camera.set_up_direction(GL::Vector3(0, 0, 1));
        update_camera();
 
        if(!sequence)
        {
                sequence = new GL::Sequence();
+               sequence->set_debug_name("Sequence");
                GL::Sequence::Step &step = sequence->add_step(0, *renderable);
                step.set_lighting(&lighting);
                step.set_depth_test(GL::LEQUAL);