Browse Source

Shaders: fix MeshVisualizer on ES.

The extension line must appear before any other non-preprocessor token.
pull/68/head
Vladimír Vondruš 12 years ago
parent
commit
c637002532
  1. 12
      src/Magnum/Shaders/MeshVisualizer.frag

12
src/Magnum/Shaders/MeshVisualizer.frag

@ -36,6 +36,12 @@
#define layout(arg) #define layout(arg)
#endif #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 #ifndef GL_ES
layout(location = 2) uniform vec4 color = vec4(1.0, 1.0, 1.0, 1.0); layout(location = 2) uniform vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
#else #else
@ -64,12 +70,6 @@ in lowp vec3 barycentric;
out lowp vec4 fragmentColor; out lowp vec4 fragmentColor;
#endif #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() { void main() {
#ifdef WIREFRAME_RENDERING #ifdef WIREFRAME_RENDERING
#ifndef NO_GEOMETRY_SHADER #ifndef NO_GEOMETRY_SHADER

Loading…
Cancel
Save