Module VertArray


module VertArray: sig .. end

Vertex Arrays




Vertex Array specs

type client_state =
| GL_COLOR_ARRAY
| GL_EDGE_FLAG_ARRAY
| GL_FOG_COORD_ARRAY
| GL_INDEX_ARRAY
| GL_NORMAL_ARRAY
| GL_SECONDARY_COLOR_ARRAY
| GL_TEXTURE_COORD_ARRAY
| GL_VERTEX_ARRAY
val glEnableClientState : client_state:client_state -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
val glDisableClientState : client_state:client_state -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
val glDrawArrays : mode:GL.primitive -> first:int -> count:int -> unit
manual page on opengl.org
val glMultiDrawArrays : mode:int -> arr:(int * int) array -> unit
manual page on opengl.org
val glArrayElement : i:int -> unit
manual page on opengl.org
module Elem: sig .. end
val glDrawElements : mode:GL.primitive ->
count:int ->
data_type:Elem.elem_data_type ->
data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
manual page on opengl.org
val glDrawRangeElements : mode:GL.primitive ->
start:int ->
end_:int ->
count:int ->
data_type:Elem.elem_data_type ->
data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
manual page on opengl.org

type interleaved_format =
| GL_V2F
| GL_V3F
| GL_C4UB_V2F
| GL_C4UB_V3F
| GL_C3F_V3F
| GL_N3F_V3F
| GL_C4F_N3F_V3F
| GL_T2F_V3F
| GL_T4F_V4F
| GL_T2F_C4UB_V3F
| GL_T2F_C3F_V3F
| GL_T2F_N3F_V3F
| GL_T2F_C4F_N3F_V3F
| GL_T4F_C4F_N3F_V4F
val glInterleavedArrays : fmt:interleaved_format ->
stride:int -> pointer:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
module Coord: sig .. end
val glVertexPointer : size:int ->
data_type:Coord.coord_data_type ->
stride:int -> data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
val glTexCoordPointer : size:int ->
data_type:Coord.coord_data_type ->
stride:int -> data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
module Norm: sig .. end
val glNormalPointer : data_type:Norm.norm_data_type ->
stride:int -> data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
module Index: sig .. end
val glIndexPointer : data_type:Index.index_data_type ->
stride:int -> data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
module Color: sig .. end
val glColorPointer : size:int ->
data_type:Color.color_data_type ->
stride:int -> data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
val glEdgeFlagPointer : stride:int ->
data:('a, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t ->
unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
val glSecondaryColorPointer : size:int ->
data_type:Color.color_data_type ->
stride:int -> data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
Deprecated.in core OpenGL 3.
manual page on opengl.org
module VAttr: sig .. end
val glVertexAttribPointer : index:int ->
size:int ->
data_type:VAttr.vertattr_data_type ->
normalized:bool ->
stride:int -> data:('a, 'b, Bigarray.c_layout) Bigarray.Array1.t -> unit
manual page on opengl.org
val glVertexPointer0 : size:int -> data_type:Coord.coord_data_type -> stride:int -> unit
val glTexCoordPointer0 : size:int -> data_type:Coord.coord_data_type -> stride:int -> unit
val glColorPointer0 : size:int -> data_type:Color.color_data_type -> stride:int -> unit
val glSecondaryColorPointer0 : size:int -> data_type:Color.color_data_type -> stride:int -> unit
val glIndexPointer0 : data_type:Index.index_data_type -> stride:int -> unit
val glNormalPointer0 : data_type:Norm.norm_data_type -> stride:int -> unit
val glEdgeFlagPointer0 : stride:int -> unit
val glVertexAttribPointer0 : index:int ->
size:int ->
data_type:VAttr.vertattr_data_type ->
normalized:bool -> stride:int -> unit
val glDrawElements0 : mode:GL.primitive ->
count:int -> data_type:Elem.elem_data_type -> unit

All the gl*Pointer0 functions are the equivalent of the gl*Pointer functions except that the data argument is passed 0 to the C function, which is for use with VBOs.

It is also possible to achieve the same effect by passing an empty bigarray to the gl*Pointer functions, but the gl*Pointer0 functions are probably more handy.

val glVertexPointerOfs8 : size:int ->
data_type:Coord.coord_data_type -> stride:int -> ofs:int -> unit
val glVertexPointerOfs16 : size:int ->
data_type:Coord.coord_data_type -> stride:int -> ofs:int -> unit
val glVertexPointerOfs32 : size:int ->
data_type:Coord.coord_data_type -> stride:int -> ofs:int -> unit
val glIndexPointerOfs8 : data_type:Index.index_data_type -> stride:int -> ofs:int -> unit
val glIndexPointerOfs16 : data_type:Index.index_data_type -> stride:int -> ofs:int -> unit
val glIndexPointerOfs32 : data_type:Index.index_data_type -> stride:int -> ofs:int -> unit
val glTexCoordPointerOfs8 : size:int ->
data_type:Coord.coord_data_type -> stride:int -> ofs:int -> unit
val glTexCoordPointerOfs16 : size:int ->
data_type:Coord.coord_data_type -> stride:int -> ofs:int -> unit
val glTexCoordPointerOfs32 : size:int ->
data_type:Coord.coord_data_type -> stride:int -> ofs:int -> unit
val glColorPointerOfs8 : size:int ->
data_type:Color.color_data_type -> stride:int -> ofs:int -> unit
val glColorPointerOfs16 : size:int ->
data_type:Color.color_data_type -> stride:int -> ofs:int -> unit
val glColorPointerOfs32 : size:int ->
data_type:Color.color_data_type -> stride:int -> ofs:int -> unit
val glSecondaryColorPointerOfs8 : size:int -> data_type:Color.color_data_type -> stride:int -> unit
val glSecondaryColorPointerOfs16 : size:int -> data_type:Color.color_data_type -> stride:int -> unit
val glSecondaryColorPointerOfs32 : size:int -> data_type:Color.color_data_type -> stride:int -> unit
val glNormalPointerOfs8 : data_type:Norm.norm_data_type -> stride:int -> ofs:int -> unit
val glNormalPointerOfs16 : data_type:Norm.norm_data_type -> stride:int -> ofs:int -> unit
val glNormalPointerOfs32 : data_type:Norm.norm_data_type -> stride:int -> ofs:int -> unit
val glEdgeFlagPointerOfs8 : stride:int -> ofs:int -> unit
val glEdgeFlagPointerOfs16 : stride:int -> ofs:int -> unit
val glEdgeFlagPointerOfs32 : stride:int -> ofs:int -> unit
val glVertexAttribPointerOfs8 : index:int ->
size:int ->
data_type:VAttr.vertattr_data_type ->
normalized:bool -> stride:int -> ofs:int -> unit
val glVertexAttribPointerOfs16 : index:int ->
size:int ->
data_type:VAttr.vertattr_data_type ->
normalized:bool -> stride:int -> ofs:int -> unit
val glVertexAttribPointerOfs32 : index:int ->
size:int ->
data_type:VAttr.vertattr_data_type ->
normalized:bool -> stride:int -> ofs:int -> unit

All the gl*PointerOfs functions are the equivalent of the gl*Pointer0 functions but with pointer arithmetic (NULL + ofs), (for use with VBOs)

Pointer arithmetic depends of the size of the pointed data, so there are different versions of these functions for elements of size 8, 16 or 32 bits.

val glDrawElementsOfs8 : mode:GL.primitive ->
count:int -> data_type:Elem.elem_data_type -> ofs:int -> unit
val glDrawElementsOfs16 : mode:GL.primitive ->
count:int -> data_type:Elem.elem_data_type -> ofs:int -> unit
val glDrawElementsOfs32 : mode:GL.primitive ->
count:int -> data_type:Elem.elem_data_type -> ofs:int -> unit

VAO's


val glGenVertexArray : unit -> int
val glBindVertexArray : int -> unit
val glDeleteVertexArray : int -> unit
val glIsVertexArray : int -> bool