exception Invalid_uniform of string
Raised when an error occurs while creating or when drawing using a uniform.
This module encapsulates a set of uniforms that can be passed to GLSL programs.
exception Invalid_uniform of string
type t
val empty : t
val vector3f : string -> OgamlMath.Vector3f.t -> t -> t
vector3f name vec set adds the uniform vec to set . the uniform should be refered to as name in a glsl program. Raises Invalid_uniform if name is already bound in set . Type : vec3.val vector2f : string -> OgamlMath.Vector2f.t -> t -> t
val vector3i : string -> OgamlMath.Vector3i.t -> t -> t
val vector2i : string -> OgamlMath.Vector2i.t -> t -> t
val int : string -> int -> t -> t
val float : string -> float -> t -> t
val matrix3D : string -> OgamlMath.Matrix3D.t -> t -> t
val matrix2D : string -> OgamlMath.Matrix2D.t -> t -> t
val color : string -> Color.t -> t -> t
val texture2D : string -> ?tex_unit:int -> Texture.Texture2D.t -> t -> t
tex_unit corresponds to the texture unit that is used to bind this texture. If not provided, it defaults to the next available unit. If no additional units are available, or if a unit is explicitly bound twice, drawing with the uniform will raise Invalid_uniform .Context.capabilities for the number of available units.val texture2Darray : string -> ?tex_unit:int -> Texture.Texture2DArray.t -> t -> t
val cubemap : string -> ?tex_unit:int -> Texture.Cubemap.t -> t -> t