Joshua Moerman
14 years ago
4 changed files with 27 additions and 7 deletions
@ -1,9 +1,17 @@ |
|||||
varying vec4 color; |
varying vec4 color; |
||||
|
|
||||
|
uniform int button; |
||||
|
|
||||
void main( void ) { |
void main( void ) { |
||||
gl_Position = gl_Vertex; |
gl_Position = gl_Vertex; |
||||
gl_Position.xy /= vec2(800, 600)*0.5; |
gl_Position.xy /= vec2(800, 600)*0.5; |
||||
gl_Position.xy -= 1.0; |
gl_Position.xy -= 1.0; |
||||
gl_Position.y *= -1.0; |
gl_Position.y *= -1.0; |
||||
color = gl_Vertex; |
|
||||
|
if(button == 0) |
||||
|
color = vec4(1.0); |
||||
|
else if (button == 1) |
||||
|
color = vec4(0.0, 1.0, 1.0, 1.0); |
||||
|
else |
||||
|
color = vec4(0.0, 0.0, 1.0, 1.0); |
||||
} |
} |
||||
|
Reference in new issue