Ubuntu CI: make apt update before apt install
[llpp.git] / lablGL / glArray.mli
blob5cbbe3cb0e3274a51e1686b789cc2dcbe3d061da
1 (** Vertex array manipulation functions *)
2 (* $Id: glArray.mli,v 1.7 2008-10-25 02:22:58 garrigue Exp $ *)
4 (** The six different kinds for array *)
5 type kind =
6 [ `color | `edge_flag | `index | `normal | `texture_coord | `vertex ]
8 (** Tell openGL the address of the edgeFlag array.
9 Raw array must be static. *)
10 val edge_flag : [ `bitmap ] Raw.t -> unit
12 (** Tell openGL the address of the texCoor array
13 Raw array must be static. *)
14 val tex_coord :
15 [< `one | `two | `three | `four] ->
16 [< `double | `float | `int | `short ] Raw.t -> unit
18 (** Tell openGL the address of the color array
19 Raw array must be static. *)
20 val color :
21 [< `three | `four] ->
22 [< `byte | `double | `float | `int | `short | `ubyte | `uint | `ushort ]
23 Raw.t -> unit
25 (** Tell openGL the address of the index array
26 Raw array must be static. *)
27 val index : [< `double | `float | `int | `short | `ubyte ] Raw.t -> unit
29 (** Tell openGL the address of the normal array
30 Raw array must be static. *)
31 val normal : [< `byte | `double | `float | `int | `short ] Raw.t -> unit
33 (** Tell openGL the address of the vertex array
34 Raw array must be static. *)
35 val vertex :
36 [< `two | `three | `four] -> [< `double | `float | `int | `short ] Raw.t
37 -> unit
39 (** Tell openGL the address of to use the specified array
40 Raw array must be static. *)
41 external enable : kind -> unit = "ml_glEnableClientState"
43 (** Tell openGL the address of not to use the specified array
44 Raw array must be static. *)
45 external disable : kind -> unit = "ml_glDisableClientState"
47 (* GlArray.element i
48 sends to openGL the element i of all enabled arrays *)
49 external element : int -> unit = "ml_glArrayElement"
51 (* GlArray.draw_arrays shape i c
52 sends to openGL a GlDraw.begins shape and all the element from i to i+c-1
53 of all enabled arrays and finally do a GlDraw.ends () *)
54 external draw_arrays : GlDraw.shape -> first:int -> count:int -> unit
55 = "ml_glDrawArrays"
57 (* GlArray.draw_elements shape c tbl
58 sends to openGL a GlDraw.begins shape and all the element from tbl[0] to
59 tbl[c-1] of all enabled arrays and finally do a GlDraw.ends () *)
60 external draw_elements :
61 GlDraw.shape -> count:int -> [< `ubyte | `uint | `ushort ] Raw.t -> unit
62 = "ml_glDrawElements"