yus
parent
1feffa5cd0
commit
86a82d9a6a
|
@ -354,12 +354,11 @@ public class VulkanStarter
|
||||||
float time = 0.0f;
|
float time = 0.0f;
|
||||||
while (!GLFW.glfwWindowShouldClose(Window.getWindow()))
|
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();
|
GLFW.glfwPollEvents();
|
||||||
if (swapchainRecreator.mustRecreate)
|
if (swapchainRecreator.mustRecreate)
|
||||||
swapchainRecreator.recreate();
|
swapchainRecreator.recreate();
|
||||||
// Create a semaphore to wait for the swapchain to acquire the next image
|
|
||||||
|
|
||||||
err = VK12.vkCreateSemaphore(device, semaphoreCreateInfo, null, pImageAcquiredSemaphore);
|
err = VK12.vkCreateSemaphore(device, semaphoreCreateInfo, null, pImageAcquiredSemaphore);
|
||||||
if (err != VK12.VK_SUCCESS)
|
if (err != VK12.VK_SUCCESS)
|
||||||
{ throw new AssertionError("Failed to create image acquired semaphore: " + VKUtils.translateVulkanResult(err)); }
|
{ throw new AssertionError("Failed to create image acquired semaphore: " + VKUtils.translateVulkanResult(err)); }
|
||||||
|
@ -381,6 +380,7 @@ public class VulkanStarter
|
||||||
lastTime = thisTime;
|
lastTime = thisTime;
|
||||||
ubo.updateUbo(device, time);
|
ubo.updateUbo(device, time);
|
||||||
// Submit to the graphics queue
|
// Submit to the graphics queue
|
||||||
|
|
||||||
err = VK12.vkQueueSubmit(queue, submitInfo, VK12.VK_NULL_HANDLE);
|
err = VK12.vkQueueSubmit(queue, submitInfo, VK12.VK_NULL_HANDLE);
|
||||||
if (err != VK12.VK_SUCCESS)
|
if (err != VK12.VK_SUCCESS)
|
||||||
{ throw new AssertionError("Failed to submit render queue: " + VKUtils.translateVulkanResult(err)); }
|
{ throw new AssertionError("Failed to submit render queue: " + VKUtils.translateVulkanResult(err)); }
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue