From 29a07c7d62219736091c7640ee1add5b70e8faf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 3 Jan 2013 00:12:50 +0100 Subject: [PATCH] GCC 4.6 compilation fixes. --- src/Platform/magnum-info.cpp | 1 + src/Renderbuffer.h | 4 ++-- src/Shaders/AbstractTextShader.h | 2 +- src/Shaders/FlatShader.cpp | 2 +- src/Shaders/FlatShader.h | 4 ++-- src/Shaders/PhongShader.cpp | 2 +- src/Shaders/PhongShader.h | 18 +++++++++--------- src/Shaders/TextShader.cpp | 2 +- src/Shaders/TextShader.h | 4 ++-- src/Shaders/VertexColorShader.cpp | 2 +- src/Shaders/VertexColorShader.h | 2 +- 11 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/Platform/magnum-info.cpp b/src/Platform/magnum-info.cpp index 01912273b..0cd691d6c 100644 --- a/src/Platform/magnum-info.cpp +++ b/src/Platform/magnum-info.cpp @@ -14,6 +14,7 @@ */ #include +#include #include "Context.h" #include "Platform/WindowlessGlxApplication.h" diff --git a/src/Renderbuffer.h b/src/Renderbuffer.h index 266bad113..10cc29f95 100644 --- a/src/Renderbuffer.h +++ b/src/Renderbuffer.h @@ -503,7 +503,7 @@ class MAGNUM_EXPORT Renderbuffer { * @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil} */ #ifdef MAGNUM_TARGET_GLES2 - Depth24Stencil8 = GL_DEPTH24_STENCIL8_OES, + Depth24Stencil8 = GL_DEPTH24_STENCIL8_OES #else Depth24Stencil8 = GL_DEPTH24_STENCIL8, @@ -513,7 +513,7 @@ class MAGNUM_EXPORT Renderbuffer { * @requires_gles30 Only integral depth textures are available in * OpenGL ES 2.0. */ - Depth32FStencil8 = GL_DEPTH32F_STENCIL8, + Depth32FStencil8 = GL_DEPTH32F_STENCIL8 #endif }; diff --git a/src/Shaders/AbstractTextShader.h b/src/Shaders/AbstractTextShader.h index 3310bbc58..e8604b21b 100644 --- a/src/Shaders/AbstractTextShader.h +++ b/src/Shaders/AbstractTextShader.h @@ -39,7 +39,7 @@ template class AbstractTextShader: public AbstractShade typedef Attribute<1, Vector2> TextureCoordinates; enum: GLint { - FontTextureLayer = 16, /**< @brief Layer for font texture */ + FontTextureLayer = 16 /**< @brief Layer for font texture */ }; ~AbstractTextShader() = 0; diff --git a/src/Shaders/FlatShader.cpp b/src/Shaders/FlatShader.cpp index aba54c0f3..0999fdd1d 100644 --- a/src/Shaders/FlatShader.cpp +++ b/src/Shaders/FlatShader.cpp @@ -36,7 +36,7 @@ namespace { }; } -template FlatShader::FlatShader() { +template FlatShader::FlatShader(): transformationProjectionMatrixUniform(0), colorUniform(1) { Corrade::Utility::Resource rs("MagnumShaders"); #ifndef MAGNUM_TARGET_GLES diff --git a/src/Shaders/FlatShader.h b/src/Shaders/FlatShader.h index 33ee62607..93a020a4a 100644 --- a/src/Shaders/FlatShader.h +++ b/src/Shaders/FlatShader.h @@ -61,8 +61,8 @@ template class MAGNUM_SHADERS_EXPORT FlatShader: public } private: - GLint transformationProjectionMatrixUniform = 0, - colorUniform = 1; + GLint transformationProjectionMatrixUniform, + colorUniform; }; /** @brief 2D flat shader */ diff --git a/src/Shaders/PhongShader.cpp b/src/Shaders/PhongShader.cpp index 638831d8e..b069eedf8 100644 --- a/src/Shaders/PhongShader.cpp +++ b/src/Shaders/PhongShader.cpp @@ -22,7 +22,7 @@ namespace Magnum { namespace Shaders { -PhongShader::PhongShader() { +PhongShader::PhongShader(): transformationMatrixUniform(0), projectionMatrixUniform(1), normalMatrixUniform(2), lightUniform(3), diffuseColorUniform(4), ambientColorUniform(5), specularColorUniform(6), lightColorUniform(7), shininessUniform(8) { Corrade::Utility::Resource rs("MagnumShaders"); #ifndef MAGNUM_TARGET_GLES diff --git a/src/Shaders/PhongShader.h b/src/Shaders/PhongShader.h index ff0d483cf..b37d93361 100644 --- a/src/Shaders/PhongShader.h +++ b/src/Shaders/PhongShader.h @@ -123,15 +123,15 @@ class MAGNUM_SHADERS_EXPORT PhongShader: public AbstractShaderProgram { } private: - GLint transformationMatrixUniform = 0, - projectionMatrixUniform = 1, - normalMatrixUniform = 2, - lightUniform = 3, - diffuseColorUniform = 4, - ambientColorUniform = 5, - specularColorUniform = 6, - lightColorUniform = 7, - shininessUniform = 8; + GLint transformationMatrixUniform, + projectionMatrixUniform, + normalMatrixUniform, + lightUniform, + diffuseColorUniform, + ambientColorUniform, + specularColorUniform, + lightColorUniform, + shininessUniform; }; }} diff --git a/src/Shaders/TextShader.cpp b/src/Shaders/TextShader.cpp index 69a61d762..4f38ba324 100644 --- a/src/Shaders/TextShader.cpp +++ b/src/Shaders/TextShader.cpp @@ -37,7 +37,7 @@ namespace { }; } -template TextShader::TextShader() { +template TextShader::TextShader(): transformationProjectionMatrixUniform(0), colorUniform(1) { Corrade::Utility::Resource rs("MagnumShaders"); #ifndef MAGNUM_TARGET_GLES diff --git a/src/Shaders/TextShader.h b/src/Shaders/TextShader.h index de2d06523..4b1819dbb 100644 --- a/src/Shaders/TextShader.h +++ b/src/Shaders/TextShader.h @@ -49,8 +49,8 @@ template class MAGNUM_SHADERS_EXPORT TextShader: public } private: - GLint transformationProjectionMatrixUniform = 0, - colorUniform = 1; + GLint transformationProjectionMatrixUniform, + colorUniform; }; /** @brief Two-dimensional text shader */ diff --git a/src/Shaders/VertexColorShader.cpp b/src/Shaders/VertexColorShader.cpp index b2a93b8e5..5a687c657 100644 --- a/src/Shaders/VertexColorShader.cpp +++ b/src/Shaders/VertexColorShader.cpp @@ -36,7 +36,7 @@ namespace { }; } -template VertexColorShader::VertexColorShader() { +template VertexColorShader::VertexColorShader(): transformationProjectionMatrixUniform(0) { Corrade::Utility::Resource rs("MagnumShaders"); #ifndef MAGNUM_TARGET_GLES diff --git a/src/Shaders/VertexColorShader.h b/src/Shaders/VertexColorShader.h index 061022a91..3ac86aaec 100644 --- a/src/Shaders/VertexColorShader.h +++ b/src/Shaders/VertexColorShader.h @@ -55,7 +55,7 @@ template class MAGNUM_SHADERS_EXPORT VertexColorShader: } private: - GLint transformationProjectionMatrixUniform = 0; + GLint transformationProjectionMatrixUniform; }; /** @brief 2D vertex color shader */