amend compiler error, and leave a couple of comments about drawText function

This commit is contained in:
2024-10-03 07:28:58 +01:00
parent e6298e7b61
commit c5913c5ccb
2 changed files with 4 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ struct
}
end
fun uploadText ({textVertexBuffer, ...}: draw_object, vec) =
fun uploadText ({textVertexBuffer, ...}: t, vec) =
let
val _ = Gles3.bindBuffer textVertexBuffer
val _ = Gles3.bufferData (vec, Vector.length vec, Gles3.STATIC_DRAW)
@@ -67,10 +67,13 @@ struct
if textDrawLength > 0 then
let
val _ = Gles3.bindBuffer textVertexBuffer
(* enable xy component from uploaded array *)
val _ = Gles3.vertexAttribPointer (0, 2, 5, 0)
val _ = Gles3.enableVertexAttribArray 0
(* enable rgb component from uploaded array *)
val _ = Gles3.vertexAttribPointer (1, 3, 5, 8)
val _ = Gles3.enableVertexAttribArray 1
val _ = Gles3.useProgram textProgram
val _ = Gles3.drawArrays (Gles3.TRIANGLES, 0, textDrawLength)
in

BIN
shf

Binary file not shown.