diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-08 23:04:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-09 11:42:32 +0300 |
commit | 49aba83fa6f3393214919166c42fb55c5a9a7796 (patch) | |
tree | cfdb4484e6165e97bafdd44956a8c8bfd08f0650 /data/graphics/shaders/simple_vertex.glsl | |
parent | 7a0ce777e5d7e3c5ba562ea1c811c0c3cb17a976 (diff) | |
download | plus-49aba83fa6f3393214919166c42fb55c5a9a7796.tar.gz plus-49aba83fa6f3393214919166c42fb55c5a9a7796.tar.bz2 plus-49aba83fa6f3393214919166c42fb55c5a9a7796.tar.xz plus-49aba83fa6f3393214919166c42fb55c5a9a7796.zip |
Add basic shaders in modernopengl.
Add draw/fill rectangle functions.
Diffstat (limited to 'data/graphics/shaders/simple_vertex.glsl')
-rw-r--r-- | data/graphics/shaders/simple_vertex.glsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/data/graphics/shaders/simple_vertex.glsl b/data/graphics/shaders/simple_vertex.glsl index a26158e65..766fd5fe5 100644 --- a/data/graphics/shaders/simple_vertex.glsl +++ b/data/graphics/shaders/simple_vertex.glsl @@ -1,6 +1,7 @@ #version 150 core -in vec2 position; +in vec2 simplePos; +uniform vec2 screen; void main() { - gl_Position = vec4(position, 0.0, 1.0); + gl_Position = vec4(simplePos.x / screen.x - 1, 1 - simplePos.y / screen.y, 0.0, 1.0); } |