3 unstable releases
0.2.0 | Apr 2, 2023 |
---|---|
0.1.1 | Mar 5, 2023 |
0.1.0 | Mar 5, 2023 |
#810 in Graphics APIs
23 downloads per month
Used in opengl-registry-macros
230KB
1.5K
SLoC
OpenGL-Registry
Rust API for the OpenGL API and Extension Registry.
Features
include-xml
: Include the registry XML file as a&'static str
(Enabled by default)
Example usage
use opengl_registry::Registry;
let registry = Registry::retrieve().unwrap();
for command in registry.commands() {
println!("Command {}", command.prototype().name());
println!(" Return type: {}", command.prototype().return_type());
println!(" Parameters:");
for param in command.parameters() {
println!(" {} {}", param.get_type(), param.name());
}
}
lib.rs
:
Rust API for the OpenGL API and Extension Registry.
Usage
use opengl_registry::Registry;
let registry = Registry::retrieve().unwrap();
for command in registry.commands() {
println!("Command {}", command.prototype().name());
println!(" Return type: {}", command.prototype().return_type());
println!(" Parameters:");
for param in command.parameters() {
println!(" {} {}", param.get_type(), param.name());
}
}
Dependencies
~1.6–2.2MB
~40K SLoC