Browse Source

Shaders: don't use explicit attribute location on GL 2.1.

pull/7/head
Vladimír Vondruš 13 years ago
parent
commit
a22bf1bf4e
  1. 3
      src/Shaders/FlatShader.cpp
  2. 3
      src/Shaders/PhongShader.cpp
  3. 3
      src/Shaders/TextShader.cpp
  4. 3
      src/Shaders/VertexColorShader.cpp

3
src/Shaders/FlatShader.cpp

@ -56,7 +56,8 @@ template<std::uint8_t dimensions> FlatShader<dimensions>::FlatShader(): transfor
attachShader(fragmentShader);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>()) {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>() ||
Context::current()->version() == Version::GL210) {
#else
if(!Context::current()->isVersionSupported(Version::GLES300)) {
#endif

3
src/Shaders/PhongShader.cpp

@ -42,7 +42,8 @@ PhongShader::PhongShader(): transformationMatrixUniform(0), projectionMatrixUnif
attachShader(fragmentShader);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>()) {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>() ||
Context::current()->version() == Version::GL210) {
#else
if(!Context::current()->isVersionSupported(Version::GLES300)) {
#endif

3
src/Shaders/TextShader.cpp

@ -57,7 +57,8 @@ template<std::uint8_t dimensions> TextShader<dimensions>::TextShader(): transfor
AbstractTextShader<dimensions>::attachShader(fragmentShader);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>()) {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>() ||
Context::current()->version() == Version::GL210) {
#else
if(!Context::current()->isVersionSupported(Version::GLES300)) {
#endif

3
src/Shaders/VertexColorShader.cpp

@ -48,7 +48,8 @@ template<std::uint8_t dimensions> VertexColorShader<dimensions>::VertexColorShad
attachShader(fragmentShader);
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>()) {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>() ||
Context::current()->version() == Version::GL210) {
#else
if(!Context::current()->isVersionSupported(Version::GLES300)) {
#endif

Loading…
Cancel
Save