exception Invalid_context of string
Raised when trying to perform an invalid state change (for example, binding a texture to an invalid texture unit)
This module encapsulates a copy of the internal GL context. This allows efficient optimizations of state changes.
To get an instance of a Context.t, create a GL context (via a window) and use Window.context
exception Invalid_context of string
type capabilities = {max_3D_texture_size : int; max_array_texture_layers : int; max_color_texture_samples : int; max_cube_map_texture_size : int; max_depth_texture_samples : int; max_elements_indices : int; max_elements_vertices : int; max_integer_samples : int; max_renderbuffer_size : int; max_texture_buffer_size : int; max_texture_image_units : int; max_texture_size : int; max_color_attachments : int}
max_3D_texture_size : int
|
Maximal 3D texture size |
max_array_texture_layers : int
|
Maximal number of layers in a texture array |
max_color_texture_samples : int
|
Maximal number of samples in a multisampled color texture |
max_cube_map_texture_size : int
|
Maximal cubemap texture size |
max_depth_texture_samples : int
|
Maximal number of samples in a multisampled depth texture |
max_elements_indices : int
|
Maximal number of indices in an element buffer |
max_elements_vertices : int
|
Maximal number of vertices in an element buffer |
max_integer_samples : int
|
Maximal number of samples in a multisampled integer texture |
max_renderbuffer_size : int
|
Maximal size of a renderbuffer |
max_texture_buffer_size : int
|
Maximal size of a texture buffer |
max_texture_image_units : int
|
Number of available texture units |
max_texture_size : int
|
Maximal size of a texture |
max_color_attachments : int
|
Maximal number of color attachments in a framebuffer |
type t
val capabilities : t -> capabilities
val version : t -> (int * int)
val is_version_supported : t -> (int * int) -> bool
val glsl_version : t -> int
val is_glsl_version_supported : t -> int -> bool
val assert_no_error : t -> unit
val flush : t -> unit
val finish : t -> unit