summaryrefslogtreecommitdiffstats
path: root/src/demos/instancedRendering/shader/triangles.vp
blob: 91cc6eff95b04213f343b72883abdd82fd95d42f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2014 JogAmp Community. All rights reserved.

#if __VERSION__ >= 130
  #define attribute in
  #define varying out
#endif

uniform mat4 mgl_PMatrix;
uniform mat4 mgl_MVMatrix[NO_OF_INSTANCE];
attribute vec3  mgl_Vertex; 
attribute vec4  mgl_Color; 
varying vec4    frontColor;
 
void main(void) { 
  frontColor = mgl_Color; 
  gl_Position = mgl_PMatrix * mgl_MVMatrix[gl_InstanceID] * vec4(mgl_Vertex, 1); 
}