#include <App.hpp>
◆ ~App()
| dodo::core::App::~App |
( |
| ) |
|
38 {
41}
GLFWwindow * _window
Definition App.hpp:20
GLFWAPI void glfwDestroyWindow(GLFWwindow *window)
Destroys the specified window and its context.
References _window, and glfwDestroyWindow().
◆ App() [1/3]
| dodo::core::App::App |
( |
const App & | other | ) |
|
|
delete |
◆ App() [2/3]
| dodo::core::App::App |
( |
App && | other | ) |
|
|
noexcept |
27 :
28_window(std::exchange(other._window,
nullptr))
29{
30
31}
◆ App() [3/3]
◆ createApp()
| auto dodo::core::App::createApp |
( |
const DodoContext & | ctx, |
|
|
const AppInfo & | appInfo ) -> std::expected<App, std::string> |
|
static |
9 {
11 if (auto result = app.createGLFWWindow(appInfo); !result)
12 return std::unexpected(result.error());
13 return app;
14}
References createGLFWWindow().
Referenced by main().
◆ createGLFWWindow()
| auto dodo::core::App::createGLFWWindow |
( |
const AppInfo & | appInfo | ) |
-> std::expected<bool, std::string> |
|
private |
16 {
17 const char *errorBuf;
22 return std::unexpected(std::format("Failed to create GLFW Window: {}", errorBuf));
23 }
24 return true;
25}
#define GLFW_NO_API
Definition glfw3.h:1140
GLFWAPI int glfwGetError(const char **description)
Returns and clears the last error for the calling thread.
#define GLFW_CLIENT_API
Context client API hint and attribute.
Definition glfw3.h:1031
GLFWAPI void glfwWindowHint(int hint, int value)
Sets the specified window hint to the desired value.
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
References GLFW_CLIENT_API, GLFW_NO_API, glfwCreateWindow(), glfwGetError(), and glfwWindowHint().
Referenced by createApp().
◆ isRunning()
| bool dodo::core::App::isRunning |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
| App & dodo::core::App::operator= |
( |
App && | other | ) |
|
|
noexcept |
33 {
34 _window = std::exchange(other._window,
nullptr);
35 return *this;
36}
◆ operator=() [2/2]
| App & dodo::core::App::operator= |
( |
const App & | other | ) |
|
|
delete |
◆ pollEvents()
| void dodo::core::App::pollEvents |
( |
| ) |
const |
|
inline |
GLFWAPI void glfwPollEvents(void)
Processes all pending events.
References glfwPollEvents().
◆ _window
The documentation for this class was generated from the following files:
- /github/workspace/include/dodo/core/App.hpp
- /github/workspace/src/dodo/core/App.cpp