17 #ifndef HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEM_HPP 18 #define HEADER_SUPERTUX_VIDEO_VIDEO_SYSTEM_HPP 24 #include "math/size.hpp" 25 #include "util/currenton.hpp" 26 #include "video/sampler.hpp" 27 #include "video/texture_ptr.hpp" 48 static std::unique_ptr<VideoSystem> create(VideoSystem::Enum video_system);
50 static Enum get_video_system(
const std::string &video);
51 static std::string get_video_string(Enum video);
52 static std::vector<std::string> get_available_video_systems();
59 virtual std::string
get_name()
const = 0;
61 virtual Renderer* get_back_renderer()
const = 0;
62 virtual Renderer& get_renderer()
const = 0;
63 virtual Renderer& get_lightmap()
const = 0;
65 virtual TexturePtr new_texture(
const SDL_Surface& image,
const Sampler& sampler =
Sampler()) = 0;
67 virtual const Viewport& get_viewport()
const = 0;
68 virtual void apply_config() = 0;
69 virtual void flip() = 0;
70 virtual void on_resize(
int w,
int h) = 0;
71 virtual Size get_window_size()
const = 0;
73 virtual void set_vsync(
int mode) = 0;
74 virtual int get_vsync()
const = 0;
75 virtual void set_gamma(
float gamma) = 0;
76 virtual void set_title(
const std::string& title) = 0;
77 virtual void set_icon(
const SDL_Surface& icon) = 0;
80 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 exception 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:37
Definition: viewport.hpp:23
virtual std::string get_name() const =0
Return a human readable name of the current video system.