]> git.tdb.fi Git - libs/gl.git/blobdiff - demos/desertpillars.cpp
Rename Pipeline to Sequence
[libs/gl.git] / demos / desertpillars.cpp
index 89a0fe51333c9d97cd31d22b54dd6a57bbc9c9a7..d741beea5390b0eb8307fdb78d401fb47c62b314 100644 (file)
@@ -17,7 +17,7 @@
 #include <msp/gl/mesh.h>
 #include <msp/gl/meshbuilder.h>
 #include <msp/gl/object.h>
 #include <msp/gl/mesh.h>
 #include <msp/gl/meshbuilder.h>
 #include <msp/gl/object.h>
-#include <msp/gl/pipeline.h>
+#include <msp/gl/sequence.h>
 #include <msp/gl/program.h>
 #include <msp/gl/renderer.h>
 #include <msp/gl/resources.h>
 #include <msp/gl/program.h>
 #include <msp/gl/renderer.h>
 #include <msp/gl/resources.h>
@@ -46,7 +46,7 @@ including:
 - Shadow mapping
 - Environment mapped reflections
 - Skybox using a cube map texture
 - Shadow mapping
 - Environment mapped reflections
 - Skybox using a cube map texture
-- Effects with nested pipelines
+- Effects with nested sequences
 - Complex multitexturing
 - Shader-based deformations
 - Creating a normalmapped texture through rendering
 - Complex multitexturing
 - Shader-based deformations
 - Creating a normalmapped texture through rendering
@@ -132,7 +132,7 @@ private:
        GL::EnvironmentMap *env_cube;
 
        GL::WindowView view;
        GL::EnvironmentMap *env_cube;
 
        GL::WindowView view;
-       GL::Pipeline pipeline;
+       GL::Sequence sequence;
        GL::Camera camera;
        GL::SimpleScene sky_scene;
        GL::InstanceScene scene;
        GL::Camera camera;
        GL::SimpleScene sky_scene;
        GL::InstanceScene scene;
@@ -142,7 +142,7 @@ private:
        GL::Bloom bloom;
        GL::ColorCurve colorcurve;
 
        GL::Bloom bloom;
        GL::ColorCurve colorcurve;
 
-       GL::Pipeline env_pipeline;
+       GL::Sequence env_sequence;
 
        Time::TimeStamp last_tick;
        float camera_angle;
 
        Time::TimeStamp last_tick;
        float camera_angle;
@@ -166,7 +166,7 @@ public:
 
 private:
        void setup_view();
 
 private:
        void setup_view();
-       void create_pipeline();
+       void create_sequence();
        void create_skybox();
        static void create_skybox_face(GL::TextureCube &, GL::TextureCubeFace);
        void create_tiles_texture();
        void create_skybox();
        static void create_skybox_face(GL::TextureCube &, GL::TextureCubeFace);
        void create_tiles_texture();
@@ -299,11 +299,11 @@ DesertPillars::DesertPillars(int argc, char **argv):
        cube_shprog(cube_src),
        cube_shadow_shprog(string(cube_src)+cube_shadow_src_tail),
        view(window, gl_context),
        cube_shprog(cube_src),
        cube_shadow_shprog(string(cube_src)+cube_shadow_src_tail),
        view(window, gl_context),
-       pipeline(view),
+       sequence(view),
        shadow_scene(resources, 2048, scene, light),
        bloom(resources, window.get_width(), window.get_height()),
        colorcurve(resources),
        shadow_scene(resources, 2048, scene, light),
        bloom(resources, window.get_width(), window.get_height()),
        colorcurve(resources),
-       env_pipeline(512, 512),
+       env_sequence(512, 512),
        camera_angle(0),
        camera_stopped(false),
        cube_angle(0),
        camera_angle(0),
        camera_stopped(false),
        cube_angle(0),
@@ -319,7 +319,7 @@ DesertPillars::DesertPillars(int argc, char **argv):
        keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &DesertPillars::key_press), false));
 
        setup_view();
        keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &DesertPillars::key_press), false));
 
        setup_view();
