module Uniform:sig..end
type'at ='a Lit.uniform
val name : 'a t -> stringname u is the name of uniform u.val value : 'a t -> 'avalue u is the value of uniform u.
Note Returns the zero of 'a if u is a builtin.
val set_value : 'a t -> 'a -> 'a t
val v : 'a t -> 'a -> 'a t
val set_to_model_to_world : Gg.m4 t -> Gg.m4 tval is_value_builtin : 'a Lit.uniform -> boolis_value_builtin u is true if u has its value
defined by the renderer.val pp : Format.formatter -> 'a Lit.uniform -> unitpp ppf u prints an unspecified representation of u on ppf.
TODO something must be said about GLSL ivec bvec etc.
val bool : string -> bool -> bool Lit.uniformbool n v is a boolean uniform named n with value v.val int : string -> int -> int Lit.uniformint n v is a integer uniform named n with value v.val float : string -> float -> float Lit.uniformfloat n v is a float uniform named n with value v.val v2 : string -> Gg.v2 -> Gg.v2 Lit.uniformv2 n v is a 2D vector uniform named n with value v.val v3 : string -> Gg.v3 -> Gg.v3 Lit.uniformv3 n v is a 3D vector uniform named n with value v.val v4 : string -> Gg.v4 -> Gg.v4 Lit.uniformv4 n v is a 4D vector uniform named n with value v.val m2 : string -> Gg.m2 -> Gg.m2 Lit.uniformm2 n v is a 2x2 matrix uniform named n with value v.val m3 : string -> Gg.m3 -> Gg.m3 Lit.uniformm3 n v is a 3x3 matrix uniform named n with value v.val m4 : string -> Gg.m4 -> Gg.m4 Lit.uniformm4 n v is a 4x4 matrix uniform named n with value v.val tex : string -> Lit.tex -> Lit.tex Lit.uniformtex n v is a sampler uniform named n with value v.
Those uniforms have their value automatically setup
by the renderer according to TODO.
val model_to_world : string -> Gg.m4 Lit.uniform
val model_to_view : string -> Gg.m4 Lit.uniform
val model_to_clip : string -> Gg.m4 Lit.uniform
val model_normal_to_view : string -> Gg.m3 Lit.uniform
val world_to_view : string -> Gg.m4 Lit.uniform
val world_to_clip : string -> Gg.m4 Lit.uniform
val view_to_clip : string -> Gg.m4 Lit.uniform
val viewport_o : string -> Gg.v2 Lit.uniformval viewport_size : string -> Gg.v2 Lit.uniformtypebuiltin =[ `Model_normal_to_view
| `Model_to_clip
| `Model_to_view
| `Model_to_world
| `View_to_clip
| `Viewport_o
| `Viewport_size
| `World_to_clip
| `World_to_view ]
typevalue_untyped =[ `Bool of bool
| `Builtin of builtin
| `Float of float
| `Int of int
| `M2 of Gg.m2
| `M3 of Gg.m3
| `M4 of Gg.m4
| `Tex of Lit.tex
| `V2 of Gg.v2
| `V3 of Gg.v3
| `V4 of Gg.v4 ]
type set
val empty : setempty is the empty set of uniforms.val is_empty : set -> boolis_empty s is true if s is empty.val add : set -> 'a Lit.uniform -> setadd s u is s with u added.val (+) : set -> 'a Lit.uniform -> set
val mem_named : set -> string -> boolmem_named s n is true if s has a uniform named n.val find : set -> 'a Lit.uniform -> value_untyped optionfind s u is the value of u in s (if any).val find_named : set -> string -> value_untyped optionfind s n is the value of a uniform named n (if any).val get : set -> 'a Lit.uniform -> value_untypedfind s u is the value of u in s.Invalid_argument if u is not in s.val get_named : set -> string -> value_untypedfind s u is the value of u in s.Invalid_argument if u is not in s.val fold : ('a -> string -> value_untyped -> 'a) ->
'a -> set -> 'afold f acc s folds f over the uniforms of s starting with acc.val pp_set : Format.formatter -> set -> unitpp_set ppf set prints an unspecified representation of s on
ppf.