X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=demos%2Fdesertpillars%2Fsource%2Fdesertpillars.h;h=3171da8efb6e7288c9aa7e139b5d0c5894f70d67;hb=857e0a3f684fba4810260697a78a769dff514f1f;hp=c6242ad313d9eac4b257b1ec1d7fd37e9e4ed420;hpb=0b766638d9707f1dfcde918637bde51fe7d00af3;p=libs%2Fgl.git diff --git a/demos/desertpillars/source/desertpillars.h b/demos/desertpillars/source/desertpillars.h index c6242ad3..3171da8e 100644 --- a/demos/desertpillars/source/desertpillars.h +++ b/demos/desertpillars/source/desertpillars.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -16,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -27,7 +27,6 @@ private: struct Options { Msp::Graphics::WindowOptions wnd_opts; - Msp::Graphics::GLOptions gl_opts; Options(); }; @@ -38,7 +37,7 @@ private: Msp::DataFile::DirectorySource source; public: - Resources(); + Resources(Msp::GL::ResourceManager *); }; class MorphSphere: public Msp::GL::ObjectInstance @@ -54,23 +53,32 @@ 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; - Msp::Graphics::GLContext gl_ctx; + Msp::GL::Device gl_device; Msp::Input::Keyboard keyboard; + Msp::GL::ResourceManager res_mgr; Resources resources; 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_map; std::unique_ptr env_seq; std::unique_ptr env_map; - std::unique_ptr global_env; Msp::GL::OrderedScene content; MorphSphere sphere; @@ -78,6 +86,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;