From 411992fad179c4e45d044cd3dab86dc460ce15ac Mon Sep 17 00:00:00 2001 From: omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 23 Mar 2024 17:53:42 +1100 Subject: vk debugger and physical device selection omg. --- src/renderer/render.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/renderer/render.c') diff --git a/src/renderer/render.c b/src/renderer/render.c index 8e67fa6..45762d4 100644 --- a/src/renderer/render.c +++ b/src/renderer/render.c @@ -28,11 +28,14 @@ bool renderer_init(renderer* ren) { // NOTE: all platforms use GLFW at the moment but thats subject to change glfwInit(); - DEBUG("init graphics api (OpenGL) backend"); +#if defined(CEL_REND_BACKEND_OPENGL) glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#elif defined(CEL_REND_BACKEND_VULKAN) + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); +#endif // glfw window creation GLFWwindow* window = glfwCreateWindow(ren->config.scr_width, ren->config.scr_height, @@ -46,6 +49,7 @@ bool renderer_init(renderer* ren) { glfwMakeContextCurrent(ren->window); + DEBUG("init graphics api backend"); if (!gfx_backend_init(ren)) { FATAL("Couldnt load graphics api backend"); return false; -- cgit v1.2.3-70-g09d2