From e6a15decac22912900d2cbd2e5525229b92bb55a Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 27 Oct 2021 09:47:44 +0800 Subject: *gl error handle --- Runtime/Graphics/Texture.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Runtime/Graphics/Texture.h') 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 - +#include #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 -- cgit v1.1-26-g67d0