#include <msp/core/application.h>
#include <msp/datafile/directorysource.h>
#include <msp/gl/camera.h>
+#include <msp/gl/device.h>
#include <msp/gl/environmentmap.h>
#include <msp/gl/objectinstance.h>
#include <msp/gl/orderedscene.h>
#include <msp/gl/technique.h>
#include <msp/gl/windowview.h>
#include <msp/graphics/display.h>
-#include <msp/graphics/glcontext.h>
#include <msp/graphics/window.h>
#include <msp/input/keyboard.h>
#include <msp/time/timestamp.h>
struct Options
{
Msp::Graphics::WindowOptions wnd_opts;
- Msp::Graphics::GLOptions gl_opts;
Options();
};
{
private:
Msp::DataFile::DirectorySource source;
+ Msp::GL::ResourceManager res_mgr;
public:
- Resources();
+ Resources(Msp::GL::ResourceManager *);
};
class MorphSphere: public Msp::GL::ObjectInstance
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<Msp::GL::Sequence> sequence;
Msp::GL::Camera camera;
+ const Msp::GL::Lighting &lighting;
- std::unique_ptr<Msp::GL::Sky> sky;
- std::unique_ptr<Msp::GL::Sequence> shadow_seq;
- std::unique_ptr<Msp::GL::ShadowMap> shadow_map;
std::unique_ptr<Msp::GL::Sequence> env_seq;
std::unique_ptr<Msp::GL::EnvironmentMap> env_map;
Msp::GL::OrderedScene content;
bool sphere_frozen;
bool sphere_stopped;
+ Msp::GL::DirectionalLight &sun;
+ Msp::GL::Vector3 sun_node;
+ Msp::GL::Vector3 sun_axis;
+ Msp::Geometry::Angle<float> sun_angle;
+
+ Msp::GL::PointLight &wisp;
+ Msp::GL::Color wisp_base_color;
+ Msp::Geometry::Angle<float> wisp_angle;
+ LightFlare flare;
+
float camera_distance;
Msp::Geometry::Angle<float> camera_base_height;
Msp::Geometry::Angle<float> camera_angle;