Allocate memory for texowners and texids at the same instant
[llpp.git] / lablGL / glTex.mli
bloba779b26a523457140c3ff5812fd5904b91bf4f2b
1 (* $Id: glTex.mli,v 1.8 2012-03-06 03:31:02 garrigue Exp $ *)
3 open Gl
5 val coord : s:float -> ?t:float -> ?r:float -> ?q:float -> unit -> unit
6 val coord2 : float * float -> unit
7 val coord3 : float * float * float -> unit
8 val coord4 : float * float * float * float -> unit
10 type env_param = [
11 `mode of [`modulate|`decal|`blend|`replace]
12 | `color of rgba]
13 val env : env_param -> unit
15 type coord = [`s|`t|`r|`q]
16 type gen_param = [
17 `mode of [`object_linear|`eye_linear|`sphere_map]
18 | `object_plane of point4
19 | `eye_plane of point4
21 val gen : coord:coord -> gen_param -> unit
23 type format =
24 [`color_index|`red|`green|`blue|`alpha|`rgb|`bgr|`rgba|`bgra
25 |`luminance|`luminance_alpha]
26 val image1d :
27 ?proxy:bool -> ?level:int -> ?internal:int -> ?border:bool ->
28 ([< format], [< kind]) GlPix.t -> unit
29 val image2d :
30 ?proxy:bool -> ?level:int -> ?internal:int -> ?border:bool ->
31 ([< format], [< kind]) GlPix.t -> unit
33 type filter =
34 [`nearest|`linear|`nearest_mipmap_nearest|`linear_mipmap_nearest
35 |`nearest_mipmap_linear|`linear_mipmap_linear]
36 type wrap = [`clamp|`repeat]
37 type parameter = [
38 `min_filter of filter
39 | `mag_filter of [`nearest|`linear]
40 | `wrap_s of wrap
41 | `wrap_t of wrap
42 | `border_color of rgba
43 | `priority of clampf
44 | `generate_mipmap of bool
46 val parameter : target:[`texture_1d|`texture_2d] -> parameter -> unit
48 type texture_id
49 val gen_texture : unit -> texture_id
50 val gen_textures : len:int -> texture_id array
51 val bind_texture : target:[`texture_1d|`texture_2d] -> texture_id -> unit
52 val delete_texture : texture_id -> unit
53 val delete_textures : texture_id array -> unit