Mild updates to Window and other pieces to match the rest

This commit is contained in:
NaifBanana
2026-08-20 08:14:28 -05:00
parent fa749a6ebf
commit 52a01debd6
5 changed files with 66 additions and 43 deletions
+27 -3
View File
@@ -9,6 +9,7 @@
#include <stdexcept>
#include <string>
#include <NBCore/Errors.hpp>
#include <NBCore/Utils.hpp>
namespace nb {
@@ -18,9 +19,32 @@ public:
GLError(const std::string&);
};
class WindowError : public std::runtime_error {
public:
WindowError(const std::string&);
class OpenGLError : public Error<OpenGLError> {
using Base = Error<OpenGLError>;
public:
using Base::Base;
enum Codes : unsigned int {
UNDEFINED, INIT_FAILED, GLFW_INTIALIZED, GLAD_FAILED
};
static const std::string type;
static const ErrorCodeMap ErrorMessages;
};
class WindowError : public Error<WindowError> {
using Base = Error<WindowError>;
public:
using Base::Base;
enum Codes : unsigned int {
UNDEFINED, INITIALIZED_WINDOW, NO_GLFW, INIT_FAILED
};
static const std::string type;
static const ErrorCodeMap ErrorMessages;
};
class Window {