2024-07-28 14:22:17 +01:00
|
|
|
structure Constants =
|
|
|
|
|
struct
|
2024-08-03 02:31:35 +01:00
|
|
|
val windowWidth = 1000
|
2024-07-31 14:02:23 +01:00
|
|
|
val windowHeight = 900
|
|
|
|
|
|
2024-07-29 22:54:40 +01:00
|
|
|
val graphVertexShaderString =
|
2024-07-28 14:22:17 +01:00
|
|
|
"#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\
|
|
|
|
|
\}"
|
|
|
|
|
|
2024-07-29 22:54:40 +01:00
|
|
|
val graphFragmentShaderString =
|
2024-07-28 14:22:17 +01:00
|
|
|
"#version 300 es\n\
|
|
|
|
|
\precision mediump float;\n\
|
|
|
|
|
\out vec4 FragColor;\n\
|
|
|
|
|
\void main()\n\
|
|
|
|
|
\{\n\
|
2024-07-29 22:54:40 +01:00
|
|
|
\ FragColor = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n\
|
2024-07-30 11:17:19 +01:00
|
|
|
\}"
|
|
|
|
|
|
2024-07-31 08:41:19 +01:00
|
|
|
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\
|
|
|
|
|
\}"
|
|
|
|
|
|
2024-08-03 04:40:53 +01:00
|
|
|
(* Todo: fix. Currently an empty vector which is not desired result,
|
|
|
|
|
* but changing vector dynamically (through resizing) works as desired. *)
|
2024-08-03 02:31:35 +01:00
|
|
|
val graphLines: Real32.real vector =
|
2024-08-03 04:40:53 +01:00
|
|
|
Vector.fromList []
|
2024-07-28 14:22:17 +01:00
|
|
|
end
|