diff options
author | chai <chaifix@163.com> | 2021-10-27 09:47:44 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-27 09:47:44 +0800 |
commit | e6a15decac22912900d2cbd2e5525229b92bb55a (patch) | |
tree | 16462535a26bdb9aa08c0604bdfd42f81933ad83 /Runtime/Graphics/Texture.h | |
parent | 0035e0d47bbce8311d3a4e559e74b8cdc5209d47 (diff) |
*gl error handle
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> |