Class VulkanGLFWRenderModuleRenderModuleSurface

java.lang.Object
io.codetoil.curved_spacetime.render.vulkan.VulkanRenderModuleSurface
io.codetoil.curved_spacetime.render.vulkan_glfw.VulkanGLFWRenderModuleRenderModuleSurface

public class VulkanGLFWRenderModuleRenderModuleSurface extends VulkanRenderModuleSurface
A Vulkan surface created from a GLFW window.

GLFW handles the platform-specific part of surface creation, so this class does not need to know whether it is running on X11, Wayland, Win32, or Cocoa. Capabilities and format are queried once at construction, which means the surface must be recreated if the window is resized.

  • Field Details

    • surfaceCaps

      protected final org.lwjgl.vulkan.VkSurfaceCapabilitiesKHR surfaceCaps
      What this surface supports, queried at construction.
    • surfaceFormat

      protected final VulkanRenderModuleSurface.SurfaceFormat surfaceFormat
      The pixel format and colour space negotiated for this surface.
    • vkSurface

      protected final long vkSurface
      The underlying Vulkan surface handle.
  • Constructor Details

    • VulkanGLFWRenderModuleRenderModuleSurface

      public VulkanGLFWRenderModuleRenderModuleSurface(VulkanModuleVulkanInstance vulkanModuleVulkanInstance, VulkanModulePhysicalDevice vulkanModulePhysicalDevice, long windowHandle, Logger logger)
      Creates a Vulkan surface onto the given GLFW window.
      Parameters:
      vulkanModuleVulkanInstance - the instance to create the surface against
      vulkanModulePhysicalDevice - the device to query surface support on
      windowHandle - the GLFW window to present into
      logger - the logger to write surface diagnostics to
      Throws:
      AssertionError - if the surface capabilities or formats cannot be queried
  • Method Details