Skip to content

Commit

Permalink
Update prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
nanoqsh committed Apr 29, 2024
1 parent 969b66f commit 84c7a3f
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 20 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ Also create a triangle mesh that we're going to draw:
```rust
// Create a mesh from vertices
let mesh = {
use dunge::mesh::MeshData;

const VERTS: MeshData<'static, Vert> = MeshData::from_verts(&[
Vert { pos: [-0.5, -0.5], col: [1., 0., 0.] },
Vert { pos: [ 0.5, -0.5], col: [0., 1., 0.] },
Expand Down
3 changes: 2 additions & 1 deletion dunge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ pub mod prelude {
//! The dunge prelude.
pub use crate::{
context::Context, shader::Shader, sl, types, Frame, Group, Instance, Options, Vertex,
context::Context, mesh::MeshData, sl, texture::TextureData, types, Frame, Group, Instance,
Options, Vertex,
};

#[cfg(feature = "winit")]
Expand Down
6 changes: 3 additions & 3 deletions dunge/tests/triangle_discard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ fn render() -> Result<(), Error> {
dunge::{
color::Rgba,
group::BoundTexture,
mesh::MeshData,
prelude::*,
sl::{self, Groups, InVertex, Out},
texture::{Filter, Sampler, TextureData},
Format, Group, Vertex,
texture::{Filter, Sampler},
Format,
},
glam::Vec2,
helpers::image::Image,
Expand Down
6 changes: 3 additions & 3 deletions dunge/tests/triangle_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ fn render() -> Result<(), Error> {
dunge::{
color::Rgba,
group::BoundTexture,
mesh::MeshData,
prelude::*,
sl::{self, Groups, InVertex, Out},
texture::{Filter, Sampler, TextureData},
Format, Group, Vertex,
texture::{Filter, Sampler},
Format,
},
glam::Vec2,
helpers::image::Image,
Expand Down
2 changes: 1 addition & 1 deletion dunge/tests/triangle_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ fn render() -> Result<(), Error> {
use {
dunge::{
color::Rgba,
prelude::*,
sl::{self, Index, Out},
texture::TextureData,
Format,
},
glam::Vec4,
Expand Down
4 changes: 2 additions & 2 deletions dunge/tests/triangle_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ fn render() -> Result<(), Error> {
dunge::{
color::Rgba,
instance::Row,
prelude::*,
sl::{self, InInstance, Index, Out},
texture::TextureData,
Format, Instance,
Format,
},
glam::Vec2,
helpers::image::Image,
Expand Down
5 changes: 2 additions & 3 deletions dunge/tests/triangle_vertex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ fn render() -> Result<(), Error> {
use {
dunge::{
color::Rgba,
mesh::MeshData,
prelude::*,
sl::{self, InVertex, Out},
texture::TextureData,
Format, Vertex,
Format,
},
glam::Vec2,
helpers::image::Image,
Expand Down
1 change: 0 additions & 1 deletion examples/cube/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pub fn run(window: dunge::window::Window) -> Result<(), Error> {
use dunge::{
color::Rgba,
glam::{Mat4, Quat, Vec3},
mesh::MeshData,
prelude::*,
sl::{Groups, InVertex, Out},
uniform::Uniform,
Expand Down
3 changes: 1 addition & 2 deletions examples/ssaa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ pub fn run(window: dunge::window::Window) -> Result<(), Error> {
color::Rgba,
glam::{Vec2, Vec4},
group::BoundTexture,
mesh::MeshData,
prelude::*,
sl::{Groups, InVertex, Index, Out},
texture::{DrawTexture, Filter, Sampler, TextureData},
texture::{DrawTexture, Filter, Sampler},
uniform::Uniform,
Format,
},
Expand Down
2 changes: 0 additions & 2 deletions examples/window/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ async fn run() -> Result<(), Error> {

// Create a mesh from vertices
let mesh = {
use dunge::mesh::MeshData;

const VERTS: MeshData<'static, Vert> = MeshData::from_verts(&[
Vert {
pos: [-0.5, -0.5],
Expand Down

0 comments on commit 84c7a3f

Please sign in to comment.