diff options
Diffstat (limited to 'Runtime/Graphics/Texture.h')
-rw-r--r-- | Runtime/Graphics/Texture.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Runtime/Graphics/Texture.h b/Runtime/Graphics/Texture.h index 0c66fa2..1aa8bdf 100644 --- a/Runtime/Graphics/Texture.h +++ b/Runtime/Graphics/Texture.h @@ -1,6 +1,6 @@ #pragma once #include <exception> - +#include <string> #include "Runtime/Lua/LuaHelper.h" #include "../Utilities/UtilMacros.h" #include "OpenGL.h" @@ -51,6 +51,11 @@ public: TextureException(const char* what) : std::exception(what) {} + TextureException(int glError) + { + g_sharedGLErrorMsg = std::to_string(glError); + std::exception(g_sharedGLErrorMsg.c_str()); + } }; class Texture : public LuaBind::NativeClass<Texture> |