14 #ifndef VIDEO_HPP_INCLUDED
15 #define VIDEO_HPP_INCLUDED
21 #include <boost/utility.hpp>
22 #include <boost/scoped_ptr.hpp>
38 #define SDL_APPMOUSEFOCUS 0x01
39 #define SDL_APPINPUTFOCUS 0x02
40 #define SDL_APPACTIVE 0x04
58 class CVideo :
private boost::noncopyable {
118 void draw_texture(sdl::timage &
texture,
int x,
int y);
119 void set_texture_color_modulation(
int r,
int g,
int b,
int a);
120 void set_texture_submerge(
float f);
121 void set_texture_effects(
int effects);
124 void clear_overlay_area(SDL_Rect area);
125 void clear_overlay();
128 static void delay(
unsigned int milliseconds);
165 const unsigned height = 768,
const unsigned bpp = DefaultBpp);
227 void update_overlay(SDL_Rect *rect =
nullptr);
229 sdl::shader_program shader_;
void set_window_icon(surface &icon)
Sets the icon of the main window.
draw_layering(const bool auto_join=true)
std::pair< int, int > current_resolution()
void set_resolution(const std::pair< int, int > &res)
Set the resolution.
#define IMPLEMENT_LUA_JAILBREAK_EXCEPTION(type)
Helper macro for classes deriving from tlua_jailbreak_exception.
GLuint GLuint GLsizei GLenum type
void lock_updates(bool value)
static CVideo * singleton_
std::vector< std::pair< int, int > > get_available_resolutions(const bool include_current=false)
Returns the list of available screen resolutions.
GLenum GLenum GLuint texture
static CVideo & get_singleton()
GLint GLint GLint GLint GLint GLint y
void blit_surface(int x, int y, surface surf, SDL_Rect *srcrect=nullptr, SDL_Rect *clip_rect=nullptr)
sdl::twindow * get_window()
GLdouble GLdouble GLdouble b
void setMode(int x, int y, const MODE_EVENT mode)
void set_window_title(const std::string &title)
Sets the title of the main window.
surface & get_video_surface()
boost::scoped_ptr< sdl::twindow > window
The wrapper class for the SDL_Window class.
Uint8 window_state()
Wrapper for SDL_GetAppState.
bool isFullScreen() const
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLfloat * value
bool init_window()
Initializes a new window, taking into account any preiously saved states.
GLboolean GLboolean GLboolean GLboolean a
virtual void handle_window_event(const SDL_Event &event)
void update_rect(size_t x, size_t y, size_t w, size_t h)
Base class for exceptions that want to be thrown 'through' lua.
bool update_locked() const
static const int DefaultBpp
GLfloat GLfloat GLfloat GLfloat h
GLint GLint GLint GLint GLint x
void set_fullscreen(bool ison)
GLdouble GLdouble GLdouble r
CVideo(FAKE_TYPES type=NO_FAKE)
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
int set_help_string(const std::string &str)
sdl_handler(const bool auto_join=true)
Base class for all the errors encountered by the engine.
void trigger_full_redraw()
video_event_handler event_handler_
void make_test_fake(const unsigned width=1024, const unsigned height=768, const unsigned bpp=DefaultBpp)
Creates a fake frame buffer for the unit tests.
void clear_all_help_strings()
static void delay(unsigned int milliseconds)
Contains a wrapper class for the SDL_Window class.
virtual void handle_event(const SDL_Event &)
GLint GLint GLint GLint GLint GLint GLsizei width
void update_framebuffer()
update_locker(CVideo &v, bool lock=true)
GLsizei const GLcharARB ** string
void clear_help_string(int handle)
boost::shared_ptr< halo_record > handle