Module Osg.State_set


module State_set: sig .. end
Stores a set of modes and attributes which respresent a set of OpenGL state. Notice that a State_set contains just a subset of the whole OpenGL state.

In OSG, each Osg.Drawable and each Osg.Node has a reference to a Osg.State_set. These State_sets can be shared between different Drawables and Nodes (that is, several Drawables and Nodes can reference the same Osg.State_set. Indeed, this practice is recommended whenever possible, as this minimizes expensive state changes in the graphics pipeline.


type t 
osg::StateSet holder.
val clone : t -> t
The same as new osg::StateSet( *basicStateSet ), useful if you want to change state set which is shared by several drawables and don't want other drawables to be changed.
val set_attribute : t ->
Osg.State_attribute.t -> Osg.State_attribute.values list -> unit
Set this Osg.State_set to contain specified attribute and override flag.
val set_attribute_and_modes : t ->
Osg.State_attribute.t -> Osg.State_attribute.values list -> unit
Set this Osg.State_set to contain specified attribute and set the associated GLMode's to specified value.
val set_texture_attribute_and_modes : t ->
int -> Osg.State_attribute.t -> Osg.State_attribute.values list -> unit
Set this Osg.State_set to contain specified texture attribute and set the associated GLMode's to specified value.
val add_uniform : t ->
'a Osg.Uniform.t -> Osg.State_attribute.values list -> unit
Set this StateSet to contain specified uniform and override flag.
val remove_uniform : t -> 'a Osg.Uniform.t -> unit
remove uniform from StateSet.
val gl_LIGHTING : int
TODO: make this less ad-hoc
val gl_POLYGON_OFFSET_POINT : int
val gl_POLYGON_OFFSET_LINE : int
val gl_POLYGON_OFFSET_FILL : int
val set_mode : t -> int -> Osg.State_attribute.values list -> unit
val set_render_bin_details : t -> int -> string -> unit
set_render_bin_details state_set bin_num bin_name