1 (* $Id: glFunc.ml,v 1.7 2000-04-12 07:40:23 garrigue Exp $ *)
5 external accum
: op
:[`accum
|`load
|`add
|`mult
|`return
] -> float -> unit
7 external alpha_func
: cmp_func
-> ref:clampf
-> unit = "ml_glAlphaFunc"
13 | `one_minus_dst_color
15 | `one_minus_src_alpha
17 | `one_minus_dst_alpha
24 | `one_minus_src_color
26 | `one_minus_src_alpha
28 | `one_minus_dst_alpha
30 external blend_func
: src
:sfactor
-> dst
:dfactor
-> unit = "ml_glBlendFunc"
32 external color_mask
: bool -> bool -> bool -> bool -> unit
34 let color_mask ?
(red
=false) ?
(green
=false) ?
(blue
=false) ?
(alpha
=false) ()=
35 color_mask red green blue alpha
37 external depth_func
: cmp_func
-> unit = "ml_glDepthFunc"
38 external depth_mask
: bool -> unit = "ml_glDepthMask"
39 external depth_range
: near
:float -> far
:float -> unit = "ml_glDepthRange"
42 [`none
|`front_left
|`front_right
|`back_left
|`back_right
43 |`front
|`back
|`left
|`right
|`front_and_back
|`aux
of int]
44 external draw_buffer
: draw_buffer
-> unit = "ml_glDrawBuffer"
46 external index_mask
: int -> unit = "ml_glIndexMask"
49 [`clear
|`set
|`copy
|`copy_inverted
|`noop
|`invert
|`And
|`nand
|`Or
|`nor
50 |`xor
|`equiv
|`and_reverse
|`and_inverted
|`or_reverse
|`or_inverted
]
51 external logic_op
: logic_op
-> unit = "ml_glLogicOp"
54 [`front_left
|`front_right
|`back_left
|`back_right
|`front
|`back
55 |`left
|`right
|`aux
of int]
56 external read_buffer
: read_buffer
-> unit = "ml_glReadBuffer"
58 external stencil_func
: cmp_func
-> ref:int -> mask
:int -> unit
60 external stencil_mask
: int -> unit = "ml_glStencilMask"
61 type stencil_op
= [`keep
|`zero
|`replace
|`incr
|`decr
|`invert
]
63 fail
:stencil_op
-> zfail
:stencil_op
-> zpass
:stencil_op
-> unit
65 let stencil_op ?
(fail
=`keep
) ?
(zfail
=`keep
) ?
(zpass
=`keep
) () =
66 stencil_op ~fail ~zfail ~zpass