Skip to content

Commit

Permalink
remove unnecessary things
Browse files Browse the repository at this point in the history
Co-authored-by: marc0246 <[email protected]>
  • Loading branch information
Firestar99 and marc0246 committed Dec 29, 2023
1 parent f6191f4 commit cc7fed1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 1 addition & 5 deletions examples/mesh-shader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ edition = "2021"
publish = false

[[bin]]
name = "mesh-shader-triangle"
name = "mesh-shader"
path = "main.rs"
test = false
bench = false
doc = false

[dependencies]
# The `vulkano` crate is the main crate that you must use to use Vulkan.
vulkano = { workspace = true, features = ["macros"] }
# Provides the `shader!` macro that is used to generate code for using shaders.
vulkano-shaders = { workspace = true }
# The Vulkan library doesn't provide any functionality to create and handle windows, as
# this would be out of scope. In order to open a window, we are going to use the `winit` crate.
winit = { workspace = true }
7 changes: 3 additions & 4 deletions examples/mesh-shader/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ use vulkano::{buffer::{Buffer, BufferContents, BufferCreateInfo, BufferUsage}, c
}, sync::{self, GpuFuture}, Validated, VulkanError, VulkanLibrary};

/// The vertex type that we will be used to describe the triangle's geometry.
#[derive(BufferContents, Vertex)]
#[derive(BufferContents)]
#[repr(C)]
struct TriangleVertex {
#[format(R32G32_SFLOAT)]
position: [f32; 2],
}

Expand Down Expand Up @@ -190,7 +189,7 @@ fn main() -> Result<(), impl Error> {
let vertex_buffer = Buffer::from_iter(
memory_allocator.clone(),
BufferCreateInfo {
usage: BufferUsage::VERTEX_BUFFER | BufferUsage::STORAGE_BUFFER,
usage: BufferUsage::STORAGE_BUFFER,
..Default::default()
},
AllocationCreateInfo {
Expand Down Expand Up @@ -228,7 +227,7 @@ fn main() -> Result<(), impl Error> {
let instance_buffer = Buffer::new_unsized::<mesh::InstanceBuffer>(
memory_allocator,
BufferCreateInfo {
usage: BufferUsage::VERTEX_BUFFER | BufferUsage::STORAGE_BUFFER,
usage: BufferUsage::STORAGE_BUFFER,
..Default::default()
},
AllocationCreateInfo {
Expand Down

0 comments on commit cc7fed1

Please sign in to comment.