aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-03-05 21:46:08 +0100
committerHampusM <hampus@hampusmat.com>2023-03-05 21:46:08 +0100
commit3ca66b6d92b6664f6afabf9a93d9ad06756cc312 (patch)
tree35b7a227f3406ba9b4c52b242c023740beaffef0
parent0f941eaab3ecf2a7e07c13cf1acfb139f25df189 (diff)
docs: add readme
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6a370f9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+## OpenGL-Registry
+[![Latest Version](https://img.shields.io/crates/v/opengl-registry)](https://crates.io/crates/opengl-registry)
+[![Documentation](https://img.shields.io/docsrs/opengl-registry)](https://docs.rs/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
+```rust
+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());
+ }
+}
+```
+