Browse Source

Shaders: have a definition for the generic color attribute.

pull/338/head
Vladimír Vondruš 7 years ago
parent
commit
b1ecff0052
  1. 2
      src/Magnum/Shaders/Generic.h
  2. 2
      src/Magnum/Shaders/VertexColor2D.vert
  3. 2
      src/Magnum/Shaders/VertexColor3D.vert
  4. 3
      src/Magnum/Shaders/generic.glsl

2
src/Magnum/Shaders/Generic.h

@ -45,6 +45,8 @@ See @ref shaders-generic for more information.
template<UnsignedInt> struct Generic;
#else
template<UnsignedInt dimensions> struct Generic {
/* Keep consistent with generic.glsl and the real definitions below */
/**
* @brief Vertex position
*

2
src/Magnum/Shaders/VertexColor2D.vert

@ -43,7 +43,7 @@ layout(location = POSITION_ATTRIBUTE_LOCATION)
in highp vec2 position;
#ifdef EXPLICIT_ATTRIB_LOCATION
layout(location = 3)
layout(location = COLOR_ATTRIBUTE_LOCATION)
#endif
in lowp vec4 color;

2
src/Magnum/Shaders/VertexColor3D.vert

@ -43,7 +43,7 @@ layout(location = POSITION_ATTRIBUTE_LOCATION)
in highp vec4 position;
#ifdef EXPLICIT_ATTRIB_LOCATION
layout(location = 3)
layout(location = COLOR_ATTRIBUTE_LOCATION)
#endif
in lowp vec4 color;

3
src/Magnum/Shaders/generic.glsl

@ -23,6 +23,9 @@
DEALINGS IN THE SOFTWARE.
*/
/* Keep consistent with Generic.h */
#define POSITION_ATTRIBUTE_LOCATION 0
#define TEXTURECOORDINATES_ATTRIBUTE_LOCATION 1
#define NORMAL_ATTRIBUTE_LOCATION 2
#define COLOR_ATTRIBUTE_LOCATION 3

Loading…
Cancel
Save