summaryrefslogtreecommitdiff
path: root/src/renderer/render.c
diff options
context:
space:
mode:
authoromnisci3nce <17525998+omnisci3nce@users.noreply.github.com>2024-03-23 17:53:42 +1100
committeromnisci3nce <17525998+omnisci3nce@users.noreply.github.com>2024-03-23 17:53:42 +1100
commit411992fad179c4e45d044cd3dab86dc460ce15ac (patch)
treefc4b69a9c733894cd043844c3296e991ef3bc52c /src/renderer/render.c
parentdf80f2cf0b851b527f715ebfe385dc4930a61512 (diff)
vk debugger and physical device selection
omg.
Diffstat (limited to 'src/renderer/render.c')
-rw-r--r--src/renderer/render.c6
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;