rename renderer to vulkan
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 20m44s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 20m44s
This commit is contained in:
parent
6bc3dbd53d
commit
f32db72101
8 changed files with 11 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::error::Error;
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
||||
mod renderer;
|
||||
mod vulkan;
|
||||
|
||||
fn main() -> Result<(), impl Error> {
|
||||
env_logger::init();
|
||||
|
@ -9,7 +9,7 @@ fn main() -> Result<(), impl Error> {
|
|||
let event_loop = EventLoop::new().unwrap();
|
||||
event_loop.set_control_flow(ControlFlow::Poll);
|
||||
|
||||
let mut app = renderer::App::new(&event_loop);
|
||||
let mut app = vulkan::App::new(&event_loop);
|
||||
|
||||
event_loop.run_app(&mut app)
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::renderer::render_context::RenderContext;
|
||||
use crate::renderer::Scene;
|
||||
use crate::vulkan::Scene;
|
||||
use crate::vulkan::render_context::RenderContext;
|
||||
use std::sync::Arc;
|
||||
use vulkano::buffer::allocator::{SubbufferAllocator, SubbufferAllocatorCreateInfo};
|
||||
use vulkano::buffer::BufferUsage;
|
||||
use vulkano::buffer::allocator::{SubbufferAllocator, SubbufferAllocatorCreateInfo};
|
||||
use vulkano::command_buffer::allocator::StandardCommandBufferAllocator;
|
||||
use vulkano::command_buffer::{
|
||||
AutoCommandBufferBuilder, CommandBufferUsage, RenderingAttachmentInfo, RenderingInfo,
|
||||
|
@ -15,9 +15,9 @@ use vulkano::device::{
|
|||
use vulkano::instance::{Instance, InstanceCreateFlags, InstanceCreateInfo};
|
||||
use vulkano::memory::allocator::{MemoryTypeFilter, StandardMemoryAllocator};
|
||||
use vulkano::render_pass::{AttachmentLoadOp, AttachmentStoreOp};
|
||||
use vulkano::swapchain::{acquire_next_image, Surface, SwapchainPresentInfo};
|
||||
use vulkano::swapchain::{Surface, SwapchainPresentInfo, acquire_next_image};
|
||||
use vulkano::sync::GpuFuture;
|
||||
use vulkano::{sync, Validated, Version, VulkanError, VulkanLibrary};
|
||||
use vulkano::{Validated, Version, VulkanError, VulkanLibrary, sync};
|
||||
use winit::application::ApplicationHandler;
|
||||
use winit::event::WindowEvent;
|
||||
use winit::event_loop::{ActiveEventLoop, EventLoop};
|
|
@ -5,6 +5,7 @@ use vulkano::descriptor_set::layout::{
|
|||
DescriptorSetLayoutBinding, DescriptorSetLayoutCreateInfo, DescriptorType,
|
||||
};
|
||||
use vulkano::device::Device;
|
||||
use vulkano::pipeline::graphics::GraphicsPipelineCreateInfo;
|
||||
use vulkano::pipeline::graphics::color_blend::{ColorBlendAttachmentState, ColorBlendState};
|
||||
use vulkano::pipeline::graphics::input_assembly::InputAssemblyState;
|
||||
use vulkano::pipeline::graphics::multisample::MultisampleState;
|
||||
|
@ -12,7 +13,6 @@ use vulkano::pipeline::graphics::rasterization::RasterizationState;
|
|||
use vulkano::pipeline::graphics::subpass::PipelineRenderingCreateInfo;
|
||||
use vulkano::pipeline::graphics::vertex_input::{Vertex, VertexDefinition};
|
||||
use vulkano::pipeline::graphics::viewport::ViewportState;
|
||||
use vulkano::pipeline::graphics::GraphicsPipelineCreateInfo;
|
||||
use vulkano::pipeline::layout::{PipelineDescriptorSetLayoutCreateInfo, PipelineLayoutCreateFlags};
|
||||
use vulkano::pipeline::{
|
||||
DynamicState, GraphicsPipeline, PipelineLayout, PipelineShaderStageCreateInfo,
|
||||
|
@ -20,7 +20,7 @@ use vulkano::pipeline::{
|
|||
use vulkano::shader::{EntryPoint, ShaderStages};
|
||||
use vulkano::swapchain::Swapchain;
|
||||
|
||||
use crate::renderer::Vertex2D;
|
||||
use crate::vulkan::Vertex2D;
|
||||
|
||||
pub mod shaders {
|
||||
pub mod vs {
|
|
@ -1,4 +1,4 @@
|
|||
use crate::renderer::pipelines::triangle_pipeline::shaders::vs;
|
||||
use crate::vulkan::pipelines::triangle_pipeline::shaders::vs;
|
||||
use glam::{Mat3, Mat4, Vec3};
|
||||
use std::error::Error;
|
||||
use std::sync::Arc;
|
||||
|
@ -8,7 +8,7 @@ use vulkano::command_buffer::{AutoCommandBufferBuilder, PrimaryAutoCommandBuffer
|
|||
use vulkano::descriptor_set::{DescriptorSet, WriteDescriptorSet};
|
||||
use vulkano::pipeline::{GraphicsPipeline, Pipeline, PipelineBindPoint};
|
||||
|
||||
use crate::renderer::{pipelines::triangle_pipeline::create_triangle_pipeline, App, Vertex2D};
|
||||
use crate::vulkan::{App, Vertex2D, pipelines::triangle_pipeline::create_triangle_pipeline};
|
||||
|
||||
const VERTICES: [Vertex2D; 12] = [
|
||||
// Triangle en haut à gauche
|
Loading…
Add table
Reference in a new issue