summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-25 22:20:54 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-10-26 08:55:05 +0300
commit4dd8f68120bc3d3be94e0556ccfef9ee4bf8311a (patch)
tree8d0dd1b58dedbdae7a84d1f36317e411ebabcdf2 /main
parent2b505b74b9b0a7005586ecaa9aa1236e86b18437 (diff)
Fix build with Vulkan disabled and no Vulkan headers installed.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index bb6ab11362..56817c58ed 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1590,11 +1590,17 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// Now validate whether the selected driver matches with the renderer.
bool valid_combination = false;
Vector<String> available_drivers;
+#ifdef VULKAN_ENABLED
if (rendering_method == "forward_plus" || rendering_method == "mobile") {
available_drivers.push_back("vulkan");
- } else if (rendering_method == "gl_compatibility") {
+ }
+#endif
+#ifdef GLES3_ENABLED
+ if (rendering_method == "gl_compatibility") {
available_drivers.push_back("opengl3");
- } else {
+ }
+#endif
+ if (available_drivers.is_empty()) {
OS::get_singleton()->print("Unknown renderer name '%s', aborting.\n", rendering_method.utf8().get_data());
goto error;
}