diff options
author | chai <chaifix@163.com> | 2019-04-02 21:45:33 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-04-02 21:45:33 +0800 |
commit | af7bdaa10ee71a319dc55c3c7556fa43a95c9dc9 (patch) | |
tree | 58611985001b78c5a76b78ae146fdb07dde31c1d /source/modules/asura-core/graphics/shader.h | |
parent | 250e30d73f09e9da2b5a81d0fbae63744ae12a73 (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/shader.h')
-rw-r--r-- | source/modules/asura-core/graphics/shader.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/modules/asura-core/graphics/shader.h b/source/modules/asura-core/graphics/shader.h index ae24548..9077599 100644 --- a/source/modules/asura-core/graphics/shader.h +++ b/source/modules/asura-core/graphics/shader.h @@ -4,6 +4,7 @@ #include <map> #include <string> +#include <asura-utils/exceptions/exception.h> #include <asura-utils/scripting/portable.hpp> #include <asura-utils/io/renewable.h> #include <asura-utils/math/vector2.hpp> @@ -36,7 +37,7 @@ namespace AsuraEngine LUAX_DECL_FACTORY(Shader); - Shader(); + Shader() asura_throw(Exception); ~Shader(); @@ -44,8 +45,7 @@ namespace AsuraEngine /// ӴshaderʱȼǷϴλuniforms location mapʹ /// glAttachShader±ɫɫ /// - //bool Load(const std::string& vertexShader, const std::string& fragmentShader); - bool Refresh(AEIO::DecodedData* decodeData) override; + bool Renew(AEIO::DecodedData* decodeData) override; /// /// shaderΪ @@ -98,6 +98,8 @@ namespace AsuraEngine /// OpenGL shader program handle. /// GLuint mProgram; + GLuint mVertShader; + GLuint mFragShader; Luax::LuaxMemberRef mCodeRef; @@ -109,6 +111,7 @@ namespace AsuraEngine LUAX_DECL_METHOD(_Use); LUAX_DECL_METHOD(_Unuse); LUAX_DECL_METHOD(_Load); + LUAX_DECL_METHOD(_Renew); LUAX_DECL_METHOD(_HasUniform); LUAX_DECL_METHOD(_GetUniformLocation); LUAX_DECL_METHOD(_SetBuiltInUniforms); @@ -121,6 +124,9 @@ namespace AsuraEngine //----------------------------------------------------------------------------// + std::string GetProgramWarnings(); + std::string GetShaderWarnings(GLuint shader); + }; } |