diff options
author | HampusM <hampus@hampusmat.com> | 2023-03-05 21:45:51 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-03-05 21:45:51 +0100 |
commit | 0f941eaab3ecf2a7e07c13cf1acfb139f25df189 (patch) | |
tree | c5cef00555a1c478117a498339360ea87734b540 /src/lib.rs | |
parent | 66f90122b44a6ebb75fa0df83c80dbfccf77a422 (diff) |
docs: add crate root documentation
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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)] |