aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 45f9fc9..215ce03 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,22 @@
//! 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());
+//! }
+//! }
+//! ```
+//!
//! [OpenGL API and Extension Registry]: https://github.com/KhronosGroup/OpenGL-Registry
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![deny(clippy::all, clippy::pedantic, missing_docs)]