From 86a82d9a6aac3e4984d14ba48f978d28bcf06464 Mon Sep 17 00:00:00 2001 From: hYdos Date: Tue, 3 Mar 2020 16:16:41 +1000 Subject: [PATCH] yus --- .../java/com/github/hydos/ginger/VulkanStarter.java | 6 +++--- .../hydos/ginger/engine/vulkan/VKRenderRegister.java | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/github/hydos/ginger/engine/vulkan/VKRenderRegister.java diff --git a/src/main/java/com/github/hydos/ginger/VulkanStarter.java b/src/main/java/com/github/hydos/ginger/VulkanStarter.java index b739c78..269fb83 100644 --- a/src/main/java/com/github/hydos/ginger/VulkanStarter.java +++ b/src/main/java/com/github/hydos/ginger/VulkanStarter.java @@ -354,12 +354,11 @@ public class VulkanStarter float time = 0.0f; while (!GLFW.glfwWindowShouldClose(Window.getWindow())) { - // Handle window messages. Resize events happen exactly here. - // So it is safe to use the new swapchain images and framebuffers afterwards. GLFW.glfwPollEvents(); if (swapchainRecreator.mustRecreate) swapchainRecreator.recreate(); - // Create a semaphore to wait for the swapchain to acquire the next image + + err = VK12.vkCreateSemaphore(device, semaphoreCreateInfo, null, pImageAcquiredSemaphore); if (err != VK12.VK_SUCCESS) { throw new AssertionError("Failed to create image acquired semaphore: " + VKUtils.translateVulkanResult(err)); } @@ -381,6 +380,7 @@ public class VulkanStarter lastTime = thisTime; ubo.updateUbo(device, time); // Submit to the graphics queue + err = VK12.vkQueueSubmit(queue, submitInfo, VK12.VK_NULL_HANDLE); if (err != VK12.VK_SUCCESS) { throw new AssertionError("Failed to submit render queue: " + VKUtils.translateVulkanResult(err)); } diff --git a/src/main/java/com/github/hydos/ginger/engine/vulkan/VKRenderRegister.java b/src/main/java/com/github/hydos/ginger/engine/vulkan/VKRenderRegister.java new file mode 100644 index 0000000..d7d71cd --- /dev/null +++ b/src/main/java/com/github/hydos/ginger/engine/vulkan/VKRenderRegister.java @@ -0,0 +1,10 @@ +package com.github.hydos.ginger.engine.vulkan; + +import org.lwjgl.vulkan.VkQueue; + +public class VKRenderRegister +{ + public static VkQueue renderQueue;//used for queueing up render updates + + +}