17 #ifndef HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEM_HPP 18 #define HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEM_HPP 23 #include "math/size.hpp" 24 #include "util/currenton.hpp" 25 #include "video/sampler.hpp" 26 #include "video/texture_ptr.hpp" 47 static std::unique_ptr<VideoSystem> create(VideoSystem::Enum video_system);
49 static Enum get_video_system(
const std::string &video);
50 static std::string get_video_string(Enum video);
57 virtual std::string
get_name()
const = 0;
59 virtual Renderer* get_back_renderer()
const = 0;
60 virtual Renderer& get_renderer()
const = 0;
61 virtual Renderer& get_lightmap()
const = 0;
63 virtual TexturePtr new_texture(
const SDL_Surface& image,
const Sampler& sampler =
Sampler()) = 0;
65 virtual const Viewport& get_viewport()
const = 0;
66 virtual void apply_config() = 0;
67 virtual void flip() = 0;
68 virtual void on_resize(
int w,
int h) = 0;
69 virtual Size get_window_size()
const = 0;
71 virtual void set_vsync(
int mode) = 0;
72 virtual int get_vsync()
const = 0;
73 virtual void set_gamma(
float gamma) = 0;
74 virtual void set_title(
const std::string& title) = 0;
75 virtual void set_icon(
const SDL_Surface& icon) = 0;
78 void do_take_screenshot();
Definition: renderer.hpp:30
A rectangular image.
Definition: surface.hpp:35
Definition: sampler.hpp:23
Simple Wrapper class around SDL_Surface that provides execption safety.
Definition: sdl_surface_ptr.hpp:24
A 'Currenton' allows access to the currently active instance of a class via the static current() func...
Definition: currenton.hpp:30
Definition: video_system.hpp:36
Definition: viewport.hpp:23
virtual std::string get_name() const =0
Return a human readable name of the current video system.