Module OgamlGraphics.IndexArray

High-level wrapper around OpenGL index arrays

Submodules

Source Represents a source of indices

This modules provides a high-level and safe access to openGL index arrays. Index arrays can be passed to 3D rendering primitives and are used to render 3D models more efficiently.

type static
Phantom type for static index arrays
type dynamic
Phantom type for dynamic index arrays
type 'a t
Type of an index array (static or dynamic)
val static : (module RenderTarget.T with type t = 'a) -> 'a -> Source.t -> static t
Creates a static index array. A static array is faster but can not be modified after creation.
See : OgamlGraphics.IndexArray.Source
val dynamic : (module RenderTarget.T with type t = 'a) -> 'a -> Source.t -> dynamic t
Creates a dynamic index array that can be modified after creation.
See : OgamlGraphics.IndexArray.Source
val rebuild : dynamic t -> Source.t -> int -> unit
rebuild array src offset rebuilds array starting from the index at position offset using src .
The index array is modified in-place and is resized as needed.
See : OgamlGraphics.IndexArray.Source
val length : 'a t -> int
Returns the length of an index array