Ubuntu CI: make apt update before apt install
[llpp.git] / lablGL / gl.mli
blob8d28c4098b9120fe9d69ca8d1b903a43ec57d5a9
1 (* $Id: gl.mli,v 1.23 2012-03-06 03:31:02 garrigue Exp $ *)
3 (* Exceptions *)
5 exception GLerror of string
7 (* Types common to all modules *)
9 type rgb = float * float * float
10 type rgba = float * float * float * float
12 type point2 = float * float
13 type point3 = float * float * float
14 type point4 = float * float * float * float
15 type vect3 = float * float *float
17 type clampf = float
18 type short = int
19 type kind = [`bitmap|`byte|`float|`int|`short|`ubyte|`uint|`ushort]
20 type real_kind = [`byte|`float|`int|`short|`ubyte|`uint|`ushort]
22 type format =
23 [`alpha|`bgr|`bgra|`blue|`color_index|`depth_component|`green|`luminance
24 |`luminance_alpha|`red|`rgb|`rgba|`stencil_index]
25 val format_size : [< format] -> int
27 type target =
28 [`color_4|`index|`normal|`texture_coord_1|`texture_coord_2|`texture_coord_3
29 |`texture_coord_4|`trim_2|`trim_3|`vertex_3|`vertex_4]
30 val target_size : [< target] -> int
32 type cmp_func =
33 [`always|`equal|`gequal|`greater|`lequal|`less|`never|`notequal]
34 type face = [`back|`both|`front]
36 (* Basic functions *)
38 val flush : unit -> unit
39 val finish : unit -> unit
41 type cap =
42 [`alpha_test|`auto_normal|`blend|`clip_plane0|`clip_plane1|`clip_plane2
43 |`clip_plane3|`clip_plane4|`clip_plane5|`color_material|`cull_face
44 |`depth_test|`dither|`fog|`light0|`light1|`light2|`light3|`light4|`light5
45 |`light6|`light7|`lighting|`line_smooth|`line_stipple
46 |`index_logic_op |`color_logic_op
47 |`map1_color_4|`map1_index|`map1_normal|`map1_texture_coord_1
48 |`map1_texture_coord_2|`map1_texture_coord_3|`map1_texture_coord_4
49 |`map1_vertex_3|`map1_vertex_4|`map2_color_4|`map2_index|`map2_normal
50 |`map2_texture_coord_1|`map2_texture_coord_2|`map2_texture_coord_3
51 |`map2_texture_coord_4|`map2_vertex_3|`map2_vertex_4|`normalize|`point_smooth
52 |`polygon_offset_fill|`polygon_offset_line|`polygon_offset_point
53 |`polygon_smooth|`polygon_stipple|`scissor_test|`stencil_test|`texture_1d
54 |`texture_2d|`texture_gen_q|`texture_gen_r|`texture_gen_s|`texture_gen_t]
55 val enable : cap -> unit
56 val disable : cap -> unit
57 val is_enabled : cap -> bool
59 type error =
60 [`no_error|`invalid_enum|`invalid_value|`invalid_operation
61 |`stack_overflow|`stack_underflow|`out_of_memory|`table_too_large]
62 val get_error : unit -> error
63 val raise_error : string -> unit
64 (* raise GLerror if there is a current error, otherwise do nothing *)