From df861ee241cbe91f6319ea593fd630d160b135b8 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Thu, 14 Jan 2021 08:48:55 +0100 Subject: Refactor code for multiplatform --- src/main.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 5b321ff..cbaa798 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,14 +1,26 @@ #include -#include #include #include #include #include -#include "rt.hpp" + +#if defined(LINUX) +#include +#include +#elif defined(WINDOWS) +#include +#endif + #include "vk-renderer.hpp" #include "thirdparty/renderdoc.h" +#include "vec3.hpp" +#include "material.hpp" +#include "sphere.hpp" +#include "camera.hpp" +#include "utils.hpp" + color ground_color { 1.0, 1.0, 1.0 }; color sky_color { 0.5, 0.7, 1.0 }; @@ -77,7 +89,7 @@ int main() { int ret = RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_1_2, (void **)&rdoc_api); assert(ret == 1); } -#elif LINUX +#elif defined(LINUX) // At init, on linux/android. // For android replace librenderdoc.so with libVkLayer_GLES_RenderDoc.so if(void *mod = dlopen("librenderdoc.so", RTLD_NOW | RTLD_NOLOAD)) -- cgit v1.3