[−][src]Crate phosphorus
This is a fork of gl_generator.
Currently experimental.
Usage
First you create a Registry
, which describes the GL that you want to
use.
Next you call write_bindings
, and specify the [Generator
], which will
determines how you will actually interact with the specified GL API:
GlobalGenerator
: Stores all loaded GL functions instatic mut
orAtomicPtr
variables. This allows GL functions to be accessed globally. All functions are initially not loaded, and you must provide a loader function which takes*const c_char
null-terminated strings and produces*const c_void
function pointers. Depending on how you're accessing GL this will bewglGetProcAddress
orSDL_GL_GetProcAddress
or similar.StructGenerator
: Similar to the above, but it stores all loaded GL functions in a very large struct with one field per function pointer. This allows you to potentially access more than one GL driver in the same program, but is otherwise not very helpful.
Structs
Binding | |
Cmd | |
Enum | |
GlobalGenerator | Allows GL to be used globally once loaded. |
GlxOpcode | |
Group | |
Registry | |
StructGenerator |
Enums
Api | |
Fallbacks | |
Profile |