Revert "Reference macros without defining a function"
[llpp.git] / lablGL / glPix.mli
blob545f4fabcab4e9e5cef5e8e0d15d1f6f7044f7ef
1 (* $Id: glPix.mli,v 1.9 2004-12-02 02:01:16 garrigue Exp $ *)
3 (* An abstract type for pixmaps *)
5 type (+'a,+'b) t
7 val create :
8 ([< Gl.kind] as 'a) ->
9 format:([< Gl.format] as 'b) -> width:int -> height:int -> ('b, 'a) t
11 val of_raw :
12 ([< Gl.kind] as 'a) Raw.t ->
13 format:([< Gl.format] as 'b) -> width:int -> height:int -> ('b, 'a) t
14 val to_raw : ('a, 'b) t -> 'b Raw.t
15 val format : ('a, 'b) t -> 'a
16 val width : ('a, 'b) t -> int
17 val height : ('a, 'b) t -> int
18 val raw_pos : ([< Gl.format], [< Gl.kind]) t -> x:int -> y:int -> int
19 (* [raw_pos image :x :y] partially evaluates on [image] *)
21 (* openGL functions *)
23 val read :
24 x:int ->
25 y:int ->
26 width:int ->
27 height:int ->
28 format:([< Gl.format] as 'a) -> kind:([< Gl.kind] as 'b) -> ('a, 'b) t
30 type bitmap = ([`color_index], [`bitmap]) t
31 val bitmap :
32 bitmap -> orig:Gl.point2 -> move:Gl.point2 -> unit
34 val draw : ([< Gl.format], [< Gl.kind]) t -> unit
36 type map =
37 [`a_to_a|`b_to_b|`g_to_g|`i_to_a|`i_to_b
38 |`i_to_g|`i_to_i|`i_to_r|`r_to_r|`s_to_s]
39 val map : map -> [`float] Raw.t -> unit
41 type store_param = [
42 `pack_swap_bytes of bool
43 | `pack_lsb_first of bool
44 | `pack_row_length of int
45 | `pack_skip_pixels of int
46 | `pack_skip_rows of int
47 | `pack_alignment of int
48 | `unpack_swap_bytes of bool
49 | `unpack_lsb_first of bool
50 | `unpack_row_length of int
51 | `unpack_skip_pixels of int
52 | `unpack_skip_rows of int
53 | `unpack_alignment of int
55 val store : store_param -> unit
57 type transfer_param = [
58 `map_color of bool
59 | `map_stencil of bool
60 | `index_shift of int
61 | `index_offset of int
62 | `red_scale of float
63 | `red_bias of float
64 | `green_scale of float
65 | `green_bias of float
66 | `blue_scale of float
67 | `blue_bias of float
68 | `alpha_scale of float
69 | `alpha_bias of float
70 | `depth_scale of float
71 | `depth_bias of float
73 val transfer : transfer_param -> unit
75 val zoom : x:float -> y:float -> unit
76 val raster_pos : x:float -> y:float -> ?z:float -> ?w:float -> unit -> unit
78 val copy :
79 x:int ->
80 y:int -> width:int -> height:int -> buffer:[`color|`depth|`stencil] -> unit