Begin implement Vertex
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 4m25s

This commit is contained in:
Florian RICHER 2024-12-06 17:06:17 +01:00
parent 84666db1d8
commit a1961cff05
10 changed files with 105 additions and 18 deletions

View file

@ -1,20 +1,20 @@
use std::sync::Arc;
use ash::vk;
use crate::renderer::vulkan::{VkDevice, VkGraphicsPipeline, VkRenderPass, VkSwapchain};
use crate::renderer::Renderable;
use ash::vk;
use ash::vk::CommandBuffer;
use std::sync::Arc;
pub struct Triangle {
pub struct TriangleScene {
pipeline: Option<VkGraphicsPipeline>,
}
impl Triangle {
impl TriangleScene {
pub fn new() -> Self {
Self { pipeline: None }
}
}
impl Renderable for Triangle {
impl Renderable for TriangleScene {
fn init(&mut self, device: &Arc<VkDevice>, render_pass: &Arc<VkRenderPass>) -> anyhow::Result<()> {
let pipeline = VkGraphicsPipeline::new(&device, &render_pass)?;
self.pipeline = Some(pipeline);