diff options
author | omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-23 17:53:42 +1100 |
---|---|---|
committer | omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-23 17:53:42 +1100 |
commit | 411992fad179c4e45d044cd3dab86dc460ce15ac (patch) | |
tree | fc4b69a9c733894cd043844c3296e991ef3bc52c /src/renderer/render.c | |
parent | df80f2cf0b851b527f715ebfe385dc4930a61512 (diff) |
vk debugger and physical device selection
omg.
Diffstat (limited to 'src/renderer/render.c')
-rw-r--r-- | src/renderer/render.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |