Huge graphics overhaul
This commit is contained in:
@@ -5,7 +5,19 @@ namespace nb {
|
||||
const std::string OGLError::type = "nb::OGLError";
|
||||
const ErrorCodeMap OGLError::ErrorMessages = {
|
||||
{ OGLError::Codes::UNDEFINED, "Error" },
|
||||
{OGLError::Codes::HANGING_OBJECT, "Attempting to leave a hanging OpenGL object"}
|
||||
{OGLError::Codes::HANGING_OBJECT, "Attempting to leave a hanging OpenGL object"},
|
||||
{OGLError::Codes::INVALID_OBJECT, "Attempting operation with invalid object"}
|
||||
};
|
||||
|
||||
OpenGLObject::OpenGLObject(OpenGLObject&& rval) {
|
||||
*this = std::move(rval);
|
||||
}
|
||||
|
||||
OpenGLObject& OpenGLObject::operator=(OpenGLObject&& rhs) {
|
||||
if (_id) { THROW(OGLError(Codes::HANGING_OBJECT)); }
|
||||
_id = rhs._id;
|
||||
rhs._id = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace nb
|
||||
Reference in New Issue
Block a user