From 84c7a3f43eb8471b7f341161d54bd5507dc02510 Mon Sep 17 00:00:00 2001 From: nanoqsh Date: Mon, 29 Apr 2024 20:43:42 +0500 Subject: [PATCH] Update prelude --- README.md | 2 -- dunge/src/lib.rs | 3 ++- dunge/tests/triangle_discard.rs | 6 +++--- dunge/tests/triangle_group.rs | 6 +++--- dunge/tests/triangle_index.rs | 2 +- dunge/tests/triangle_instance.rs | 4 ++-- dunge/tests/triangle_vertex.rs | 5 ++--- examples/cube/src/lib.rs | 1 - examples/ssaa/src/lib.rs | 3 +-- examples/window/src/main.rs | 2 -- 10 files changed, 14 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b29339a..4788504 100644 --- a/README.md +++ b/README.md @@ -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.] }, diff --git a/dunge/src/lib.rs b/dunge/src/lib.rs index 8b28aa0..269009d 100644 --- a/dunge/src/lib.rs +++ b/dunge/src/lib.rs @@ -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")] diff --git a/dunge/tests/triangle_discard.rs b/dunge/tests/triangle_discard.rs index 105a9aa..aa40cd5 100644 --- a/dunge/tests/triangle_discard.rs +++ b/dunge/tests/triangle_discard.rs @@ -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, diff --git a/dunge/tests/triangle_group.rs b/dunge/tests/triangle_group.rs index 8df69ad..107ed91 100644 --- a/dunge/tests/triangle_group.rs +++ b/dunge/tests/triangle_group.rs @@ -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, diff --git a/dunge/tests/triangle_index.rs b/dunge/tests/triangle_index.rs index e5fb4fc..65f6caa 100644 --- a/dunge/tests/triangle_index.rs +++ b/dunge/tests/triangle_index.rs @@ -7,8 +7,8 @@ fn render() -> Result<(), Error> { use { dunge::{ color::Rgba, + prelude::*, sl::{self, Index, Out}, - texture::TextureData, Format, }, glam::Vec4, diff --git a/dunge/tests/triangle_instance.rs b/dunge/tests/triangle_instance.rs index 8a85d29..8f0e538 100644 --- a/dunge/tests/triangle_instance.rs +++ b/dunge/tests/triangle_instance.rs @@ -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, diff --git a/dunge/tests/triangle_vertex.rs b/dunge/tests/triangle_vertex.rs index cee1111..6e63bb9 100644 --- a/dunge/tests/triangle_vertex.rs +++ b/dunge/tests/triangle_vertex.rs @@ -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, diff --git a/examples/cube/src/lib.rs b/examples/cube/src/lib.rs index 25d49c5..b864068 100644 --- a/examples/cube/src/lib.rs +++ b/examples/cube/src/lib.rs @@ -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, diff --git a/examples/ssaa/src/lib.rs b/examples/ssaa/src/lib.rs index 02ec90b..c929816 100644 --- a/examples/ssaa/src/lib.rs +++ b/examples/ssaa/src/lib.rs @@ -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, }, diff --git a/examples/window/src/main.rs b/examples/window/src/main.rs index 87beb3e..d41c43c 100644 --- a/examples/window/src/main.rs +++ b/examples/window/src/main.rs @@ -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],