summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/triangle.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/triangle.scm b/examples/triangle.scm
index 2debc85..945cbce 100644
--- a/examples/triangle.scm
+++ b/examples/triangle.scm
@@ -11,9 +11,9 @@
(define (load)
(define verts
- (make-buffer #f32(0.0 0.0
- 640.0 0.0
- 320.0 480.0)))
+ (make-buffer #f32(-1.0 -1.0
+ 1.0 -1.0
+ 0.0 1.0)))
(define colors
(make-buffer #f32(1.0 0.0 0.0 1.0
0.0 1.0 0.0 1.0
@@ -52,11 +52,10 @@ varying vec4 fragColor;
#else
out vec4 fragColor;
#endif
-uniform mat4 mvp;
void main(void) {
fragColor = color;
- gl_Position = mvp * vec4(position, 0.0, 1.0);
+ gl_Position = vec4(position, 0.0, 1.0);
}
"
"
@@ -79,6 +78,6 @@ void main (void) {
")))
(define (draw alpha)
- (shader-apply shader vertex-array #:mvp (current-projection)))
+ (shader-apply shader vertex-array))
(run-game #:load load #:draw draw)