summaryrefslogtreecommitdiff
path: root/Runtime/Graphics
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-10-29 22:28:12 +0800
committerchai <chaifix@163.com>2021-10-29 22:28:12 +0800
commit164885fd98d48703bd771f802d79557b7db97431 (patch)
tree7c396e475082644ec6994bcc7f3914eb4efb0c5a /Runtime/Graphics
parent655466e2d798b72ee3d3be7fcfe32db6af2d4466 (diff)
* !!! 允许NativeClass延后绑定VM
Diffstat (limited to 'Runtime/Graphics')
-rw-r--r--Runtime/Graphics/Shader.cpp5
-rw-r--r--Runtime/Graphics/Shader.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/Runtime/Graphics/Shader.cpp b/Runtime/Graphics/Shader.cpp
index 2c3d686..4c41d6b 100644
--- a/Runtime/Graphics/Shader.cpp
+++ b/Runtime/Graphics/Shader.cpp
@@ -35,6 +35,11 @@ void checkCompileshaderErrorors(GLuint shader, std::string type)
}
}
+Shader::Shader()
+ : NativeClass<Shader>()
+{
+}
+
Shader::Shader(LuaBind::VM*vm)
: NativeClass<Shader>(vm)
{
diff --git a/Runtime/Graphics/Shader.h b/Runtime/Graphics/Shader.h
index 8a8c1f5..3410e20 100644
--- a/Runtime/Graphics/Shader.h
+++ b/Runtime/Graphics/Shader.h
@@ -11,6 +11,7 @@
class Shader : public LuaBind::NativeClass<Shader>
{
public:
+ Shader()/*throw(ShaderCompileExecption)*/;
Shader(LuaBind::VM*vm)/*throw(ShaderCompileExecption)*/;
Shader(LuaBind::VM*vm, std::string& glslShader)/*throw(ShaderCompileExecption)*/;
Shader(LuaBind::VM*vm, const char* vert, const char* frag)/*throw(ShaderCompileExecption)*/;