ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
display.h File Reference

Display and window routines for the ASW library. More...

#include <string>
#include "./types.h"
Include dependency graph for display.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  asw
 
namespace  asw::display
 

Functions

void asw::display::setTitle (const std::string &title)
 Set the title of the window.
 
void asw::display::setIcon (const std::string &path)
 Set the icon to display on the window. If it does not exist, this will silently fail.
 
void asw::display::setFullscreen (bool fullscreen)
 Set the window to fullscreen or windowed.
 
void asw::display::setResolution (int w, int h)
 Set the resolution of the window.
 
void asw::display::setResizable (bool resizable)
 Set resizable flag of the window.
 
SDL_Point asw::display::getSize ()
 Get the size of the window.
 
SDL_Point asw::display::getLogicalSize ()
 Get the logical size of the window. This may differ from the actual size if scaling is enabled.
 
SDL_FPoint asw::display::getScale ()
 Get the scale of the window. This is equivalent to the logical size divided by the actual size.
 
void asw::display::setRenderTarget (const asw::Texture &texture)
 Set the render target to the window.
 
void asw::display::resetRenderTarget ()
 Reset the render target to the default.
 
void asw::display::clear ()
 Clear the window.
 
void asw::display::present ()
 Present the window.
 

Variables

asw::Rendererasw::display::renderer = nullptr
 The renderer for the display module.
 
asw::Windowasw::display::window = nullptr
 The window for the display module.
 

Detailed Description

Display and window routines for the ASW library.

Author
Allan Legemaate (alege.nosp@m.maat.nosp@m.e@gma.nosp@m.il.c.nosp@m.om)
Date
2023-09-20

Definition in file display.h.