This commit is contained in:
Arron David Nelson 2024-07-27 18:56:09 -07:00
parent 1cbba8dc35
commit 9be3b0d943
2 changed files with 22 additions and 2 deletions

View File

@ -72,7 +72,7 @@ if (IS_OS_WINDOWS)
target_link_libraries(SpriteGen PRIVATE ws2_32 avrt) target_link_libraries(SpriteGen PRIVATE ws2_32 avrt)
elseif (IS_OS_LINUX) 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_link_directories(SpriteGen PRIVATE "${USER_HOME_DIRECTORY}/.local/lib")
target_include_directories(SpriteGen PRIVATE "${USER_HOME_DIRECTORY}/.local/include") 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) target_link_libraries(SpriteGen PRIVATE wayland-client xcb xcb-cursor xcb-xfixes xcb-xinput asound)
endif() endif()
target_link_libraries(SpriteGen PRIVATE Vulkan::Headers Vulkan::Vulkan OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB LWE EHC EHE EHS_STC) target_link_libraries(SpriteGen PRIVATE Vulkan::Headers Vulkan::Vulkan OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB LWE EHC EHE EHS_Stc)

View File

@ -1,5 +1,7 @@
#include "MainLvl.h" #include "MainLvl.h"
#include <lwe/GameLoop.h>
#include <lwe/RenderWindow.h>
#include <lwe/systems/GuiSystem.h> #include <lwe/systems/GuiSystem.h>
#include <lwe/gpu/GpuFontAtlas.h> #include <lwe/gpu/GpuFontAtlas.h>
#include <lwe/gui/ButtonGui.h> #include <lwe/gui/ButtonGui.h>
@ -54,6 +56,24 @@ void MainLvl::SetupResources(lwe::GpuInterface *inf)
void MainLvl::Setup(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); Level::Setup(inf);
//Your setup code here. //Your setup code here.