-       create_pipeline();
+       create_sequence();
        create_skybox();
        create_ground();
        create_pillars();
        create_skybox();
        create_ground();
        create_pillars();
@@ -340,13 +340,13 @@ void DesertPillars::setup_view()
        camera.set_up_direction(GL::Vector3(0, 0, 1));
        camera.set_depth_clip(1, 50);
        view.set_camera(&camera);
        camera.set_up_direction(GL::Vector3(0, 0, 1));
        camera.set_depth_clip(1, 50);
        view.set_camera(&camera);
-       view.set_content(&pipeline);
+       view.set_content(&sequence);
 }
 
 }
 
-void DesertPillars::create_pipeline()
+void DesertPillars::create_sequence()
 {
 {
-       pipeline.set_multisample(8);
-       pipeline.set_hdr(true);
+       sequence.set_multisample(8);
+       sequence.set_hdr(true);
 
        /* The shadow map is focused on the part of the scene that contains the
        pillars and the cube.  Making the ground cast shadows as well would result
 
        /* The shadow map is focused on the part of the scene that contains the
        pillars and the cube.  Making the ground cast shadows as well would result
@@ -362,26 +362,26 @@ void DesertPillars::create_pipeline()
        lighting.set_ambient(GL::Color(0.2));
 
        // The skybox is rendered first
        lighting.set_ambient(GL::Color(0.2));
 
        // The skybox is rendered first
-       pipeline.add_pass(0, sky_scene);
+       sequence.add_pass(0, sky_scene);
 
 
-       GL::Pipeline::Pass *pass = &pipeline.add_pass(0, shadow_scene);
+       GL::Sequence::Pass *pass = &sequence.add_pass(0, shadow_scene);
        pass->set_lighting(&lighting);
        pass->set_depth_test(&GL::DepthTest::lequal());
 
        /* A bloom filter enhances the realism of bright surfaces, even if there
        isn't anything really glowy in the scene. */
        bloom.set_strength(0.3);
        pass->set_lighting(&lighting);
        pass->set_depth_test(&GL::DepthTest::lequal());
 
        /* A bloom filter enhances the realism of bright surfaces, even if there
        isn't anything really glowy in the scene. */
        bloom.set_strength(0.3);
-       pipeline.add_postprocessor(bloom);
+       sequence.add_postprocessor(bloom);
 
        /* Lighting calculations are best done in linear color space, so the final
        image must be converted to srgb for display. */
        colorcurve.set_srgb();
 
        /* Lighting calculations are best done in linear color space, so the final
        image must be converted to srgb for display. */
        colorcurve.set_srgb();
-       pipeline.add_postprocessor(colorcurve);
+       sequence.add_postprocessor(colorcurve);
 
 
-       /* Initialize a second pipeline to render the environment map.  It has the
+       /* Initialize a second sequence to render the environment map.  It has the
        same renderables and passes, but no postprocessors or camera. */
        same renderables and passes, but no postprocessors or camera. */
-       env_pipeline.add_pass(0, sky_scene);
-       pass = &env_pipeline.add_pass(0, shadow_scene);
+       env_sequence.add_pass(0, sky_scene);
+       pass = &env_sequence.add_pass(0, shadow_scene);
        pass->set_lighting(&lighting);
        pass->set_depth_test(&GL::DepthTest::lequal());
 }
        pass->set_lighting(&lighting);
        pass->set_depth_test(&GL::DepthTest::lequal());
 }
@@ -778,7 +778,7 @@ void DesertPillars::create_cube()
        cube_data.object = new GL::Object(cube_data.mesh, &cube_tech);
 
        cube = new Cube(*cube_data.object);
        cube_data.object = new GL::Object(cube_data.mesh, &cube_tech);
 
        cube = new Cube(*cube_data.object);
-       env_cube = new GL::EnvironmentMap(resources, 512, *cube, env_pipeline);
+       env_cube = new GL::EnvironmentMap(resources, 512, *cube, env_sequence);
        scene.add(*env_cube);
 }
 
        scene.add(*env_cube);
 }