Skip to content

Commit

Permalink
Dropped glium-macros crate (#1994)
Browse files Browse the repository at this point in the history
* Rewritten glium-macros crate using proc-macros

* Dropped `macros` package as obsolete
  • Loading branch information
Cerber-Ursi committed Jun 4, 2022
1 parent cacb970 commit 3fe4d23
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 324 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/target
/Cargo.lock
/macros/target
/macros/Cargo.lock
/book/_book
/.vscode
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ Limitations:
internal compiler errors, one-hour compile time, etc. happen more often than in smaller
libraries.

- Rust plugins are not stable, so you will have to use macros such as
`implement_vertex!(MyStruct)` instead of `#[derive(GliumVertex)]`.
- Macros are yet work-in-progress; see
[`glium-derive`](https://github.com/glium/glium_derive) for details.
18 changes: 0 additions & 18 deletions macros/Cargo.toml

This file was deleted.

5 changes: 0 additions & 5 deletions macros/README.md

This file was deleted.

36 changes: 0 additions & 36 deletions macros/src/lib.rs

This file was deleted.

54 changes: 0 additions & 54 deletions macros/src/shaders.rs

This file was deleted.

75 changes: 0 additions & 75 deletions macros/src/uniforms.rs

This file was deleted.

97 changes: 0 additions & 97 deletions macros/src/vertex.rs

This file was deleted.

14 changes: 0 additions & 14 deletions macros/tests/shader.rs

This file was deleted.

16 changes: 0 additions & 16 deletions macros/tests/vertex.rs

This file was deleted.

7 changes: 2 additions & 5 deletions src/uniforms/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ A uniform is a global variable in your program. In order to draw something, you
give `glium` the values of all your uniforms. Objects that implement the `Uniform` trait are
here to do that.
There are two primary ways to do this. The first one is to create your own structure and put
the `#[uniforms]` attribute on it. See the `glium_macros` crate for more infos.
The second way is to use the `uniform!` macro provided by glium:
The currently preferred way to do this is to use the `uniform!` macro provided by glium:
```no_run
# use glium::uniform;
Expand All @@ -20,7 +17,7 @@ let uniforms = uniform! {
# }
```
In both situations, each field must implement the `UniformValue` trait.
Each field must implement the `UniformValue` trait for this to work.
## Samplers
Expand Down

0 comments on commit 3fe4d23

Please sign in to comment.