26void _init(
int width,
int height,
int scale);
65void set_icon(
const std::string& path);
void set_icon(const std::string &path)
Set the icon to display on the window. If it does not exist, this will silently fail.
asw::Vec2< float > get_scale()
Get the scale of the window. This is equivalent to the logical size divided by the actual size.
void set_fullscreen(bool fullscreen)
Set the window to fullscreen or windowed.
asw::Vec2< int > get_logical_size()
Get the logical size of the window. This may differ from the actual size if scaling is enabled.
void _init_opengl(int width, int height, int scale)
Initialize the display module with OpenGL support. Called by asw::core::init().
void set_blend_mode(asw::BlendMode mode)
Set the blend mode of a texture.
void reset_render_target()
Reset the render target to the default.
asw::Vec2< int > get_size()
Get the size of the window.
void swap_window()
Swap window (gl)
void present()
Present the window.
void set_render_target(const asw::Texture &texture)
Set the render target to the window.
void clear()
Clear the window.
void _shutdown()
Shut down the display module. Called by asw::core::shutdown(). Nulls the renderer and window pointers...
void warp_mouse(float x, float y)
Warp mouse in window.
asw::Renderer * get_renderer()
Get the SDL renderer.
asw::Window * get_window()
Get the SDL window.
void _init(int width, int height, int scale)
Initialize the display module. Called by asw::core::init().
void set_title(const std::string &title)
Set the title of the window.
void set_resolution(int w, int h)
Set the resolution of the window.
void set_resizable(bool resizable)
Set resizable flag of the window.
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
BlendMode
Mappings from SDL_BLENDMODE to ASW BlendMode.
SDL_Window Window
Alias for a shared pointer to an SDL_Window.
SDL_Renderer Renderer
Alias for a shared pointer to an SDL_Renderer.
RGBA color struct with 8-bit channels.
Types used throughout the ASW library.