Update
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 25m31s

This commit is contained in:
Florian RICHER 2025-04-07 22:51:49 +02:00
parent 1d333b633b
commit b361965033
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
6 changed files with 25 additions and 70 deletions

View file

@ -0,0 +1,7 @@
use std::sync::Arc;
use bevy_ecs::component::Component;
use vulkano::pipeline::GraphicsPipeline;
#[derive(Component)]
pub struct Material(pub Arc<GraphicsPipeline>);

View file

@ -1,10 +0,0 @@
pub mod triangle;
use vulkano::command_buffer::CommandBuffer;
use crate::vulkan::vulkan_context::VulkanContext;
pub trait Material {
fn load(&self, vulkan_context: &VulkanContext);
fn bind(&self, command_buffer: &mut CommandBuffer);
}

View file

@ -1,34 +0,0 @@
use glam::Vec4;
use vulkano::command_buffer::CommandBuffer;
use super::Material;
pub mod shaders {
pub mod vs {
vulkano_shaders::shader! {
ty: "vertex",
path: r"res/shaders/vertex.vert",
}
}
pub mod fs {
vulkano_shaders::shader! {
ty: "fragment",
path: r"res/shaders/vertex.frag",
}
}
}
pub struct TriangleMaterial {
pub colors: [Vec4; 3],
}
impl Material for TriangleMaterial {
fn bind(&self, command_buffer: &mut CommandBuffer) {
todo!()
}
fn load(&self, vulkan_context: &crate::vulkan::vulkan_context::VulkanContext) {
todo!()
}
}

View file

@ -1,10 +1,10 @@
use std::sync::Arc;
use vulkano::Validated;
use vulkano::buffer::{
AllocateBufferError, Buffer, BufferContents, BufferCreateInfo, BufferUsage, Subbuffer,
};
use vulkano::memory::allocator::{AllocationCreateInfo, MemoryTypeFilter, StandardMemoryAllocator};
use vulkano::pipeline::graphics::vertex_input::Vertex;
use vulkano::Validated;
#[derive(BufferContents, Vertex)]
#[repr(C)]