From 3c31519133d573b757e5b945384435f17e646386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 3 Mar 2013 23:22:11 +0100 Subject: [PATCH] Shaders: cleanup of VectorShader. Using this-> for accessing parent class members breaks KDevelop autocompletion, using explicit class name instead (but the shorter one). --- src/Shaders/VectorShader.cpp | 16 ++++++++-------- src/Shaders/VectorShader.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Shaders/VectorShader.cpp b/src/Shaders/VectorShader.cpp index f3c563b59..da1706824 100644 --- a/src/Shaders/VectorShader.cpp +++ b/src/Shaders/VectorShader.cpp @@ -41,12 +41,12 @@ template VectorShader::VectorShader(): trans Shader vertexShader(v, Shader::Type::Vertex); vertexShader.addSource(rs.get("compatibility.glsl")); vertexShader.addSource(rs.get(vertexShaderName())); - AbstractVectorShader::attachShader(vertexShader); + AbstractShaderProgram::attachShader(vertexShader); Shader fragmentShader(v, Shader::Type::Fragment); fragmentShader.addSource(rs.get("compatibility.glsl")); fragmentShader.addSource(rs.get("VectorShader.frag")); - AbstractVectorShader::attachShader(fragmentShader); + AbstractShaderProgram::attachShader(fragmentShader); #ifndef MAGNUM_TARGET_GLES if(!Context::current()->isExtensionSupported() || @@ -54,24 +54,24 @@ template VectorShader::VectorShader(): trans #else if(!Context::current()->isVersionSupported(Version::GLES300)) { #endif - AbstractVectorShader::bindAttributeLocation(AbstractVectorShader::Position::Location, "position"); - AbstractVectorShader::bindAttributeLocation(AbstractVectorShader::TextureCoordinates::Location, "textureCoordinates"); + AbstractShaderProgram::bindAttributeLocation(AbstractVectorShader::Position::Location, "position"); + AbstractShaderProgram::bindAttributeLocation(AbstractVectorShader::TextureCoordinates::Location, "textureCoordinates"); } - AbstractVectorShader::link(); + AbstractShaderProgram::link(); #ifndef MAGNUM_TARGET_GLES if(!Context::current()->isExtensionSupported()) { #else { #endif - transformationProjectionMatrixUniform = AbstractVectorShader::uniformLocation("transformationProjectionMatrix"); - colorUniform = AbstractVectorShader::uniformLocation("color"); + transformationProjectionMatrixUniform = AbstractShaderProgram::uniformLocation("transformationProjectionMatrix"); + colorUniform = AbstractShaderProgram::uniformLocation("color"); } #ifndef MAGNUM_TARGET_GLES if(!Context::current()->isExtensionSupported()) - AbstractVectorShader::setUniform(AbstractVectorShader::uniformLocation("vectorTexture"), AbstractVectorShader::VectorTextureLayer); + AbstractShaderProgram::setUniform(AbstractShaderProgram::uniformLocation("vectorTexture"), AbstractVectorShader::VectorTextureLayer); #endif } diff --git a/src/Shaders/VectorShader.h b/src/Shaders/VectorShader.h index b116803fa..2c17989f2 100644 --- a/src/Shaders/VectorShader.h +++ b/src/Shaders/VectorShader.h @@ -38,13 +38,13 @@ template class MAGNUM_SHADERS_EXPORT VectorShader: publi /** @brief Set transformation and projection matrix */ inline VectorShader* setTransformationProjectionMatrix(const typename DimensionTraits::MatrixType& matrix) { - AbstractVectorShader::setUniform(transformationProjectionMatrixUniform, matrix); + AbstractShaderProgram::setUniform(transformationProjectionMatrixUniform, matrix); return this; } /** @brief Set fill color */ inline VectorShader* setColor(const Color4<>& color) { - AbstractVectorShader::setUniform(colorUniform, color); + AbstractShaderProgram::setUniform(colorUniform, color); return this; }