From d7a972a0f16da0fd7bf4c0b70913920216ff3113 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 8 Jun 2019 08:34:52 +0800 Subject: *misc --- source/modules/asura-core/graphics/shader.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/modules/asura-core/graphics/shader.h') 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); -- cgit v1.1-26-g67d0