|
Brenta Engine 1.2
|
Window subsystem. More...
#include <window.hpp>
Data Structures | |
| class | builder |
| struct | config |
Public Member Functions | |
| std::expected< void, subsystem::error > | initialize () override |
| std::expected< void, subsystem::error > | terminate () override |
| std::string | name () override |
| Returns the name of the sybsystem. | |
| bool | is_initialized () override |
| Returns true if the subsystem is initialized. | |
Public Member Functions inherited from brenta::subsystem | |
Static Public Member Functions | |
| static brenta::window & | instance () |
| Get a static instance of the window. | |
| static int | get_width () |
| static int | get_height () |
| static bool | should_close () |
| static bool | is_key_pressed (int key) |
| static float | get_time () |
| static GLFWwindow * | get_window () |
| static GLFWglproc | get_proc_address () |
| Get the OpenGL function pointer. | |
| static void | set_mouse_callback (GLFWcursorposfun callback) |
| static void | set_size_callback (GLFWframebuffersizefun callback) |
| static void | set_mouse_pos_callback (GLFWcursorposfun callback) |
| static void | set_key_callback (GLFWkeyfun callback) |
| static void | set_mouse_capture (bool is_captured) |
| static void | set_width_height (int width, int height) |
| static void | close () |
| static void | swap_buffers () |
| Swap the front and back buffers. | |
| static void | poll_events () |
| Poll all pending events. | |
Static Public Attributes | |
| static const std::string | subsystem_name = "window" |
| static const window::config | default_config |
| static window::config | init_config = window::default_config |
Additional Inherited Members | |
Public Types inherited from brenta::subsystem | |
| using | error = std::string |
Window 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 28 of file window.hpp.
|
static |
Definition at line 193 of file window.cpp.
|
static |
Definition at line 162 of file window.cpp.
|
static |
Get the OpenGL function pointer.
Definition at line 152 of file window.cpp.
|
static |
Definition at line 142 of file window.cpp.
|
static |
Definition at line 157 of file window.cpp.
|
static |
Definition at line 147 of file window.cpp.
|
overridevirtual |
Implements brenta::subsystem.
Definition at line 42 of file window.cpp.
|
static |
Get a static instance of the window.
Definition at line 119 of file window.cpp.
|
overridevirtual |
Returns true if the subsystem is initialized.
Implements brenta::subsystem.
Definition at line 110 of file window.cpp.
|
static |
Definition at line 137 of file window.cpp.
|
overridevirtual |
Returns the name of the sybsystem.
Implements brenta::subsystem.
Definition at line 105 of file window.cpp.
|
static |
Poll all pending events.
Definition at line 203 of file window.cpp.
|
static |
Definition at line 217 of file window.cpp.
|
static |
Definition at line 167 of file window.cpp.
|
static |
Definition at line 179 of file window.cpp.
|
static |
Definition at line 222 of file window.cpp.
|
static |
Definition at line 172 of file window.cpp.
|
static |
Definition at line 130 of file window.cpp.
|
static |
Definition at line 125 of file window.cpp.
|
static |
Swap the front and back buffers.
Having two buffers is done to avoid flickering.
Definition at line 198 of file window.cpp.
|
overridevirtual |
Implements brenta::subsystem.
Definition at line 93 of file window.cpp.
|
static |
Definition at line 36 of file window.hpp.
|
static |
Definition at line 37 of file window.hpp.
|
static |
Definition at line 35 of file window.hpp.