59 lines
No EOL
1.8 KiB
Rust
59 lines
No EOL
1.8 KiB
Rust
use vulkanalia::prelude::v1_0::*;
|
|
|
|
use crate::vertex;
|
|
|
|
// The Vulkan handles and associated properties used by our Vulkan app.
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct AppData {
|
|
|
|
pub vertices: Vec<vertex::Vertex>,
|
|
pub indices: Vec<u32>,
|
|
|
|
pub surface: vk::SurfaceKHR,
|
|
pub messenger: vk::DebugUtilsMessengerEXT,
|
|
pub physical_device: vk::PhysicalDevice,
|
|
pub graphics_queue: vk::Queue,
|
|
pub present_queue: vk::Queue,
|
|
|
|
pub swapchain_format: vk::Format,
|
|
pub swapchain_extent: vk::Extent2D,
|
|
pub swapchain: vk::SwapchainKHR,
|
|
pub swapchain_images: Vec<vk::Image>,
|
|
|
|
pub swapchain_image_views: Vec<vk::ImageView>,
|
|
|
|
pub descriptor_set_layout: vk::DescriptorSetLayout,
|
|
pub pipeline_layout: vk::PipelineLayout,
|
|
pub render_pass: vk::RenderPass,
|
|
pub pipeline: vk::Pipeline,
|
|
pub framebuffers: Vec<vk::Framebuffer>,
|
|
pub command_pool: vk::CommandPool,
|
|
pub command_buffers: Vec<vk::CommandBuffer>,
|
|
|
|
pub image_available_semaphores: Vec<vk::Semaphore>,
|
|
pub render_finished_semaphores: Vec<vk::Semaphore>,
|
|
|
|
pub in_flight_fences: Vec<vk::Fence>,
|
|
pub images_in_flight: Vec<vk::Fence>,
|
|
|
|
pub vertex_buffer: vk::Buffer,
|
|
pub vertex_buffer_memory: vk::DeviceMemory,
|
|
|
|
pub index_buffer: vk::Buffer,
|
|
pub index_buffer_memory: vk::DeviceMemory,
|
|
|
|
pub uniform_buffers: Vec<vk::Buffer>,
|
|
pub uniform_buffers_memory: Vec<vk::DeviceMemory>,
|
|
|
|
pub descriptor_pool: vk::DescriptorPool,
|
|
pub descriptor_sets: Vec<vk::DescriptorSet>,
|
|
|
|
pub texture_image: vk::Image,
|
|
pub texture_image_memory: vk::DeviceMemory,
|
|
pub texture_image_view: vk::ImageView,
|
|
pub texture_sampler: vk::Sampler,
|
|
|
|
pub depth_image: vk::Image,
|
|
pub depth_image_memory: vk::DeviceMemory,
|
|
pub depth_image_view: vk::ImageView,
|
|
} |