Class RenderVulkanGLFWModuleWindow
java.lang.Object
io.codetoil.curved_spacetime.render.RenderModuleWindow
io.codetoil.curved_spacetime.render.glfw.RenderGLFWModuleWindow
io.codetoil.curved_spacetime.render.vulkan_glfw.RenderVulkanGLFWModuleWindow
A GLFW window configured for Vulkan rather than OpenGL.
Supplies the two API-specific pieces RenderGLFWModuleWindow leaves open: checking that a Vulkan driver is
present, and setting GLFW_CLIENT_API to GLFW_NO_API so GLFW does not create an OpenGL context for a
window Vulkan will render into.
-
Field Summary
Fields inherited from class RenderGLFWModuleWindow
height, initialized, width, windowHandleFields inherited from class RenderModuleWindow
engine, logger, renderModuleKeyboardInput, renderModuleMouseInput, shouldClose, title -
Constructor Summary
ConstructorsConstructorDescriptionRenderVulkanGLFWModuleWindow(Engine mainModuleEngine, String title, Logger logger) Creates a Vulkan-capable GLFW window. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether a driver for the subclass's graphics API is present.protected voidApplies the GLFW window hints the subclass's graphics API requires.protected voidFails with a message naming the graphics API that could not be found.Methods inherited from class RenderGLFWModuleWindow
clean, getHeight, getWidth, getWindowHandle, init, isInitialized, loop, setShouldClose, shouldCloseMethods inherited from class RenderModuleWindow
getKeyboardInput, getMouseInput, pollEvents, resetInput
-
Constructor Details
-
RenderVulkanGLFWModuleWindow
Creates a Vulkan-capable GLFW window.Nothing is opened until
RenderGLFWModuleWindow.init()is called.- Parameters:
mainModuleEngine- the engine this window belongs totitle- the window's title bar textlogger- the logger to write window diagnostics to
-
-
Method Details
-
doesDriverExist
public boolean doesDriverExist()Description copied from class:RenderGLFWModuleWindowReturns whether a driver for the subclass's graphics API is present.Checked during
RenderGLFWModuleWindow.init(), before the window is created, so that an unusable environment is reported before any resource is acquired.- Specified by:
doesDriverExistin classRenderGLFWModuleWindow- Returns:
trueif the graphics API can be used on this machine
-
throwDriverNotFoundException
protected void throwDriverNotFoundException()Description copied from class:RenderGLFWModuleWindowFails with a message naming the graphics API that could not be found.Called when
RenderGLFWModuleWindow.doesDriverExist()returnsfalse; implementations are expected to throw rather than return.- Specified by:
throwDriverNotFoundExceptionin classRenderGLFWModuleWindow
-
setWindowHints
protected void setWindowHints()Description copied from class:RenderGLFWModuleWindowApplies the GLFW window hints the subclass's graphics API requires.Called before the window is created. A Vulkan implementation, for example, sets
GLFW_CLIENT_APItoGLFW_NO_APIso GLFW does not create an OpenGL context.- Specified by:
setWindowHintsin classRenderGLFWModuleWindow
-