diff --git a/CMakeLists.txt b/CMakeLists.txt index 44afd3b..20b46c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ if (IS_OS_WINDOWS) target_link_libraries(SpriteGen PRIVATE ws2_32 avrt) elseif (IS_OS_LINUX) - add_compile_definitions(VK_USE_PLATFORM_WAYLAND_KHR EHS_WS_WAYLAND) + add_compile_definitions(VK_USE_PLATFORM_XCB_KHR EHS_WS_XCB) target_link_directories(SpriteGen PRIVATE "${USER_HOME_DIRECTORY}/.local/lib") target_include_directories(SpriteGen PRIVATE "${USER_HOME_DIRECTORY}/.local/include") @@ -80,4 +80,4 @@ elseif (IS_OS_LINUX) target_link_libraries(SpriteGen PRIVATE wayland-client xcb xcb-cursor xcb-xfixes xcb-xinput asound) endif() -target_link_libraries(SpriteGen PRIVATE Vulkan::Headers Vulkan::Vulkan OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB LWE EHC EHE EHS_STC) \ No newline at end of file +target_link_libraries(SpriteGen PRIVATE Vulkan::Headers Vulkan::Vulkan OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB LWE EHC EHE EHS_Stc) \ No newline at end of file diff --git a/MainLvl.cpp b/MainLvl.cpp index 9a09aff..eb56611 100644 --- a/MainLvl.cpp +++ b/MainLvl.cpp @@ -1,5 +1,7 @@ #include "MainLvl.h" +#include +#include #include #include #include @@ -54,6 +56,24 @@ void MainLvl::SetupResources(lwe::GpuInterface *inf) void MainLvl::Setup(lwe::GpuInterface *inf) { + lwe::GameLoop* gl = GetParent(); + if (!gl) + return; + + lwe::RenderWindow *win = gl->GetWindow(); + if (!win) + return; + + lwe::GpuSwapChain *swap = win->GetSwapChain(); + if (!swap) + return; + + lwe::GpuRenderPass *pass = swap->GetRenderPass(); + if (!pass) + return; + + pass->SetClearColor({1.0f, 1.0f, 1.0f}); + Level::Setup(inf); //Your setup code here.