Mild updates to Window and other pieces to match the rest
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user