Updated for recent back-end changes.
This commit is contained in:
parent
75b6eb66d3
commit
c1b83d07fd
15
.idea/editor.xml
generated
15
.idea/editor.xml
generated
@ -53,13 +53,11 @@
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
@ -83,5 +81,12 @@
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINKAGE_SPECIFICATION_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
</component>
|
||||
</project>
|
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakePythonSetting">
|
||||
<option name="pythonIntegrationState" value="YES" />
|
||||
</component>
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="ASK" />
|
||||
|
@ -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)
|
||||
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)
|
@ -1,6 +1,6 @@
|
||||
#include "TestLevel.h"
|
||||
|
||||
#include <ehs/GarbageCollector.h>
|
||||
#include <ehs/GC.h>
|
||||
#include <ehs/io/Console.h>
|
||||
#include <ehs/io/File.h>
|
||||
#include <ehs/io/socket/DNS.h>
|
||||
@ -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())
|
||||
|
12
main.cpp
12
main.cpp
@ -1,6 +1,6 @@
|
||||
#include <ehs/Str.h>
|
||||
#include <ehs/Log.h>
|
||||
#include <ehs/GarbageCollector.h>
|
||||
#include <ehs/GC.h>
|
||||
#include <ehs/Array.h>
|
||||
#include <ehs/io/File.h>
|
||||
#include <ehs/io/Console.h>
|
||||
@ -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)
|
||||
#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);
|
||||
|
Loading…
Reference in New Issue
Block a user