From a22bf1bf4e16bebc65208582e1faa8761515196c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 20 Jan 2013 20:18:03 +0100 Subject: [PATCH] Shaders: don't use explicit attribute location on GL 2.1. --- src/Shaders/FlatShader.cpp | 3 ++- src/Shaders/PhongShader.cpp | 3 ++- src/Shaders/TextShader.cpp | 3 ++- src/Shaders/VertexColorShader.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Shaders/FlatShader.cpp b/src/Shaders/FlatShader.cpp index 0999fdd1d..e962e8f5f 100644 --- a/src/Shaders/FlatShader.cpp +++ b/src/Shaders/FlatShader.cpp @@ -56,7 +56,8 @@ template FlatShader::FlatShader(): transfor attachShader(fragmentShader); #ifndef MAGNUM_TARGET_GLES - if(!Context::current()->isExtensionSupported()) { + if(!Context::current()->isExtensionSupported() || + Context::current()->version() == Version::GL210) { #else if(!Context::current()->isVersionSupported(Version::GLES300)) { #endif diff --git a/src/Shaders/PhongShader.cpp b/src/Shaders/PhongShader.cpp index b069eedf8..aec592bdb 100644 --- a/src/Shaders/PhongShader.cpp +++ b/src/Shaders/PhongShader.cpp @@ -42,7 +42,8 @@ PhongShader::PhongShader(): transformationMatrixUniform(0), projectionMatrixUnif attachShader(fragmentShader); #ifndef MAGNUM_TARGET_GLES - if(!Context::current()->isExtensionSupported()) { + if(!Context::current()->isExtensionSupported() || + Context::current()->version() == Version::GL210) { #else if(!Context::current()->isVersionSupported(Version::GLES300)) { #endif diff --git a/src/Shaders/TextShader.cpp b/src/Shaders/TextShader.cpp index 4f38ba324..a5d9a950b 100644 --- a/src/Shaders/TextShader.cpp +++ b/src/Shaders/TextShader.cpp @@ -57,7 +57,8 @@ template TextShader::TextShader(): transfor AbstractTextShader::attachShader(fragmentShader); #ifndef MAGNUM_TARGET_GLES - if(!Context::current()->isExtensionSupported()) { + if(!Context::current()->isExtensionSupported() || + Context::current()->version() == Version::GL210) { #else if(!Context::current()->isVersionSupported(Version::GLES300)) { #endif diff --git a/src/Shaders/VertexColorShader.cpp b/src/Shaders/VertexColorShader.cpp index 67fcfde3b..e872a9fba 100644 --- a/src/Shaders/VertexColorShader.cpp +++ b/src/Shaders/VertexColorShader.cpp @@ -48,7 +48,8 @@ template VertexColorShader::VertexColorShad attachShader(fragmentShader); #ifndef MAGNUM_TARGET_GLES - if(!Context::current()->isExtensionSupported()) { + if(!Context::current()->isExtensionSupported() || + Context::current()->version() == Version::GL210) { #else if(!Context::current()->isVersionSupported(Version::GLES300)) { #endif