|
|
|
@ -41,21 +41,13 @@ template<UnsignedInt dimensions> FlatShader<dimensions>::FlatShader(): transform |
|
|
|
Corrade::Utility::Resource rs("MagnumShaders"); |
|
|
|
Corrade::Utility::Resource rs("MagnumShaders"); |
|
|
|
|
|
|
|
|
|
|
|
/* Weird bug in GCC 4.5 - cannot use initializer list here, although the
|
|
|
|
/* Weird bug in GCC 4.5 - cannot use initializer list here, although the
|
|
|
|
same thing works in PhongShader flawlessly*/ |
|
|
|
same thing works in PhongShader flawlessly */ |
|
|
|
#ifndef CORRADE_GCC45_COMPATIBILITY |
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
|
|
|
Version v = Context::current()->supportedVersion({Version::GL320, Version::GL210}); |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
Version v = Context::current()->supportedVersion({Version::GLES300, Version::GLES200}); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
std::initializer_list<Version> vs{Version::GL320, Version::GL210}; |
|
|
|
std::initializer_list<Version> vs{Version::GL320, Version::GL210}; |
|
|
|
#else |
|
|
|
#else |
|
|
|
std::initializer_list<Version> vs{Version::GLES300, Version::GLES200}; |
|
|
|
std::initializer_list<Version> vs{Version::GLES300, Version::GLES200}; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
Version v = Context::current()->supportedVersion(vs); |
|
|
|
Version v = Context::current()->supportedVersion(vs); |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Shader vertexShader(v, Shader::Type::Vertex); |
|
|
|
Shader vertexShader(v, Shader::Type::Vertex); |
|
|
|
vertexShader.addSource(rs.get("compatibility.glsl")); |
|
|
|
vertexShader.addSource(rs.get("compatibility.glsl")); |
|
|
|
|