Browse Source

Shaders: set MeshVisualizer::VertexIndex attribute location to 3.

Locations 0, 1 and 2 will be reserved for positions, texture coordinates
and normals.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
5542f82d9f
  1. 2
      src/Shaders/MeshVisualizer.h
  2. 2
      src/Shaders/MeshVisualizer.vert

2
src/Shaders/MeshVisualizer.h

@ -77,7 +77,7 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
* OpenGL 3.1, OpenGL ES 3.0 and newer this value is provided by the * OpenGL 3.1, OpenGL ES 3.0 and newer this value is provided by the
* shader itself, so the attribute is not needed. * shader itself, so the attribute is not needed.
*/ */
typedef Attribute<1, Float> VertexIndex; typedef Attribute<3, Float> VertexIndex;
/** /**
* @brief %Flag * @brief %Flag

2
src/Shaders/MeshVisualizer.vert

@ -42,7 +42,7 @@ in highp vec4 position;
#if defined(WIREFRAME_RENDERING) && defined(NO_GEOMETRY_SHADER) #if defined(WIREFRAME_RENDERING) && defined(NO_GEOMETRY_SHADER)
#if (!defined(GL_ES) && __VERSION__ < 140) || (defined(GL_ES) && __VERSION__ < 300) #if (!defined(GL_ES) && __VERSION__ < 140) || (defined(GL_ES) && __VERSION__ < 300)
#ifdef EXPLICIT_ATTRIB_LOCATION #ifdef EXPLICIT_ATTRIB_LOCATION
layout(location = 1) in lowp float vertexIndex; layout(location = 3) in lowp float vertexIndex;
#else #else
in lowp float vertexIndex; in lowp float vertexIndex;
#endif #endif

Loading…
Cancel
Save