diff --git a/.idea/editor.xml b/.idea/editor.xml
index 204e8cc..b7750c8 100644
--- a/.idea/editor.xml
+++ b/.idea/editor.xml
@@ -53,13 +53,11 @@
-
-
-
-
+
+
+
-
@@ -83,5 +81,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index c2cdd87..96620d7 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,5 +1,8 @@
+
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78fcb02..45d44be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,8 @@ elseif ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ARM64" OR "${CMAKE_SYSTEM_PROCESSO
set(IS_ARCH_ARM64 TRUE)
endif ()
+message("Home Dir: ${USER_HOME_DIRECTORY}")
+
set(CMAKE_CXX_STANDARD 20)
add_executable(TechDemo main.cpp Levels/TestLevel.cpp Levels/TestLevel.h Levels/MainMenu.cpp Levels/MainMenu.h
@@ -33,7 +35,7 @@ add_executable(TechDemo main.cpp Levels/TestLevel.cpp Levels/TestLevel.h Levels/
if (IS_OS_WINDOWS)
add_compile_definitions(VK_USE_PLATFORM_WIN32_KHR)
elseif (IS_OS_LINUX)
- add_compile_definitions(VK_USE_PLATFORM_XCB_KHR EHS_WS_XCB)
+ add_compile_definitions(VK_USE_PLATFORM_WAYLAND_KHR EHS_WS_WAYLAND)
endif()
target_link_directories(TechDemo PRIVATE "${USER_HOME_DIRECTORY}/.local/lib")
@@ -60,4 +62,4 @@ else ()
message(STATUS "OpenSSL was not found.")
endif ()
-target_link_libraries(TechDemo PRIVATE Vulkan::Headers Vulkan::Vulkan xcb xcb-cursor xcb-xfixes xcb-xinput OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB asound LWE EHC EHE EHS)
\ No newline at end of file
+target_link_libraries(TechDemo PRIVATE Vulkan::Headers Vulkan::Vulkan wayland-client xcb xcb-cursor xcb-xfixes xcb-xinput OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB asound LWE EHC EHE EHS)
\ No newline at end of file
diff --git a/Levels/TestLevel.cpp b/Levels/TestLevel.cpp
index 1dfbd39..0aaef2a 100644
--- a/Levels/TestLevel.cpp
+++ b/Levels/TestLevel.cpp
@@ -1,6 +1,6 @@
#include "TestLevel.h"
-#include
+#include
#include
#include
#include
@@ -87,6 +87,7 @@ void TestLevel::SetupResources(lwe::GpuInterface* inf)
lwe::GpuModel* vampire = new lwe::GpuModel("resources/models/Vampire.ehm", inf);
AddResource(vampire);
+
AddResource(new lwe::GpuImg("resources/textures/Character_Diffuse.png", inf, lwe::IMG_ASPECT_COLOR));
AddResource(new lwe::GpuImg("resources/textures/Character_Normal.png", inf, lwe::IMG_ASPECT_COLOR));
AddResource(new lwe::GpuImg("resources/textures/Character_Specular.png", inf, lwe::IMG_ASPECT_COLOR));
@@ -100,7 +101,6 @@ void TestLevel::SetupResources(lwe::GpuInterface* inf)
AddResource(new lwe::GpuModel("resources/models/Cube.ehm", inf));
AddResource(new lwe::GpuModel("resources/models/Sphere.ehm", inf));
- AddResource(new lwe::GpuModel("resources/models/PointLight.ehm", inf));
lwe::GpuCubeMap* cm = new lwe::GpuCubeMap(inf, "resources/textures/skybox", "Skybox");
AddResource(cm);
@@ -285,7 +285,7 @@ void TestLevel::Setup(lwe::GpuInterface* inf)
deltaTime->SetText("Delta Time: " + ehs::Str_8::FromNum(gl->GetRawDeltaTime()));
lwe::LabelGui* gbg = (lwe::LabelGui*)stats->GetChild("Garbage");
- gbg->SetText("Garbage: " + ehs::Str_8::FromNum(ehs::GarbageCollector::Size()));
+ gbg->SetText("Garbage: " + ehs::Str_8::FromNum(ehs::GC::Size()));
}});
/*
@@ -486,7 +486,7 @@ void TestLevel::OnUpdate(lwe::RenderWindow* win, ehs::Input* input, const float
if (!ent)
return;
- ent->SetRot(ent->GetRot() + ehs::Vec3_f(50.0f) * delta);
+ //ent->SetRot(ent->GetRot() + ehs::Vec3_f(50.0f) * delta);
lwe::Entity* ply = GetEntity("Player");
if (ply && win->IsCursorConstrained() && !win->IsCursorVisible())
diff --git a/main.cpp b/main.cpp
index 1a6baca..0eff165 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,6 +1,6 @@
#include
#include
-#include
+#include
#include
#include
#include
@@ -24,6 +24,8 @@ ehs::SInt_32 Main(ehs::Str_8* appName, ehs::Str_8* appVerId, ehs::Version* appVe
*appVerId = "Release";
*appVer = {1, 0, 0};
+ ehs::Log::EnableImmediateMode(true);
+
ehs::File configFile("Config.json", ehs::Mode::READ_WRITE, ehs::Disposition::OPEN_PERSISTENT);
if (!configFile.Size())
@@ -74,7 +76,7 @@ ehs::SInt_32 Main(ehs::Str_8* appName, ehs::Str_8* appVerId, ehs::Version* appVe
ehs::Console::SetTitle_8("TechDemo");
- EHS_LOG("Info", 0, "Initializing server, standby.");
+ EHS_LOG(ehs::LogType::INFO, 0, "Initializing server, standby.");
lwe::GameLoop gl((ehs::UInt_8)*(ehs::JsonNum*)config.RetrieveValue("engine.threadCount"), 0);
gl.EnableTimeLock(*(ehs::JsonBool*)config.RetrieveValue("engine.timeLocked"));
@@ -93,11 +95,15 @@ ehs::SInt_32 Main(ehs::Str_8* appName, ehs::Str_8* appVerId, ehs::Version* appVe
#if defined(EHS_OS_WINDOWS)
lwe::GpuInstance::AddExtension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
#elif defined(EHS_OS_LINUX)
- lwe::GpuInstance::AddExtension(VK_KHR_XCB_SURFACE_EXTENSION_NAME);
+ #if defined(EHS_WS_WAYLAND)
+ lwe::GpuInstance::AddExtension(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME);
+ #elif defined(EHS_WS_XCB)
+ lwe::GpuInstance::AddExtension(VK_KHR_XCB_SURFACE_EXTENSION_NAME);
+ #endif
#endif
lwe::GpuInstance::AddExtension(VK_KHR_SURFACE_EXTENSION_NAME);
- lwe::GpuInstance::Initialize(false);
+ lwe::GpuInstance::Initialize(true);
lwe::GpuDevice device = std::move(lwe::GpuDevice::GetBest());
lwe::GpuQueueFamily* family = device.GetQueueFamily(lwe::QueueType::GRAPHICS);