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 *)
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. *)
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. *)
22 [< `byte
| `double
| `
float | `
int | `short
| `ubyte
| `uint
| `ushort
]
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. *)
36 [< `two
| `three
| `four
] -> [< `double
| `
float | `
int | `short
] Raw.t
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"
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
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