|
Brenta Engine 1.0
|
#include <screen.hpp>
Static Public Member Functions | |
| static void | Init (int SCR_WIDTH, int SCR_HEIGHT, bool isMouseCaptured=false, const char *title="OpenGL", bool msaa=false, bool vsync=false) |
| Initialize the window. | |
| static int | GetWidth () |
| Get the width of the window. | |
| static int | GetHeight () |
| Get the height of the window. | |
| static bool | isWindowClosed () |
| Check if the window is closed. | |
| static bool | isKeyPressed (int key) |
| Check if a key is pressed. | |
| static float | GetTime () |
| Get the time. | |
| static GLFWwindow * | GetWindow () |
| Get the window. | |
| static GLFWglproc | GetProcAddress () |
| Get the OpenGL function pointer. | |
| static void | SetMouseCallback (GLFWcursorposfun callback) |
| Set the mouse callback. | |
| static void | SetSizeCallback (GLFWframebuffersizefun callback) |
| Set the key callback. | |
| static void | SetMousePosCallback (GLFWcursorposfun callback) |
| Set the mouse position callback. | |
| static void | SetKeyCallback (GLFWkeyfun callback) |
| Set the key callback. | |
| static void | SetMouseCapture (bool isCaptured) |
| Set the mouse capture. | |
| static void | SetClose () |
| Set the window close flag. | |
| static void | SwapBuffers () |
| Swap the front and back buffers. | |
| static void | PollEvents () |
| Poll all pending events. | |
| static void | Terminate () |
| Terminate the window. | |
Static Public Attributes | |
| static int | WIDTH |
| Width of the window. | |
| static int | HEIGHT |
| Height of the window. | |
| static GLFWwindow * | window |
| Pointer to the window. | |
Screen subsystem.
This class is used to create a window and handle all the events related to the window. This class provides methods to initialize the window, get the window size, check if a key is pressed, get the time since the start of the program, and more.
Definition at line 47 of file screen.hpp.
|
static |
Get the height of the window.
Definition at line 110 of file screen.cpp.
|
static |
Get the OpenGL function pointer.
Definition at line 100 of file screen.cpp.
|
static |
|
static |
|
static |
|
static |
Initialize the window.
This method initializes the window with the given width and height, and sets the title of the window. The window is created with the given parameters.
| SCR_WIDTH | Width of the window |
| SCR_HEIGHT | Height of the window |
| isMouseCaptured | If the mouse is captured |
| title | Title of the window |
| msaa | If multisampling is enabled |
| vsync | If vertical synchronization is enabled |
Definition at line 42 of file screen.cpp.
|
static |
Check if a key is pressed.
| key | Key to check |
Definition at line 85 of file screen.cpp.
|
static |
Check if the window is closed.
Definition at line 80 of file screen.cpp.
|
static |
Poll all pending events.
Definition at line 158 of file screen.cpp.
|
static |
Set the window close flag.
Definition at line 142 of file screen.cpp.
|
static |
|
static |
Set the mouse callback.
| callback | Callback to set |
Definition at line 115 of file screen.cpp.
|
static |
Set the mouse capture.
| isCaptured | If the mouse is captured |
Definition at line 127 of file screen.cpp.
|
static |
Set the mouse position callback.
| callback | Callback to set |
Definition at line 176 of file screen.cpp.
|
static |
|
static |
Swap the front and back buffers.
Having to buffers is done to avoid flickering.
Definition at line 153 of file screen.cpp.
|
static |
Terminate the window.
Definition at line 147 of file screen.cpp.
|
static |
Height of the window.
Definition at line 57 of file screen.hpp.
|
static |
Width of the window.
Definition at line 53 of file screen.hpp.
|
static |
Pointer to the window.
Definition at line 61 of file screen.hpp.