Module Osg.Program


module Program: sig .. end
Osg.Program is an application-level abstraction of an OpenGL program.

It is an Osg.State_attribute that, when applied, will activate a glProgram for subsequent rendering. Osg.Shaders containing the actual shader source code are attached to a Osg.Program, which will then manage the compilation, linking, and activation of the GLSL program. Osg.Program will automatically manage per-context instancing of the OpenGL glPrograms, if that is necessary for a particular display configuration.


type t 
osg::Program holder
val create' : unit -> t
val to_state_attribute : t -> Osg.State_attribute.t
val add_shader : t -> Osg.Shader.t -> unit
val create : Osg.Shader.t list -> Osg.State_attribute.t