Fix warning
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 6m25s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 6m25s
This commit is contained in:
parent
a4a6c0c60a
commit
6dae0339db
3 changed files with 6 additions and 8 deletions
|
@ -4,9 +4,8 @@ use vulkano::command_buffer::{
|
|||
};
|
||||
use vulkano::pipeline::graphics::viewport::Viewport;
|
||||
use vulkano::render_pass::{AttachmentLoadOp, AttachmentStoreOp};
|
||||
use vulkano::swapchain::{PresentMode, SwapchainPresentInfo};
|
||||
use vulkano::swapchain::PresentMode;
|
||||
use vulkano::sync::GpuFuture;
|
||||
use vulkano::{Validated, VulkanError, sync};
|
||||
use vulkano_util::context::VulkanoContext;
|
||||
use vulkano_util::window::{VulkanoWindows, WindowDescriptor};
|
||||
use winit::application::ApplicationHandler;
|
||||
|
@ -50,7 +49,7 @@ impl ApplicationHandler for App {
|
|||
self.scene = Some(
|
||||
Scene::load(
|
||||
&self.vulkan_context,
|
||||
&self.vulkano_windows.get_primary_renderer_mut().unwrap(),
|
||||
self.vulkano_windows.get_primary_renderer_mut().unwrap(),
|
||||
)
|
||||
.unwrap(),
|
||||
);
|
||||
|
@ -102,7 +101,7 @@ impl ApplicationHandler for App {
|
|||
|
||||
if let Some(scene) = self.scene.as_ref() {
|
||||
scene
|
||||
.render(&self.vulkan_context, &renderer, &mut builder)
|
||||
.render(&self.vulkan_context, renderer, &mut builder)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ use vulkano::pipeline::{
|
|||
DynamicState, GraphicsPipeline, PipelineLayout, PipelineShaderStageCreateInfo,
|
||||
};
|
||||
use vulkano::shader::{EntryPoint, ShaderStages};
|
||||
use vulkano::swapchain::Swapchain;
|
||||
|
||||
use crate::render::vertex::Vertex2D;
|
||||
|
||||
|
|
|
@ -83,12 +83,12 @@ impl Scene {
|
|||
vulkano_window_renderer: &VulkanoWindowRenderer,
|
||||
) -> Result<Self, Box<dyn Error>> {
|
||||
let pipeline = create_triangle_pipeline(
|
||||
&vulkano_context.vulkano_context().device(),
|
||||
vulkano_context.vulkano_context().device(),
|
||||
vulkano_window_renderer.swapchain_format(),
|
||||
)?;
|
||||
let vertex_buffer = Vertex2D::create_buffer(
|
||||
Vec::from_iter(VERTICES),
|
||||
&vulkano_context.vulkano_context().memory_allocator(),
|
||||
vulkano_context.vulkano_context().memory_allocator(),
|
||||
)?;
|
||||
|
||||
Ok(Scene {
|
||||
|
@ -108,7 +108,7 @@ impl Scene {
|
|||
let instance_count = vertex_count / 3;
|
||||
|
||||
let uniform_buffer = self.get_uniform_buffer(
|
||||
&vulkan_context.vulkano_context().memory_allocator(),
|
||||
vulkan_context.vulkano_context().memory_allocator(),
|
||||
vulkano_window_renderer.aspect_ratio(),
|
||||
);
|
||||
let layout = &self.pipeline.layout().set_layouts()[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue