Browse Source

Shaders: set VertexColor::Color attribute location to 3.

Locations 0, 1 and 2 are reserved for positions, texture coordinates and
normals.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
4d68547cbe
  1. 2
      src/Shaders/VertexColor.h
  2. 2
      src/Shaders/VertexColor2D.vert
  3. 2
      src/Shaders/VertexColor3D.vert

2
src/Shaders/VertexColor.h

@ -50,7 +50,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColor: public
typedef Attribute<0, typename DimensionTraits<dimensions, Float>::VectorType> Position;
/** @brief Vertex color */
typedef Attribute<1, Color3> Color;
typedef Attribute<3, Color3> Color;
explicit VertexColor();

2
src/Shaders/VertexColor2D.vert

@ -39,7 +39,7 @@ uniform highp mat3 transformationProjectionMatrix;
#ifdef EXPLICIT_ATTRIB_LOCATION
layout(location = 0) in highp vec2 position;
layout(location = 1) in lowp vec3 color;
layout(location = 3) in lowp vec3 color;
#else
in highp vec2 position;
in lowp vec3 color;

2
src/Shaders/VertexColor3D.vert

@ -39,7 +39,7 @@ uniform highp mat4 transformationProjectionMatrix;
#ifdef EXPLICIT_ATTRIB_LOCATION
layout(location = 0) in highp vec4 position;
layout(location = 1) in lowp vec3 color;
layout(location = 3) in lowp vec3 color;
#else
in highp vec4 position;
in lowp vec3 color;

Loading…
Cancel
Save