Represents a window that can be created and managed by the engine.
More...
#include <window.h>
|
| Window (int width, int height, const char *title) |
| Initialize window and OpenGL context.
|
|
void | close () |
| Close window and unload OpenGL context.
|
|
bool | shouldClose () |
| Checks if aplication should close (KEY_ESCAPE pressed or window close icon clicked).
|
|
void | setTargetFPS (int fps) |
| Sets the maximum frames per second that the window should render.
|
|
int | getTargetFPS () |
| Returns the maximum frames per second that the window should render.
|
|
void | beginDrawing () |
| Setup the windows to start drawing.
|
|
void | endDrawing () |
| Finish the drawing process and swap the buffers.
|
|
void | clearBackground (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Clear the window with a specific color.
|
|
void | clearBackground (Color color) |
| Clear the window with a specific color.
|
|
void | drawText (const char *text, int x, int y, int fontSize, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Draw some text on the window, using the default font.
|
|
void | drawText (const char *text, int x, int y, int fontSize, Color color) |
| Draw some text on the window, using the default font.
|
|
Represents a window that can be created and managed by the engine.
◆ Window()
Axle::Window::Window |
( |
int | width, |
|
|
int | height, |
|
|
const char * | title ) |
Initialize window and OpenGL context.
- Parameters
-
width | The width of the window. |
height | The height of the window. |
title | The title of the window. |
◆ clearBackground() [1/2]
void Axle::Window::clearBackground |
( |
Color | color | ) |
|
Clear the window with a specific color.
- Parameters
-
color | The color to be used to clear the window. |
◆ clearBackground() [2/2]
void Axle::Window::clearBackground |
( |
unsigned char | r, |
|
|
unsigned char | g, |
|
|
unsigned char | b, |
|
|
unsigned char | a ) |
Clear the window with a specific color.
- Parameters
-
r | The red component of the color. |
g | The green component of the color. |
b | The blue component of the color. |
a | The alpha component of the color. |
◆ drawText() [1/2]
void Axle::Window::drawText |
( |
const char * | text, |
|
|
int | x, |
|
|
int | y, |
|
|
int | fontSize, |
|
|
Color | color ) |
Draw some text on the window, using the default font.
- Parameters
-
text | The text to be drawn |
x | The x position of the text |
y | The y position of the text |
fontSize | The size of the font. |
color | The color preset to be used. |
◆ drawText() [2/2]
void Axle::Window::drawText |
( |
const char * | text, |
|
|
int | x, |
|
|
int | y, |
|
|
int | fontSize, |
|
|
unsigned char | r, |
|
|
unsigned char | g, |
|
|
unsigned char | b, |
|
|
unsigned char | a ) |
Draw some text on the window, using the default font.
- Parameters
-
text | The text to be drawn |
x | The x position of the text |
y | The y position of the text |
fontSize | The size of the font. |
r | The red component of the color. |
g | The green component of the color. |
b | The blue component of the color. |
a | The alpha component of the color. |
The documentation for this class was generated from the following files:
- axle/include/window.h
- axle/src/window.cpp