summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-02-17 20:59:34 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-02-17 20:59:34 -0500
commit32c030c9fca7046b3a3edfa15584050251aeba4f (patch)
tree85533c1b52e362499d50aae26c10cde63f891999
parent384047cb491f9598cbc6290be34028ab188f5488 (diff)
Remove shader example.
* examples/Makefile.am (examples_DATA): Remove 'shader.scm'. (shaderdir, shader_DATA): Remove. * examples/shader.scm: Delete file. * examples/shaders/fragment-shader.glsl: Delete file. * examples/shaders/vertex-shader.glsl: Delete file.
-rw-r--r--examples/Makefile.am6
-rw-r--r--examples/shader.scm33
-rw-r--r--examples/shaders/fragment-shader.glsl7
-rw-r--r--examples/shaders/vertex-shader.glsl13
4 files changed, 0 insertions, 59 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index aa71173..319b359 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -4,7 +4,6 @@ examples_DATA = \
coroutine.scm \
font.scm \
particles.scm \
- shader.scm \
simple.scm \
tilemap.scm
@@ -15,8 +14,3 @@ image_DATA = \
images/princess.png \
images/stars.png \
images/tiles.png
-
-shaderdir = $(pkgdatadir)/examples/shaders
-shader_DATA = \
- shaders/vertex-shader.glsl \
- shaders/fragment-shader.glsl
diff --git a/examples/shader.scm b/examples/shader.scm
deleted file mode 100644
index 49893ad..0000000
--- a/examples/shader.scm
+++ /dev/null
@@ -1,33 +0,0 @@
-(use-modules (2d game)
- (2d shader)
- (2d sprite)
- (2d vector2)
- (2d window))
-
-(load "common.scm")
-
-(define vertex-shader
- (load-vertex-shader "shaders/vertex-shader.glsl"))
-(define fragment-shader
- (load-fragment-shader "shaders/fragment-shader.glsl"))
-(define program (make-shader-program vertex-shader fragment-shader))
-
-(define window-width 800)
-(define window-height 600)
-(define sprite
- (load-sprite "images/p1_front.png"
- #:position (vector2 (/ window-width 2)
- (/ window-height 2))))
-
-(define (draw dt alpha)
- (with-shader-program program
- ;; Shake the sprite around a bit.
- (uniforms ((angle (/ (random:uniform) 100)))
- (draw-sprite sprite))))
-
-(add-hook! draw-hook draw)
-
-(with-window (make-window #:title "Shaders"
- #:resolution (vector2 window-width
- window-height))
- (run-game-loop))
diff --git a/examples/shaders/fragment-shader.glsl b/examples/shaders/fragment-shader.glsl
deleted file mode 100644
index 9be52f0..0000000
--- a/examples/shaders/fragment-shader.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-#version 120
-
-uniform sampler2D color_texture;
-
-void main (void) {
- gl_FragColor = texture2D(color_texture, gl_TexCoord[0].st);
-}
diff --git a/examples/shaders/vertex-shader.glsl b/examples/shaders/vertex-shader.glsl
deleted file mode 100644
index 2a7a4a4..0000000
--- a/examples/shaders/vertex-shader.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-#version 120
-
-uniform float angle;
-
-void main(void) {
- mat4 RotationMatrix = mat4(cos(angle), -sin(angle), 0.0, 0.0,
- sin(angle), cos(angle), 0.0, 0.0,
- 0.0, 0.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, 1.0);
-
- gl_Position = gl_ModelViewProjectionMatrix * RotationMatrix * gl_Vertex;
- gl_TexCoord[0] = gl_MultiTexCoord0;
-}