2023-04-05 13:04:20 -04:00
|
|
|
mod functions;
|
2023-04-06 14:35:50 -04:00
|
|
|
use functions::{
|
2023-04-07 10:48:51 -04:00
|
|
|
create_command_buffers, create_command_pool, create_framebuffers, create_instance,
|
|
|
|
create_logical_device, create_pipeline, create_render_pass, create_swapchain,
|
2023-04-12 10:28:48 -04:00
|
|
|
create_swapchain_image_views, create_sync_objects, create_vertex_buffer, pick_physical_device,
|
2023-04-06 14:35:50 -04:00
|
|
|
};
|
2023-04-05 13:04:20 -04:00
|
|
|
|
2023-04-05 10:48:25 -04:00
|
|
|
use crate::VALIDATION_ENABLED;
|
|
|
|
use ::anyhow::{anyhow, Result};
|
2023-04-12 10:28:48 -04:00
|
|
|
use ::lazy_static::lazy_static;
|
2023-04-05 11:08:36 -04:00
|
|
|
use ::log::*;
|
2023-04-12 10:28:48 -04:00
|
|
|
use ::nalgebra_glm as glm;
|
|
|
|
use ::std::mem::size_of;
|
2023-04-05 10:48:25 -04:00
|
|
|
use ::thiserror::Error;
|
|
|
|
use ::vulkanalia::loader::{LibloadingLoader, LIBRARY};
|
|
|
|
use ::vulkanalia::prelude::v1_0::*;
|
2023-04-05 16:34:09 -04:00
|
|
|
use ::vulkanalia::vk::{ExtDebugUtilsExtension, KhrSurfaceExtension, KhrSwapchainExtension};
|
2023-04-05 15:41:32 -04:00
|
|
|
use ::vulkanalia::window as vk_window;
|
2023-04-07 11:20:48 -04:00
|
|
|
use ::vulkanalia::Version;
|
2023-04-05 10:48:25 -04:00
|
|
|
use ::winit::window::Window;
|
2023-03-31 11:09:20 -04:00
|
|
|
|
2023-04-07 11:20:48 -04:00
|
|
|
/// The name of the validation layers.
|
|
|
|
pub const VALIDATION_LAYER: vk::ExtensionName =
|
2023-04-05 16:34:09 -04:00
|
|
|
vk::ExtensionName::from_bytes(b"VK_LAYER_KHRONOS_validation");
|
2023-04-07 11:20:48 -04:00
|
|
|
|
|
|
|
/// The Vulkan SDK version that started requiring the portability subset extension for macOS.
|
|
|
|
pub const PORTABILITY_MACOS_VERSION: Version = Version::new(1, 3, 216);
|
|
|
|
|
|
|
|
/// The required device extensions
|
|
|
|
pub const DEVICE_EXTENSIONS: &[vk::ExtensionName] = &[vk::KHR_SWAPCHAIN_EXTENSION.name];
|
|
|
|
|
|
|
|
/// The maximum number of frames that can be processed concurrently.
|
|
|
|
pub const MAX_FRAMES_IN_FLIGHT: usize = 2;
|
2023-04-05 16:34:09 -04:00
|
|
|
|
2023-03-31 10:50:34 -04:00
|
|
|
/// Our Vulkan app.
|
|
|
|
#[derive(Clone, Debug)]
|
2023-03-31 11:09:20 -04:00
|
|
|
pub struct App {
|
2023-04-07 14:48:12 -04:00
|
|
|
/// This value needs to stick around, but we don't use it directly
|
|
|
|
_entry: Entry,
|
2023-03-31 11:09:20 -04:00
|
|
|
instance: Instance,
|
2023-04-05 10:13:39 -04:00
|
|
|
data: AppData,
|
2023-04-07 11:20:48 -04:00
|
|
|
pub device: Device,
|
|
|
|
frame: usize,
|
2023-04-07 14:48:12 -04:00
|
|
|
pub resized: bool,
|
2023-03-31 11:09:20 -04:00
|
|
|
}
|
2023-03-31 10:50:34 -04:00
|
|
|
|
|
|
|
impl App {
|
|
|
|
/// Creates our Vulkan app.
|
2023-04-07 10:48:51 -04:00
|
|
|
///
|
|
|
|
/// # Safety
|
|
|
|
/// Here be Dragons
|
2023-03-31 10:50:34 -04:00
|
|
|
pub unsafe fn create(window: &Window) -> Result<Self> {
|
2023-03-31 11:09:20 -04:00
|
|
|
let loader = LibloadingLoader::new(LIBRARY)?;
|
|
|
|
let entry = Entry::new(loader).map_err(|b| anyhow!("{}", b))?;
|
2023-04-06 15:28:09 -04:00
|
|
|
|
2023-04-05 10:13:39 -04:00
|
|
|
let mut data = AppData::default();
|
|
|
|
let instance = create_instance(window, &entry, &mut data)?;
|
2023-04-05 15:41:32 -04:00
|
|
|
data.surface = vk_window::create_surface(&instance, window)?;
|
2023-04-06 15:28:09 -04:00
|
|
|
|
2023-04-05 10:48:25 -04:00
|
|
|
pick_physical_device(&instance, &mut data)?;
|
2023-04-05 13:04:20 -04:00
|
|
|
let device = create_logical_device(&instance, &mut data)?;
|
2023-04-06 15:28:09 -04:00
|
|
|
|
2023-04-05 16:34:09 -04:00
|
|
|
create_swapchain(window, &instance, &device, &mut data)?;
|
2023-04-06 14:35:50 -04:00
|
|
|
create_swapchain_image_views(&device, &mut data)?;
|
2023-04-07 10:03:59 -04:00
|
|
|
create_render_pass(&instance, &device, &mut data)?;
|
2023-04-06 15:28:09 -04:00
|
|
|
create_pipeline(&device, &mut data)?;
|
2023-04-07 10:48:51 -04:00
|
|
|
create_framebuffers(&device, &mut data)?;
|
|
|
|
create_command_pool(&instance, &device, &mut data)?;
|
2023-04-12 10:28:48 -04:00
|
|
|
create_vertex_buffer(&instance, &device, &mut data)?;
|
2023-04-07 10:48:51 -04:00
|
|
|
create_command_buffers(&device, &mut data)?;
|
2023-04-07 11:20:48 -04:00
|
|
|
create_sync_objects(&device, &mut data)?;
|
2023-04-05 13:04:20 -04:00
|
|
|
|
2023-04-05 10:48:25 -04:00
|
|
|
Ok(Self {
|
2023-04-07 14:48:12 -04:00
|
|
|
_entry: entry,
|
2023-04-05 10:48:25 -04:00
|
|
|
instance,
|
|
|
|
data,
|
2023-04-05 13:04:20 -04:00
|
|
|
device,
|
2023-04-07 11:20:48 -04:00
|
|
|
frame: 0,
|
2023-04-07 14:48:12 -04:00
|
|
|
resized: false,
|
2023-04-05 10:48:25 -04:00
|
|
|
})
|
2023-03-31 10:50:34 -04:00
|
|
|
}
|
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
/// Destroys our Vulkan app, in reverse order of creation
|
|
|
|
///
|
|
|
|
/// # Safety
|
|
|
|
/// Here be Dragons
|
|
|
|
pub unsafe fn destroy(&mut self) {
|
|
|
|
self.destroy_swapchain();
|
2023-04-12 10:28:48 -04:00
|
|
|
self.device.destroy_buffer(self.data.vertex_buffer, None);
|
|
|
|
self.device
|
|
|
|
.free_memory(self.data.vertex_buffer_memory, None);
|
2023-04-07 14:48:12 -04:00
|
|
|
|
|
|
|
self.data
|
|
|
|
.in_flight_fences
|
|
|
|
.iter()
|
|
|
|
.for_each(|f| self.device.destroy_fence(*f, None));
|
|
|
|
self.data
|
|
|
|
.render_finished_semaphores
|
|
|
|
.iter()
|
|
|
|
.for_each(|s| self.device.destroy_semaphore(*s, None));
|
|
|
|
self.data
|
|
|
|
.image_available_semaphores
|
|
|
|
.iter()
|
|
|
|
.for_each(|s| self.device.destroy_semaphore(*s, None));
|
|
|
|
self.device
|
|
|
|
.destroy_command_pool(self.data.command_pool, None);
|
|
|
|
self.device.destroy_device(None);
|
|
|
|
self.instance.destroy_surface_khr(self.data.surface, None);
|
|
|
|
|
|
|
|
if VALIDATION_ENABLED {
|
|
|
|
self.instance
|
|
|
|
.destroy_debug_utils_messenger_ext(self.data.messenger, None);
|
|
|
|
}
|
|
|
|
|
|
|
|
self.instance.destroy_instance(None);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Cleanup the swapchain and related objects
|
|
|
|
///
|
|
|
|
/// # Safety
|
|
|
|
/// Here be Dragons
|
|
|
|
unsafe fn destroy_swapchain(&mut self) {
|
|
|
|
self.data
|
|
|
|
.framebuffers
|
|
|
|
.iter()
|
|
|
|
.for_each(|f| self.device.destroy_framebuffer(*f, None));
|
|
|
|
self.device
|
|
|
|
.free_command_buffers(self.data.command_pool, &self.data.command_buffers);
|
|
|
|
self.device.destroy_pipeline(self.data.pipeline, None);
|
|
|
|
self.device
|
|
|
|
.destroy_pipeline_layout(self.data.pipeline_layout, None);
|
|
|
|
self.device.destroy_render_pass(self.data.render_pass, None);
|
|
|
|
self.data
|
|
|
|
.swapchain_image_views
|
|
|
|
.iter()
|
|
|
|
.for_each(|v| self.device.destroy_image_view(*v, None));
|
|
|
|
self.device.destroy_swapchain_khr(self.data.swapchain, None);
|
|
|
|
}
|
|
|
|
|
2023-03-31 10:50:34 -04:00
|
|
|
/// Renders a frame for our Vulkan app.
|
2023-04-07 10:48:51 -04:00
|
|
|
///
|
|
|
|
/// # Safety
|
|
|
|
/// Here be Dragons
|
2023-04-07 14:48:12 -04:00
|
|
|
pub unsafe fn render(&mut self, window: &Window) -> Result<()> {
|
|
|
|
let in_flight_fence = self.data.in_flight_fences[self.frame];
|
2023-04-07 12:18:44 -04:00
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
self.device
|
|
|
|
.wait_for_fences(&[in_flight_fence], true, u64::max_value())?;
|
|
|
|
let result = self.device.acquire_next_image_khr(
|
|
|
|
self.data.swapchain,
|
|
|
|
u64::max_value(),
|
|
|
|
self.data.image_available_semaphores[self.frame],
|
|
|
|
vk::Fence::null(),
|
|
|
|
);
|
|
|
|
let image_index = match result {
|
|
|
|
Ok((image_index, _)) => image_index as usize,
|
|
|
|
Err(vk::ErrorCode::OUT_OF_DATE_KHR) => return self.recreate_swapchain(window),
|
|
|
|
Err(e) => return Err(anyhow!(e)),
|
|
|
|
};
|
|
|
|
|
|
|
|
let image_in_flight = self.data.images_in_flight[image_index];
|
|
|
|
if !image_in_flight.is_null() {
|
|
|
|
self.device
|
|
|
|
.wait_for_fences(&[image_in_flight], true, u64::max_value())?;
|
2023-04-07 12:18:44 -04:00
|
|
|
}
|
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
self.data.images_in_flight[image_index] = in_flight_fence;
|
2023-04-07 12:18:44 -04:00
|
|
|
|
2023-04-07 11:20:48 -04:00
|
|
|
let wait_semaphores = &[self.data.image_available_semaphores[self.frame]];
|
|
|
|
let wait_stages = &[vk::PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT];
|
2023-04-07 14:48:12 -04:00
|
|
|
let command_buffers = &[self.data.command_buffers[image_index]];
|
2023-04-07 11:20:48 -04:00
|
|
|
let signal_semaphores = &[self.data.render_finished_semaphores[self.frame]];
|
|
|
|
let submit_info = vk::SubmitInfo::builder()
|
|
|
|
.wait_semaphores(wait_semaphores)
|
|
|
|
.wait_dst_stage_mask(wait_stages)
|
|
|
|
.command_buffers(command_buffers)
|
|
|
|
.signal_semaphores(signal_semaphores);
|
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
self.device.reset_fences(&[in_flight_fence])?;
|
2023-04-07 12:18:44 -04:00
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
self.device
|
|
|
|
.queue_submit(self.data.graphics_queue, &[submit_info], in_flight_fence)?;
|
2023-04-07 11:20:48 -04:00
|
|
|
|
|
|
|
let swapchains = &[self.data.swapchain];
|
|
|
|
let image_indices = &[image_index as u32];
|
|
|
|
let present_info = vk::PresentInfoKHR::builder()
|
|
|
|
.wait_semaphores(signal_semaphores)
|
|
|
|
.swapchains(swapchains)
|
|
|
|
.image_indices(image_indices);
|
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
let result = self
|
|
|
|
.device
|
|
|
|
.queue_present_khr(self.data.present_queue, &present_info);
|
|
|
|
|
|
|
|
let changed = result == Ok(vk::SuccessCode::SUBOPTIMAL_KHR)
|
|
|
|
|| result == Err(vk::ErrorCode::OUT_OF_DATE_KHR);
|
|
|
|
if self.resized || changed {
|
|
|
|
self.recreate_swapchain(window)?;
|
|
|
|
} else if let Err(e) = result {
|
|
|
|
return Err(anyhow!(e));
|
|
|
|
}
|
2023-04-07 11:20:48 -04:00
|
|
|
|
|
|
|
self.frame = (self.frame + 1) % MAX_FRAMES_IN_FLIGHT;
|
|
|
|
|
2023-03-31 10:50:34 -04:00
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
/// Recreates the swapchain
|
2023-04-07 10:48:51 -04:00
|
|
|
///
|
|
|
|
/// # Safety
|
|
|
|
/// Here be Dragons
|
2023-04-07 14:48:12 -04:00
|
|
|
fn recreate_swapchain(&mut self, window: &Window) -> Result<()> {
|
|
|
|
unsafe {
|
|
|
|
self.device.device_wait_idle()?;
|
|
|
|
self.destroy_swapchain();
|
|
|
|
|
|
|
|
create_swapchain(window, &self.instance, &self.device, &mut self.data)?;
|
|
|
|
create_swapchain_image_views(&self.device, &mut self.data)?;
|
|
|
|
create_render_pass(&self.instance, &self.device, &mut self.data)?;
|
|
|
|
create_pipeline(&self.device, &mut self.data)?;
|
|
|
|
create_framebuffers(&self.device, &mut self.data)?;
|
|
|
|
create_command_buffers(&self.device, &mut self.data)?;
|
|
|
|
|
|
|
|
self.data
|
|
|
|
.images_in_flight
|
|
|
|
.resize(self.data.swapchain_images.len(), vk::Fence::null());
|
2023-04-05 10:13:39 -04:00
|
|
|
}
|
|
|
|
|
2023-04-07 14:48:12 -04:00
|
|
|
Ok(())
|
2023-03-31 11:09:20 -04:00
|
|
|
}
|
2023-03-31 10:50:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/// The Vulkan handles and associated properties used by our Vulkan app.
|
|
|
|
#[derive(Clone, Debug, Default)]
|
2023-04-05 10:48:25 -04:00
|
|
|
pub struct AppData {
|
2023-04-05 15:41:32 -04:00
|
|
|
// Debug
|
2023-04-05 10:13:39 -04:00
|
|
|
messenger: vk::DebugUtilsMessengerEXT,
|
2023-04-05 16:34:09 -04:00
|
|
|
// Surface
|
|
|
|
surface: vk::SurfaceKHR,
|
2023-04-05 15:41:32 -04:00
|
|
|
// Physical Device / Logical Device
|
2023-04-05 11:08:36 -04:00
|
|
|
physical_device: vk::PhysicalDevice,
|
2023-04-05 13:04:20 -04:00
|
|
|
graphics_queue: vk::Queue,
|
2023-04-05 15:41:32 -04:00
|
|
|
present_queue: vk::Queue,
|
2023-04-06 15:28:09 -04:00
|
|
|
// Swapchain
|
2023-04-05 16:34:09 -04:00
|
|
|
swapchain_format: vk::Format,
|
|
|
|
swapchain_extent: vk::Extent2D,
|
|
|
|
swapchain: vk::SwapchainKHR,
|
|
|
|
swapchain_images: Vec<vk::Image>,
|
2023-04-06 14:35:50 -04:00
|
|
|
swapchain_image_views: Vec<vk::ImageView>,
|
2023-04-07 10:48:51 -04:00
|
|
|
// Pipeline
|
2023-04-07 10:03:59 -04:00
|
|
|
render_pass: vk::RenderPass,
|
|
|
|
pipeline_layout: vk::PipelineLayout,
|
2023-04-07 10:10:11 -04:00
|
|
|
pipeline: vk::Pipeline,
|
2023-04-07 10:48:51 -04:00
|
|
|
// Framebuffers
|
|
|
|
framebuffers: Vec<vk::Framebuffer>,
|
|
|
|
// Command Pool
|
|
|
|
command_pool: vk::CommandPool,
|
2023-04-12 10:28:48 -04:00
|
|
|
// Buffers
|
|
|
|
vertex_buffer: vk::Buffer,
|
|
|
|
vertex_buffer_memory: vk::DeviceMemory,
|
2023-04-07 10:48:51 -04:00
|
|
|
// Command Buffers
|
|
|
|
command_buffers: Vec<vk::CommandBuffer>,
|
2023-04-07 11:20:48 -04:00
|
|
|
// Sync Objects
|
|
|
|
image_available_semaphores: Vec<vk::Semaphore>,
|
|
|
|
render_finished_semaphores: Vec<vk::Semaphore>,
|
2023-04-07 12:18:44 -04:00
|
|
|
in_flight_fences: Vec<vk::Fence>,
|
|
|
|
images_in_flight: Vec<vk::Fence>,
|
2023-04-05 10:13:39 -04:00
|
|
|
}
|
2023-04-05 10:48:25 -04:00
|
|
|
|
2023-04-06 15:28:09 -04:00
|
|
|
impl AppData {}
|
|
|
|
|
2023-04-05 10:48:25 -04:00
|
|
|
#[derive(Debug, Error)]
|
|
|
|
#[error("Missing {0}.")]
|
|
|
|
pub struct SuitabilityError(pub &'static str);
|
|
|
|
|
2023-04-05 11:08:36 -04:00
|
|
|
#[derive(Copy, Clone, Debug)]
|
2023-04-06 15:28:09 -04:00
|
|
|
pub(crate) struct QueueFamilyIndices {
|
2023-04-05 11:08:36 -04:00
|
|
|
graphics: u32,
|
2023-04-05 15:41:32 -04:00
|
|
|
present: u32,
|
2023-04-05 11:08:36 -04:00
|
|
|
}
|
|
|
|
|
2023-04-06 15:28:09 -04:00
|
|
|
impl QueueFamilyIndices {
|
2023-04-05 11:08:36 -04:00
|
|
|
unsafe fn get(
|
|
|
|
instance: &Instance,
|
|
|
|
data: &AppData,
|
|
|
|
physical_device: vk::PhysicalDevice,
|
|
|
|
) -> Result<Self> {
|
|
|
|
let properties = instance.get_physical_device_queue_family_properties(physical_device);
|
|
|
|
|
|
|
|
let graphics = properties
|
|
|
|
.iter()
|
|
|
|
.position(|p| p.queue_flags.contains(vk::QueueFlags::GRAPHICS))
|
|
|
|
.map(|i| i as u32);
|
|
|
|
|
2023-04-05 15:41:32 -04:00
|
|
|
let mut present = None;
|
2023-04-06 14:35:50 -04:00
|
|
|
for (index, _properties) in properties.iter().enumerate() {
|
2023-04-05 15:41:32 -04:00
|
|
|
if instance.get_physical_device_surface_support_khr(
|
|
|
|
physical_device,
|
|
|
|
index as u32,
|
|
|
|
data.surface,
|
|
|
|
)? {
|
|
|
|
present = Some(index as u32);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if let (Some(graphics), Some(present)) = (graphics, present) {
|
|
|
|
Ok(Self { graphics, present })
|
2023-04-05 11:08:36 -04:00
|
|
|
} else {
|
|
|
|
Err(anyhow!(SuitabilityError(
|
|
|
|
"Missing required queue families."
|
|
|
|
)))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-04-05 16:34:09 -04:00
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
pub(crate) struct SwapchainSupport {
|
|
|
|
capabilities: vk::SurfaceCapabilitiesKHR,
|
|
|
|
formats: Vec<vk::SurfaceFormatKHR>,
|
|
|
|
present_modes: Vec<vk::PresentModeKHR>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SwapchainSupport {
|
|
|
|
unsafe fn get(
|
|
|
|
instance: &Instance,
|
|
|
|
data: &AppData,
|
|
|
|
physical_device: vk::PhysicalDevice,
|
|
|
|
) -> Result<Self> {
|
|
|
|
Ok(Self {
|
|
|
|
capabilities: instance
|
|
|
|
.get_physical_device_surface_capabilities_khr(physical_device, data.surface)?,
|
|
|
|
formats: instance
|
|
|
|
.get_physical_device_surface_formats_khr(physical_device, data.surface)?,
|
|
|
|
present_modes: instance
|
|
|
|
.get_physical_device_surface_present_modes_khr(physical_device, data.surface)?,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2023-04-12 10:28:48 -04:00
|
|
|
|
|
|
|
#[repr(C)]
|
|
|
|
#[derive(Copy, Clone, Debug)]
|
|
|
|
pub(crate) struct Vertex {
|
|
|
|
pos: glm::Vec2,
|
|
|
|
color: glm::Vec3,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Vertex {
|
|
|
|
fn new(pos: glm::Vec2, color: glm::Vec3) -> Self {
|
|
|
|
Self { pos, color }
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn binding_description() -> vk::VertexInputBindingDescription {
|
|
|
|
vk::VertexInputBindingDescription::builder()
|
|
|
|
.binding(0)
|
|
|
|
.stride(size_of::<Vertex>() as u32)
|
|
|
|
.input_rate(vk::VertexInputRate::VERTEX)
|
|
|
|
.build()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn attribute_descriptions() -> [vk::VertexInputAttributeDescription; 2] {
|
|
|
|
let pos = vk::VertexInputAttributeDescription::builder()
|
|
|
|
.binding(0)
|
|
|
|
.location(0)
|
|
|
|
.format(vk::Format::R32G32_SFLOAT)
|
|
|
|
.offset(0)
|
|
|
|
.build();
|
|
|
|
|
|
|
|
let color = vk::VertexInputAttributeDescription::builder()
|
|
|
|
.binding(0)
|
|
|
|
.location(1)
|
|
|
|
.format(vk::Format::R32G32B32_SFLOAT)
|
|
|
|
.offset(size_of::<glm::Vec2>() as u32)
|
|
|
|
.build();
|
|
|
|
|
|
|
|
[pos, color]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lazy_static! {
|
|
|
|
pub(crate) static ref VERTICES: Vec<Vertex> = vec![
|
|
|
|
Vertex::new(glm::vec2(0.0, -0.5), glm::vec3(1.0, 0.0, 0.0)),
|
|
|
|
Vertex::new(glm::vec2(0.5, 0.5), glm::vec3(0.0, 1.0, 0.0)),
|
|
|
|
Vertex::new(glm::vec2(-0.5, 0.5), glm::vec3(0.0, 0.0, 1.0)),
|
|
|
|
];
|
|
|
|
}
|