moggle.core.gl

Gives you access to all glFunctions, GL_CONSTANTS and GLtypes.

In debug mode, glGetError() is automatically checked before and after all calls to all glFunctions (except glGetError). Any errors are then thrown as an moggle.core.gl.GLError.

When not in debug mode, moggle.core.gl simply publicly imports the Derelict OpenGL modules.

Don't forget to call loadOpenGL() after you created your OpenGL context, or some glFunctions will still be null.

The Derelict library is used for OpenGL bindings.

Public Imports

derelict.opengl3.types
public import derelict.opengl3.types;
derelict.opengl3.constants
public import derelict.opengl3.constants;
derelict.opengl3.functions
public import derelict.opengl3.functions;
derelict.opengl3.arb
public import derelict.opengl3.arb;
derelict.opengl3.ext
public import derelict.opengl3.ext;

Members

Classes

GLError
class GLError

The error that is thrown when glGetError() indicates an error.

Functions

check_error
void check_error(string file, size_t line, string func)
Undocumented in source. Be warned that the author may not have intended to support it.
loadOpenGL
GLVersion loadOpenGL()

Call this after creating your OpenGL context.

wrap
auto wrap(ParameterTypeTuple!glSomething parameters, string file, size_t line)
Undocumented in source.

Templates

GL_type
template GL_type(T)

Get the GL_CONSTANT representing the type T.

Variables

constant_names
string[uint] constant_names;
Undocumented in source.

Meta