From 10afca5ce3ce3aac0ee7145db5064b9e5ca6637a Mon Sep 17 00:00:00 2001 From: Maire Nicolas Date: Wed, 29 Jun 2011 10:24:41 +0200 Subject: [PATCH] Rajout des noms de shaders dans les constructeurs. --- src/Utils/Shaders/shaderColorPerVertex.cpp | 4 ++++ src/Utils/Shaders/shaderPhong.cpp | 5 +++++ src/Utils/Shaders/shaderVectorPerVertex.cpp | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/src/Utils/Shaders/shaderColorPerVertex.cpp b/src/Utils/Shaders/shaderColorPerVertex.cpp index c3e3f93c..18fb3761 100644 --- a/src/Utils/Shaders/shaderColorPerVertex.cpp +++ b/src/Utils/Shaders/shaderColorPerVertex.cpp @@ -57,6 +57,10 @@ std::string ShaderColorPerVertex::fragmentShaderText = ShaderColorPerVertex::ShaderColorPerVertex() { + m_nameVS = "ShaderColorPerVertex_vs"; + m_nameFS = "ShaderColorPerVertex_fs"; + m_nameGS = "ShaderColorPerVertex_gs"; + std::string glxvert(*GLSLShader::DEFINES_GL); glxvert.append(vertexShaderText); diff --git a/src/Utils/Shaders/shaderPhong.cpp b/src/Utils/Shaders/shaderPhong.cpp index 8f734094..84053d14 100644 --- a/src/Utils/Shaders/shaderPhong.cpp +++ b/src/Utils/Shaders/shaderPhong.cpp @@ -111,6 +111,11 @@ ShaderPhong::ShaderPhong(bool doubleSided): m_vboNormal(NULL), m_vboColor(NULL) { + + m_nameVS = "ShaderPhong_vs"; + m_nameFS = "ShaderPhong_fs"; + m_nameGS = "ShaderPhong_gs"; + // get choose GL defines (2 or 3) // ans compile shaders std::string glxvert(*GLSLShader::DEFINES_GL); diff --git a/src/Utils/Shaders/shaderVectorPerVertex.cpp b/src/Utils/Shaders/shaderVectorPerVertex.cpp index 127d00ad..80480039 100644 --- a/src/Utils/Shaders/shaderVectorPerVertex.cpp +++ b/src/Utils/Shaders/shaderVectorPerVertex.cpp @@ -71,6 +71,11 @@ ShaderVectorPerVertex::ShaderVectorPerVertex() : m_scale(1.0f), m_color(Geom::Vec4f(1.0f, 0.0f, 0.0f, 0.0f)) { + + m_nameVS = "ShaderVectorPerVertex_vs"; + m_nameFS = "ShaderVectorPerVertex_fs"; + m_nameGS = "ShaderVectorPerVertex_gs"; + std::string glxvert(*GLSLShader::DEFINES_GL); glxvert.append(vertexShaderText); -- GitLab