derelict-gl3 2.0.0-beta.4

A dynamic binding to the OpenGL library.

To use this package, put the following dependency into your project's dependencies section:



A dynamic binding to OpenGL for the D Programming Language.

Please see the sections on Compiling and Linking in the Derelict documentation for information on how to build DerelictGL3. DerelictGL3 differs from the other Derelict packages in that there is a two-step load process which is used to mask some platform differences in how the graphics drivers are managed. Everything in the section The Derelict Loader in the Derelict documentation still applies. The difference is that DerelictGL3.load(), unlike its behavior in the other bindings, does not load the entire library; it only loads the functions for OpenGL versions 1.0 and 1.1. Once a context has been created, DerelictGL3.reload() should be called. This will load all available versions 1.2+ and all supported ARB and EXT extensions. reload should also be called any time the OpenGL context is switched. The load method can be called before or after creating a context, but should always be called before the first call to reload and does not need to be called on a context switch.

By default, the DerelictGL3 loader will only load core OpenGL functions and will not load any of the deprecated API or extensions. Here's some sample code.

// For core API functions.
import derelict.opengl;

void main() {
    // Load OpenGL versions 1.0 and 1.1.

    // Create an OpenGL context with another library (like SDL 2 or GLFW 3)

    // Load versions 1.2+ and all supported ARB and EXT extensions.

    // Now OpenGL functions can be called.

DerelictGL3 supports a compile-time configurable API. It can be used to restrict compiled OpenGL symbols to a specific version. For example, the above snippet compiles all supported core OpenGL symbols up to version 4.5 into the binary and the loader will attempt to load them all, but with the compile-time configuration options can be restricted to OpenGL 2.1, or 3.3, or any other supported version. It is also the only way to make deprecated symbols and extensions available. See the DerelictGL3 documentation for details.

Mike Parker
2.0.0-beta.4 2017-Aug-28
2.0.0-beta.3 2017-Jul-30
2.0.0-beta.2 2017-Jul-18
2.0.0-beta.1 2017-Jun-04
2.0.0-alpha.5 2017-Feb-06
Show all 37 versions
Download Stats:
  • 239 downloads today

  • 1486 downloads this week

  • 7253 downloads this month

  • 56994 downloads total