X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=demos%2Fdesertpillars%2Fsource%2Fdesertpillars.h;h=18522a57ca324f0449d52d50d7b7cf892d3c3365;hb=33577fd6ef75f1c3af77720fde351459727ca68c;hp=aac5862e166607633a6a2b434d5e6bb316874490;hpb=8033bd7822b4f24d86be186c47ba7e6d69931eeb;p=libs%2Fgl.git diff --git a/demos/desertpillars/source/desertpillars.h b/demos/desertpillars/source/desertpillars.h index aac5862e..18522a57 100644 --- a/demos/desertpillars/source/desertpillars.h +++ b/demos/desertpillars/source/desertpillars.h @@ -5,9 +5,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -54,6 +54,17 @@ private: virtual void setup_render(Msp::GL::Renderer &, Msp::GL::Tag) const; }; + class LightFlare: public Msp::GL::ObjectInstance + { + private: + Msp::GL::ProgramData shdata; + + public: + LightFlare(const Msp::GL::Object &, unsigned); + + virtual void setup_render(Msp::GL::Renderer &, Msp::GL::Tag) const; + }; + Msp::Graphics::Display display; Options opts; Msp::Graphics::Window window; @@ -64,12 +75,15 @@ private: Msp::GL::WindowView view; std::unique_ptr sequence; Msp::GL::Camera camera; + const Msp::GL::Lighting &lighting; std::unique_ptr sky; std::unique_ptr shadow_seq; + std::unique_ptr shadow_seq_thsm; std::unique_ptr shadow_map; std::unique_ptr env_seq; std::unique_ptr env_map; + std::unique_ptr global_env; Msp::GL::OrderedScene content; MorphSphere sphere; @@ -77,6 +91,16 @@ private: bool sphere_frozen; bool sphere_stopped; + Msp::GL::DirectionalLight &sun; + Msp::GL::Vector3 sun_node; + Msp::GL::Vector3 sun_axis; + Msp::Geometry::Angle sun_angle; + + Msp::GL::PointLight &wisp; + Msp::GL::Color wisp_base_color; + Msp::Geometry::Angle wisp_angle; + LightFlare flare; + float camera_distance; Msp::Geometry::Angle camera_base_height; Msp::Geometry::Angle camera_angle;