Raised when trying to perform an invalid state change (for example, binding a texture to an invalid texture unit)
Module OgamlGraphics.Context
Encapsulates data about an OpenGL internal context 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
Rendering capabilities of a context
Record fields
Maximal 3D texture size | |
Maximal number of layers in a texture array | |
Maximal number of samples in a multisampled color texture | |
Maximal cubemap texture size | |
Maximal number of samples in a multisampled depth texture | |
Maximal number of indices in an element buffer | |
Maximal number of vertices in an element buffer | |
Maximal number of samples in a multisampled integer texture | |
Maximal size of a renderbuffer | |
Maximal size of a texture buffer | |
Number of available texture units | |
Maximal size of a texture | |
Maximal number of color attachments in a framebuffer |
Type of a GL context
Returns the rendering capabilities of a context
Returns the GL version supported by this context in (major, minor) format
Returns true iff the given GL version in (major, minor) format is supported by the given context
Returns the GLSL version supported by this context
Returns true iff the given GLSL version is supported by this context
Asserts that no openGL error occured internally. Used for debugging and testing.
Flushes the GL buffer
Finishes all pending actions