Add 'dotscape/' from commit 'f306501a68a51b634e895c5fdac70788ae899d75'
git-subtree-dir: dotscape git-subtree-mainline:6b91d64fc3git-subtree-split:f306501a68
This commit is contained in:
45
dotscape/imperative-shell/constants.sml
Normal file
45
dotscape/imperative-shell/constants.sml
Normal file
@@ -0,0 +1,45 @@
|
||||
structure Constants =
|
||||
struct
|
||||
val windowWidth = 1000
|
||||
val windowHeight = 900
|
||||
val initialWidthClickPoints = 4
|
||||
val initialHeightClickPoints = 4
|
||||
|
||||
val graphVertexShaderString =
|
||||
"#version 300 es\n\
|
||||
\layout (location = 0) in vec2 apos;\n\
|
||||
\void main()\n\
|
||||
\{\n\
|
||||
\ gl_Position = vec4(apos.x, apos.y, 0.0f, 1.0f);\n\
|
||||
\}"
|
||||
|
||||
val graphFragmentShaderString =
|
||||
"#version 300 es\n\
|
||||
\precision mediump float;\n\
|
||||
\out vec4 FragColor;\n\
|
||||
\void main()\n\
|
||||
\{\n\
|
||||
\ FragColor = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n\
|
||||
\}"
|
||||
|
||||
val colouredVertexShaderString =
|
||||
"#version 300 es\n\
|
||||
\layout (location = 0) in vec2 apos;\n\
|
||||
\layout (location = 1) in vec3 col;\n\
|
||||
\out vec3 frag_col;\n\
|
||||
\void main()\n\
|
||||
\{\n\
|
||||
\ frag_col = col;\n\
|
||||
\ gl_Position = vec4(apos.x, apos.y, 0.0f, 1.0f);\n\
|
||||
\}"
|
||||
|
||||
val colouredFragmentShaderString =
|
||||
"#version 300 es\n\
|
||||
\precision mediump float;\n\
|
||||
\in vec3 frag_col;\n\
|
||||
\out vec4 FragColor;\n\
|
||||
\void main()\n\
|
||||
\{\n\
|
||||
\ FragColor = vec4(frag_col.x, frag_col.y, frag_col.z, 1.0f);\n\
|
||||
\}"
|
||||
end
|
||||
Reference in New Issue
Block a user