derelict-gl3 2.0.0-beta.8
A dynamic binding to the OpenGL library.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
DerelictGL3
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.
DerelictGL3.load();
// Create an OpenGL context with another library (like SDL 2 or GLFW 3)
...
// Load versions 1.2+ and all supported ARB and EXT extensions.
DerelictGL3.reload();
// 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.
- Registered by Mike Parker
- 2.0.0-beta.8 released 5 years ago
- DerelictOrg/DerelictGL3
- github.com/DerelictOrg/DerelictGL3
- Boost
- Authors:
- Dependencies:
- derelict-util
- Versions:
-
2.0.0-beta.8 2019-Mar-28 2.0.0-beta.7 2018-Sep-03 2.0.0-beta.6 2018-Mar-28 2.0.0-beta.5 2017-Dec-04 2.0.0-beta.4 2017-Aug-28 - Download Stats:
-
-
1 downloads today
-
3 downloads this week
-
17 downloads this month
-
113723 downloads total
-
- Score:
- 2.8
- Short URL:
- derelict-gl3.dub.pm