4#include <SDL3_image/SDL_image.h>
17 SDL_Surface* icon = IMG_Load(path.c_str());
19 if (icon ==
nullptr) {
Display and window routines for the ASW library.
void setRenderTarget(const asw::Texture &texture)
Set the render target to the window.
void setIcon(const std::string &path)
Set the icon to display on the window. If it does not exist, this will silently fail.
SDL_Point getSize()
Get the size of the window.
void setResizable(bool resizable)
Set resizable flag of the window.
void present()
Present the window.
void clear()
Clear the window.
SDL_Point getLogicalSize()
Get the logical size of the window. This may differ from the actual size if scaling is enabled.
SDL_FPoint getScale()
Get the scale of the window. This is equivalent to the logical size divided by the actual size.
void setResolution(int w, int h)
Set the resolution of the window.
void resetRenderTarget()
Reset the render target to the default.
void setFullscreen(bool fullscreen)
Set the window to fullscreen or windowed.
asw::Renderer * renderer
The renderer for the display module.
asw::Window * window
The window for the display module.
void setTitle(const std::string &title)
Set the title of the window.
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
SDL_Window Window
Alias for a shared pointer to an SDL_Window.
SDL_Renderer Renderer
Alias for a shared pointer to an SDL_Renderer.
Types used throughout the ASW library.