diff options
author | chai <chaifix@163.com> | 2019-06-08 08:34:52 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-06-08 08:34:52 +0800 |
commit | d7a972a0f16da0fd7bf4c0b70913920216ff3113 (patch) | |
tree | a9146629cbf513200462c3f1223a9e07f3e01862 /source/modules/asura-core/graphics/shader.h | |
parent | 8bfe54676f728076a92d802bb5d064e58265c8f2 (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/shader.h')
-rw-r--r-- | source/modules/asura-core/graphics/shader.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/modules/asura-core/graphics/shader.h b/source/modules/asura-core/graphics/shader.h index b5d866e..f4553ec 100644 --- a/source/modules/asura-core/graphics/shader.h +++ b/source/modules/asura-core/graphics/shader.h @@ -45,12 +45,10 @@ namespace AsuraEngine void OnUse(); void OnUnuse(); - /// void SetAttribute(int loc, VertexBuffer* vbo, uint offseti = 0, uint stridei = 0, bool normalized = false); int GetAttributeLocation(const std::string& attribute); void DisableAttribute(int loc); - /// Uniform bool HasUniform(const std::string& uniform); uint GetUniformLocation(const std::string& uniform); void SetUniformFloat(uint loc, float value); @@ -88,15 +86,18 @@ namespace AsuraEngine LUAX_DECL_METHOD(_SetUniformVector3); LUAX_DECL_METHOD(_SetUniformVector4); LUAX_DECL_METHOD(_SetUniformColor); - /// vertex attributes + LUAX_DECL_METHOD(_GetAttributeLocation); LUAX_DECL_METHOD(_SetAttribute); LUAX_DECL_METHOD(_DisableAttribute); - /// uniform + LUAX_DECL_METHOD(_SetBuiltInUniforms); //----------------------------------------------------------------------------// + bool CompileVertexShader(const std::string& vert, std::string& outError); + bool CompileFragementShader(const std::string& frag, std::string& outError); + std::string GetProgramWarnings(); std::string GetShaderWarnings(GLuint shader); |