Skip to content

Commit fe37058

Browse files
committed
Update obsolete docs
1 parent d370e53 commit fe37058

File tree

2 files changed

+17
-45
lines changed

2 files changed

+17
-45
lines changed

gl_generator/README.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,6 @@ fn main() {
6868
The `build.rs` file will generate all the OpenGL functions in a file named,
6969
`bindings.rs` plus all enumerations, and all types in the `types` submodule.
7070

71-
### Arguments
72-
73-
- The type of loader to generate. Can be
74-
`gl_generator::StaticGenerator`, `gl_generator::StaticStructGenerator`,
75-
`gl_generator::StructGenerator`, or `gl_generator::GlobalGenerator`.
76-
- The API to generate. Can be `Gl`, `Gles1`, `Gles2`
77-
(GLES 2 or 3), `Wgl`, `Glx`, `Egl`.
78-
- The file which contains the bindings to parse. Can be `GL_XML` (for GL
79-
and GL ES), `GLX_XML`, `WGL_XML`, `EGL_XML`.
80-
- Extra extensions to include in the bindings. These are
81-
specified as a list of strings.
82-
- The requested API version. This is usually in the form
83-
`"major.minor"`.
84-
- The GL profile. Can be either `"core"` or `"compatibility"`. `"core"` will
85-
only include all functions supported by the
86-
requested version it self, while `"compatibility"` will include all the
87-
functions from previous versions as well.
88-
- The file to save the generated bindings to.
89-
9071
## Generator types
9172

9273
### Global generator

gl_generator/lib.rs

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
//! # gl_generator
16+
//! An OpenGL bindings generator. It defines a function named `generate_bindings` which can be
17+
//! used to generate all constants and functions of a given OpenGL version.
1718
//!
18-
//! `gl_generator` is an OpenGL bindings generator. It defines a function
19-
//! named `generate_bindings` which can be used to generate all constants
20-
//! and functions of a given OpenGL version.
21-
//!
22-
//! ## Example
19+
//! # Example
2320
//!
2421
//! In `build.rs`:
2522
//!
@@ -46,25 +43,7 @@
4643
//! include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs"));
4744
//! ```
4845
//!
49-
//! ## Arguments
50-
//!
51-
//! Each field can be specified at most once, or not at all. If the field is not
52-
//! specified, then a default value will be used.
53-
//!
54-
//! - `api`: The API to generate. Can be either `"gl"`, `"gles1"`, `"gles2"`,
55-
//! `"wgl"`, `"glx"`, `"egl"`. Defaults to `"gl"`.
56-
//! - `profile`: Can be either `"core"` or `"compatibility"`. Defaults to
57-
//! `"core"`. `"core"` will only include all functions supported by the
58-
//! requested version it self, while `"compatibility"` will include all the
59-
//! functions from previous versions as well.
60-
//! - `version`: The requested API version. This is usually in the form
61-
//! `"major.minor"`. Defaults to `"1.0"`
62-
//! - `generator`: The type of loader to generate. Can be either `"static"`,
63-
//! `"global"`, or `"struct"`. Defaults to `"static"`.
64-
//! - `extensions`: Extra extensions to include in the bindings. These are
65-
//! specified as a list of strings. Defaults to `[]`.
66-
//!
67-
//! ## About EGL
46+
//! # About EGL
6847
//!
6948
//! When you generate bindings for EGL, the following platform-specific types must be declared
7049
//! *at the same level where you include the bindings*:
@@ -102,7 +81,19 @@ pub mod generators;
10281
#[allow(dead_code)]
10382
pub mod registry;
10483

105-
/// Public function that generates Rust source code.
84+
/// Generate OpenGL bindings using the specified generator
85+
///
86+
/// # Arguments
87+
///
88+
/// - `generator`: The type of loader to generate.
89+
/// - `api`: The API to generate.
90+
/// - `profile`: Can be either `"core"` or `"compatibility"`. `"core"` will only include all
91+
/// functions supported by the requested version it self, while `"compatibility"` will include
92+
/// all the functions from previous versions as well.
93+
/// - `version`: The requested API version. This is usually in the form `"major.minor"`.
94+
/// - `extensions`: A list of extra extensions to include in the bindings.
95+
/// - `dest`: Where to write the generated rust source code to
96+
///
10697
pub fn generate_bindings<G, W>(generator: G, api: registry::Api, fallbacks: Fallbacks,
10798
extensions: Vec<String>, version: &str, profile: &str,
10899
dest: &mut W) -> io::Result<()> where G: Generator, W: io::Write

0 commit comments

Comments
 (0)