Class RenderVulkanGLFWModuleRenderModuleSurface

java.lang.Object
io.codetoil.curved_spacetime.render.vulkan.RenderVulkanModuleSurface
io.codetoil.curved_spacetime.render.vulkan_glfw.RenderVulkanGLFWModuleRenderModuleSurface

public class RenderVulkanGLFWModuleRenderModuleSurface extends RenderVulkanModuleSurface
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 RenderVulkanModuleSurface.SurfaceFormat surfaceFormat
      The pixel format and colour space negotiated for this surface.
    • vkSurface

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

    • RenderVulkanGLFWModuleRenderModuleSurface

      public RenderVulkanGLFWModuleRenderModuleSurface(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