add buttonDrawObject and calls to successfully draw button

This commit is contained in:
2024-07-31 08:41:19 +01:00
parent b1b929e055
commit 5525725ef3
8 changed files with 98 additions and 11 deletions

View File

@@ -17,6 +17,27 @@ struct
\ 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\
\}"
val graphLines: Real32.real vector =
#[
(* x = ~0.95 *)