diff --git a/Cargo.lock b/Cargo.lock index e707e2b..8a690d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -316,7 +316,7 @@ dependencies = [ [[package]] name = "blue_engine" -version = "0.5.18" +version = "0.5.19" dependencies = [ "android_logger", "bytemuck", diff --git a/Cargo.toml b/Cargo.toml index e3ae478..54ad692 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blue_engine" -version = "0.5.18" +version = "0.5.19" authors = ["Elham Aryanpur "] edition = "2021" description = "General-Purpose, Easy-to-use, Fast, and Portable graphics engine" diff --git a/README.md b/README.md index 1175227..0f3e33b 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ [![Rust Windows](https://github.com/AryanpurTech/BlueEngine/actions/workflows/rust-win.yml/badge.svg)](https://github.com/AryanpurTech/BlueEngine/actions/workflows/rust-win.yml) [![Rust MacOS](https://github.com/AryanpurTech/BlueEngine/actions/workflows/rust-osx.yml/badge.svg)](https://github.com/AryanpurTech/BlueEngine/actions/workflows/rust-osx.yml) [![rust-clippy analyze](https://github.com/AryanpurTech/BlueEngine/actions/workflows/rust-clippy.yml/badge.svg)](https://github.com/AryanpurTech/BlueEngine/actions/workflows/rust-clippy.yml) +![Static Badge](https://img.shields.io/badge/Join-The_Discord-blue?style=flat&logo=discord&color=blue) +![Static Badge](https://img.shields.io/badge/Read_The_Docs-blue?style=flat&logo=docsdotrs&color=%23000000) Make sure to use latest Rust version, as the engine is always kept up to date. @@ -33,19 +35,12 @@ fn main() { } ``` -* [Join our discord server](https://discord.gg/s7xsj9q) - * [WIP] [Guide](https://aryanpurtech.github.io/BlueEngineDocs/) -* Check out the [workflow](https://github.com/orgs/AryanpurTech/projects/2) for roadmap, status, ... - * Check out the [examples](https://github.com/AryanpurTech/BlueEngine/tree/master/examples) folder to get a sense of how things are done * Check out the [utilities library](https://github.com/AryanpurTech/BlueEngineUtilities) for extra functionality with the engine -* Check out the [editor](https://github.com/rustylabs/blue_flame) - *the credits to the image on top: NotPB* - *the development might seem slow sometimes, its due to multiple repositories being handled and due to my education taking a large chunk of my time. The project isn't dead, just slow.* diff --git a/src/definition.rs b/src/definition.rs index bf3e6b1..3efcb74 100644 --- a/src/definition.rs +++ b/src/definition.rs @@ -303,7 +303,7 @@ impl crate::header::Renderer { pub fn build_vertex_buffer( &mut self, vertices: &Vec, - indices: &Vec, + indices: &Vec, ) -> eyre::Result { let vertex_buffer = self .device diff --git a/src/header.rs b/src/header.rs index 387bb20..46effc9 100644 --- a/src/header.rs +++ b/src/header.rs @@ -97,7 +97,7 @@ pub struct Object { /// A list of Vertex pub vertices: Vec, /// A list of indices that dictates the order that vertices appear - pub indices: Vec, + pub indices: Vec, /// Describes how to uniform buffer is structures pub uniform_layout: wgpu::BindGroupLayout, /// Pipeline holds all the data that is sent to GPU, including shaders and textures diff --git a/src/objects.rs b/src/objects.rs index 8de5c7c..e4e0697 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -27,7 +27,7 @@ impl Renderer { &mut self, name: impl StringBuffer, vertices: Vec, - indices: Vec, + indices: Vec, settings: ObjectSettings, ) -> eyre::Result { let vertex_buffer = self.build_vertex_buffer(&vertices, &indices)?; @@ -117,7 +117,7 @@ impl ObjectStorage { &mut self, name: impl StringBuffer, vertices: Vec, - indices: Vec, + indices: Vec, settings: ObjectSettings, renderer: &mut Renderer, ) -> eyre::Result<()> { diff --git a/src/primitive_shapes/three_dimensions.rs b/src/primitive_shapes/three_dimensions.rs index 5855c84..8594838 100644 --- a/src/primitive_shapes/three_dimensions.rs +++ b/src/primitive_shapes/three_dimensions.rs @@ -170,7 +170,7 @@ pub fn uv_sphere( let stack_step = std::f32::consts::PI / stacks; let mut vertices: Vec = Vec::with_capacity(details.0 * details.1); - let mut indices: Vec = Vec::with_capacity(details.0 * details.1 * 2 * 3); + let mut indices: Vec = Vec::with_capacity(details.0 * details.1 * 2 * 3); for i in 0..details.0 + 1 { let stack_angle = std::f32::consts::PI / 2. - (i as f32) * stack_step; @@ -194,14 +194,14 @@ pub fn uv_sphere( let mut k2 = k1 + details.1 + 1; for _j in 0..details.1 { if i != 0 { - indices.push(k1 as u16); - indices.push(k2 as u16); - indices.push((k1 + 1) as u16); + indices.push(k1 as u32); + indices.push(k2 as u32); + indices.push((k1 + 1) as u32); } if i != details.0 - 1 { - indices.push((k1 + 1) as u16); - indices.push(k2 as u16); - indices.push((k2 + 1) as u16); + indices.push((k1 + 1) as u32); + indices.push(k2 as u32); + indices.push((k2 + 1) as u32); } k1 += 1; k2 += 1; diff --git a/src/render.rs b/src/render.rs index 99432cc..0571963 100644 --- a/src/render.rs +++ b/src/render.rs @@ -304,7 +304,7 @@ impl Renderer { render_pass.set_vertex_buffer(1, i.instance_buffer.slice(..)); render_pass.set_index_buffer( vertex_buffer.index_buffer.slice(..), - wgpu::IndexFormat::Uint16, + wgpu::IndexFormat::Uint32, ); // shader