diff --git a/src/Magnum/Shaders/MeshVisualizer.frag b/src/Magnum/Shaders/MeshVisualizer.frag index 607348529..5c985ec14 100644 --- a/src/Magnum/Shaders/MeshVisualizer.frag +++ b/src/Magnum/Shaders/MeshVisualizer.frag @@ -36,6 +36,12 @@ #define layout(arg) #endif +/* This is needed also on desktop ES 3.0 emulation on NVidia 330.20 even though + fwidth() is part of GLSL ES 3.0 */ +#if defined(WIREFRAME_RENDERING) && defined(GL_ES) +#extension GL_OES_standard_derivatives : enable +#endif + #ifndef GL_ES layout(location = 2) uniform vec4 color = vec4(1.0, 1.0, 1.0, 1.0); #else @@ -64,12 +70,6 @@ in lowp vec3 barycentric; out lowp vec4 fragmentColor; #endif -/* This is needed also on desktop ES 3.0 emulation on NVidia 330.20 even though - fwidth() is part of GLSL ES 3.0 */ -#if defined(WIREFRAME_RENDERING) && defined(GL_ES) -#extension GL_OES_standard_derivatives : enable -#endif - void main() { #ifdef WIREFRAME_RENDERING #ifndef NO_GEOMETRY_SHADER