clean up
This commit is contained in:
parent
0f2747293f
commit
d426fd39c0
4 changed files with 7 additions and 12 deletions
|
@ -1,7 +1,5 @@
|
||||||
use vulkanalia::prelude::v1_0::*;
|
use vulkanalia::prelude::v1_0::*;
|
||||||
|
|
||||||
use crate::scene;
|
|
||||||
|
|
||||||
// The Vulkan handles and associated properties used by our Vulkan app.
|
// The Vulkan handles and associated properties used by our Vulkan app.
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct AppData {
|
pub struct AppData {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use log::*;
|
use log::*;
|
||||||
use winit::dpi::{LogicalSize, LogicalPosition, PhysicalPosition};
|
use winit::dpi::{LogicalSize, LogicalPosition};
|
||||||
use winit::event::{Event, WindowEvent};
|
use winit::event::{Event, WindowEvent};
|
||||||
use winit::event_loop::EventLoop;
|
use winit::event_loop::EventLoop;
|
||||||
use winit::window::{Window, WindowBuilder};
|
use winit::window::{Window, WindowBuilder};
|
||||||
|
@ -18,7 +18,6 @@ use vulkanalia::prelude::v1_0::*;
|
||||||
use vulkanalia::Version;
|
use vulkanalia::Version;
|
||||||
use vulkanalia::bytecode::Bytecode;
|
use vulkanalia::bytecode::Bytecode;
|
||||||
|
|
||||||
use core::time;
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
use std::os::raw::c_void;
|
use std::os::raw::c_void;
|
||||||
|
@ -28,7 +27,7 @@ use vulkanalia::vk::ExtDebugUtilsExtension;
|
||||||
use vulkanalia::vk::KhrSurfaceExtension;
|
use vulkanalia::vk::KhrSurfaceExtension;
|
||||||
use vulkanalia::vk::KhrSwapchainExtension;
|
use vulkanalia::vk::KhrSwapchainExtension;
|
||||||
|
|
||||||
use cgmath::{vec2, vec3, Matrix, SquareMatrix};
|
use cgmath::Matrix;
|
||||||
use std::mem::size_of;
|
use std::mem::size_of;
|
||||||
use std::ptr::copy_nonoverlapping as memcpy;
|
use std::ptr::copy_nonoverlapping as memcpy;
|
||||||
|
|
||||||
|
@ -162,7 +161,7 @@ impl App {
|
||||||
let loader = LibloadingLoader::new(LIBRARY)?;
|
let loader = LibloadingLoader::new(LIBRARY)?;
|
||||||
let entry = Entry::new(loader).map_err(|b| anyhow!("{}", b))?;
|
let entry = Entry::new(loader).map_err(|b| anyhow!("{}", b))?;
|
||||||
let mut data = app_data::AppData::default();
|
let mut data = app_data::AppData::default();
|
||||||
data.use_geometry_shader = true;
|
data.use_geometry_shader = false;
|
||||||
let mut scene_handler = scene::Scene::default();
|
let mut scene_handler = scene::Scene::default();
|
||||||
|
|
||||||
//load_model::load_model(&mut data)?;
|
//load_model::load_model(&mut data)?;
|
||||||
|
@ -189,7 +188,7 @@ impl App {
|
||||||
image::create_texture_image_view(&device, &mut data)?;
|
image::create_texture_image_view(&device, &mut data)?;
|
||||||
image::create_texture_sampler(&device, &mut data)?;
|
image::create_texture_sampler(&device, &mut data)?;
|
||||||
|
|
||||||
scene_handler.prepare_data(&instance, &device, &data);
|
scene_handler.prepare_data(&instance, &device, &data)?;
|
||||||
|
|
||||||
buffer::create_uniform_buffers(&instance, &device, &mut data)?;
|
buffer::create_uniform_buffers(&instance, &device, &mut data)?;
|
||||||
buffer::create_descriptor_pool(&device, &mut data)?;
|
buffer::create_descriptor_pool(&device, &mut data)?;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use vulkanalia::prelude::v1_0::*;
|
use vulkanalia::prelude::v1_0::*;
|
||||||
use cgmath::{vec2, vec3, Matrix, SquareMatrix};
|
use cgmath::vec3;
|
||||||
use crate::vertex;
|
use crate::vertex;
|
||||||
use crate::scene::Scene;
|
use crate::scene::Scene;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
use std::thread::yield_now;
|
|
||||||
|
|
||||||
use vulkanalia::prelude::v1_0::*;
|
use vulkanalia::prelude::v1_0::*;
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::Result;
|
||||||
|
|
||||||
use cgmath::{vec2, vec3, Matrix, SquareMatrix};
|
use cgmath::{vec2, vec3};
|
||||||
|
|
||||||
use crate::app_data::AppData;
|
use crate::app_data::AppData;
|
||||||
use crate::buffer;
|
use crate::buffer;
|
||||||
|
|
Loading…
Reference in a new issue