summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2018-06-25 04:30:14 -0400
committerDavid Thompson <davet@gnu.org>2018-06-25 04:30:14 -0400
commitdd35ec3c1a087ffe14367643c040f8012d9f70bc (patch)
treeaad1f2413ef3c195ba6ad7209e775556c5d89b4b
parentab6bea9c601e00cd63d81fa94ec177267e70c2e4 (diff)
Remove problematic OpenGL requirements.
Trying to force certain GL versions and other attributes has only caused problems for potential users thus far. Let's see how far we get by just removing this stuff. * chickadee/window.scm (open-window): Remove OpenGL settings. * chickadee/render/shapes.scm (draw-filled-rect, draw-line): Drop shader version from 330 to 130. * chickadee/render/sprite.scm (default-shader): Same.
-rw-r--r--chickadee/render/shapes.scm8
-rw-r--r--chickadee/render/sprite.scm4
-rw-r--r--chickadee/window.scm10
3 files changed, 6 insertions, 16 deletions
diff --git a/chickadee/render/shapes.scm b/chickadee/render/shapes.scm
index d2e2ca2..70efef1 100644
--- a/chickadee/render/shapes.scm
+++ b/chickadee/render/shapes.scm
@@ -55,7 +55,7 @@
(delay
(strings->shader
"
-#version 330
+#version 130
in vec2 position;
uniform mat4 mvp;
@@ -65,7 +65,7 @@ void main(void) {
}
"
"
-#version 330
+#version 130
in vec2 frag_tex;
uniform vec4 color;
@@ -129,7 +129,7 @@ void main (void) {
(delay
(strings->shader
"
-#version 330
+#version 130
in vec2 position;
in vec2 tex;
@@ -142,7 +142,7 @@ void main(void) {
}
"
"
-#version 330
+#version 130
in vec2 frag_tex;
uniform vec4 color;
diff --git a/chickadee/render/sprite.scm b/chickadee/render/sprite.scm
index 9e96fc7..067384b 100644
--- a/chickadee/render/sprite.scm
+++ b/chickadee/render/sprite.scm
@@ -37,7 +37,7 @@
(delay
(strings->shader
"
-#version 330
+#version 130
in vec2 position;
in vec2 tex;
@@ -50,7 +50,7 @@ void main(void) {
}
"
"
-#version 330
+#version 130
in vec2 frag_tex;
uniform sampler2D color_texture;
diff --git a/chickadee/window.scm b/chickadee/window.scm
index 7f138c1..9598402 100644
--- a/chickadee/window.scm
+++ b/chickadee/window.scm
@@ -42,16 +42,6 @@
(width 640)
(height 480)
fullscreen?)
- (sdl2:set-gl-attribute! 'context-major-version 3)
- (sdl2:set-gl-attribute! 'context-minor-version 3)
- (sdl2:set-gl-attribute! 'double-buffer 1)
- (sdl2:set-gl-attribute! 'depth-size 24)
- (sdl2:set-gl-attribute! 'red-size 8)
- (sdl2:set-gl-attribute! 'green-size 8)
- (sdl2:set-gl-attribute! 'blue-size 8)
- (sdl2:set-gl-attribute! 'alpha-size 8)
- (sdl2:set-gl-attribute! 'stencil-size 8)
- (sdl2:set-gl-attribute! 'retained-backing 0)
(let* ((sdl-window (sdl2:make-window #:opengl? #t
#:title title
#:size (list width height)