27 void create(
const char *title,
int width,
int height);
52 void render(
int x,
int y,
float scale_factor, SDL_Texture *texture);
64 void render(
int x,
int y,
float scale_factor, std::string text, TTF_Font *font, SDL_Colour text_colour);
80 bool done(
bool quit_if_esc =
true,
bool delay =
true);
97 bool keyDown(
const Uint8 *inkeys,
int key);
102 SDL_Renderer *renderer;
103 SDL_Texture *framebuffer;
Definition: renderwindow.hpp:16
void draw_buffer(Uint32 *buffer)
Draws a buffer of pixel colours to the screen.
Definition: renderwindow.cpp:46
SDL_Texture * load_texture(const char *file_path)
Definition: renderwindow.cpp:55
void create(const char *title, int width, int height)
Create the window and the renderer.
Definition: renderwindow.cpp:10
bool keyDown(const Uint8 *inkeys, int key)
If the key is held down.
Definition: renderwindow.cpp:122
void render(int x, int y, float scale_factor, SDL_Texture *texture)
Render an SDL_Texture to the renderer.
Definition: renderwindow.cpp:67
bool done(bool quit_if_esc=true, bool delay=true)
Used in while loops to tell if the window has been closed or not.
Definition: renderwindow.cpp:110
const Uint8 * readKeys()
Get the current held down keys.
Definition: renderwindow.cpp:118
void redraw()
Draws the renderer to the window.
Definition: renderwindow.cpp:105