pull/12/head
hYdos 2020-03-03 16:16:41 +10:00
parent 9a8fdc44a7
commit 4f4e41d990
2 changed files with 13 additions and 3 deletions

View File

@ -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)); }

View File

@ -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
}