7 #include <SDL2/SDL_image.h> 8 #include <SDL2/SDL_ttf.h> 9 #include <SDL2/SDL_mixer.h> 42 Window(
const char *windowTitle, glm::ivec2 position,
int width,
int height, Uint32 windowFlags);
185 void clear(glm::ivec4 color = glm::ivec4());
const char * getTitle()
Get the window's title.
Definition: Window.hpp:78
void setWindowRect(SDL_Rect &rect)
Set the SDL_Rect belonging to the Window.
Definition: Window.hpp:140
SDL_GLContext & getContext()
Definition: Window.hpp:64
Window()
Default constructor - INACCESSIBLE!
Definition: Window.hpp:31
void clear(glm::ivec4 color=glm::ivec4())
Clear the window for rendering with SDL (not OpenGL).
glm::ivec2 m_position
Window position as a vector of integers.
Definition: Window.hpp:192
const glm::ivec2 & getPosition()
Get the position of the window on screen.
Definition: Window.hpp:91
SDL_Rect m_rect
SDL_Rect for drawing within a rectangular area of the window.
Definition: Window.hpp:196
Definition: GLDrawable.hpp:16
int m_width
Width of the Window.
Definition: Window.hpp:193
const SDL_Rect & getWindowRect()
Get the SDL_Rect belonging to the Window.
Definition: Window.hpp:133
void draw(GLDrawable &drawable, GLStates &states)
int m_height
Height of the Window.
Definition: Window.hpp:194
void setSize(const glm::ivec2 &windowSize)
Definition: Window.hpp:113
const glm::tvec4< Uint8 > & getClearColor()
Get the clear color of the Window.
Definition: Window.hpp:147
glm::tvec4< Uint8 > m_clearColor
SDL_Color for clearing the screen.
Definition: Window.hpp:197
SDL_Color getSDLClearColor()
Get the clear color of the Window in SDL_Color format.
Definition: Window.hpp:154
glm::ivec2 getSize()
Get the SDL window size (width and height).
Definition: Window.hpp:106
SDL_Renderer *const getRenderer()
Get the raw SDL_Renderer pointer (read-only).
Definition: Window.hpp:71
Stores the states used to draw OpenGL objects.
Definition: GLStates.hpp:16
void setPosition(glm::ivec2 position)
Set the position of the window on screen.
Definition: Window.hpp:99
const Uint32 & getFlags()
Get the SDL window flags.
Definition: Window.hpp:120
void setTitle(const char *title)
Set the title of the window.
Definition: Window.hpp:84
Interface for creating drawable entities. Part of the Decorator pattern for drawable objects used in ...
Definition: Drawable.hpp:15
const char * m_title
The window title.
Definition: Window.hpp:190
Class for SDL window creation and management, implemented using the Facade pattern to provide a more ...
Definition: Window.hpp:24
SDL_GLContext m_context
OpenGL context provided by SDL.
Definition: Window.hpp:188
SDL_Window * m_window
SDL_Window object.
Definition: Window.hpp:189
void setFlags(const Uint32 &flags)
Set the SDL window size (width and height).
Definition: Window.hpp:127
SDL_Renderer * m_renderer
SDL_Renderer object.
Definition: Window.hpp:191
Uint32 m_flags
Display flags for the SDL_Window.
Definition: Window.hpp:195
void render()
Render to the window.
SDL_Window *const getWindow()
Get the raw SDL_Window pointer (read-only).
Definition: Window.hpp:57