Module OgamlGraphics.DrawParameter

Encapsulates draw parameters used for rendering

Submodules

DepthTest Depth testing functions enumeration
BlendMode Blending modes manipulation
Viewport Viewports enumeration
PolygonMode Polygon modes enumeration
CullingMode Culling modes enumeration

This module encapsulates the data passed to the GPU when rendering. State changes are optimized such that calling a rendering primitive with the same parameters twice does not induce a state change.

type t
Type of a set of draw parameters
val make : ?culling:CullingMode.t -> ?polygon:PolygonMode.t -> ?depth_test:DepthTest.t -> ?depth_write:bool -> ?blend_mode:BlendMode.t -> ?viewport:Viewport.t -> ?antialiasing:bool -> unit -> t
Creates a set of draw parameters with the following options :
culling specifies which face should be culled (defaults to CullNone )
polygon specifies how to render polygons (defaults to DrawFill )
depth_test specifies the depth function to be used when rendering vertices (defaults to Less )
depth_write specifies whether depth should be written to the depth buffer (defaults to true )
blend_mode specifies the blending equation (defaults to BlendingMode.default )
viewport specifies the viewport (defaults to Full )
antialiasing specifies whether to activate AA or not (ignored if AA is not supported by the context, defaults to true )

See : OgamlGraphics.DrawParameter.CullingMode
See : OgamlGraphics.DrawParameter.PolygonMode
See : OgamlGraphics.DrawParameter.Viewport
See : OgamlGraphics.DrawParameter.BlendMode