Window class
#include <include/engine/core/window.h>
Manages the application window and its associated context.
This class is a wrapper around the underlying GLFW windowing library.
Constructors, destructors, conversion operators
Public functions
- auto native_handle() const -> GLFWwindow*
- Returns a pointer to the native GLFW window handle.
- auto IsRunning() const -> bool
- Checks if the window should remain open.
- auto ShouldClose() const -> bool
- Checks if the window should close.
- void SwapBuffers() const
- Swaps the front and back buffers.
- void PollEvents()
- Processes all pending events, such as keyboard and mouse input.
- auto delta_time() const -> double
- Calculates and returns the time elapsed since the last frame.
- auto width() const -> int
- Gets the width of the window.
- auto height() const -> int
- Gets the height of the window.
Function documentation
GLFWwindow* engine:: Window:: native_handle() const
Returns a pointer to the native GLFW window handle.
| Returns | Pointer to the GLFWwindow. |
|---|
bool engine:: Window:: IsRunning() const
Checks if the window should remain open.
| Returns | true if the window should stay open, false otherwise. |
|---|
bool engine:: Window:: ShouldClose() const
Checks if the window should close.
| Returns | true if the window should close, false otherwise. |
|---|
double engine:: Window:: delta_time() const
Calculates and returns the time elapsed since the last frame.
| Returns | The delta time in seconds. |
|---|