Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Misc Update #370

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
972fec5
feat: misc runtime update
FlyAndNotDown Oct 14, 2024
fa80ecb
feat: trunk and trunk list container
FlyAndNotDown Oct 18, 2024
970857a
refactor: update render module structure
FlyAndNotDown Oct 18, 2024
b3b2016
refactor: move render module initialization to engine internal
FlyAndNotDown Oct 19, 2024
05e3e59
feat: trunk and trunk list test
FlyAndNotDown Oct 23, 2024
2794575
fix: fix serialize stream endian issue
FlyAndNotDown Oct 28, 2024
343054f
feat: gameplay framework update
FlyAndNotDown Oct 29, 2024
870a1d1
fix: macos build issue
FlyAndNotDown Nov 2, 2024
32319b6
feat: gameplay framework update
FlyAndNotDown Nov 4, 2024
9ac9193
feat: delete x86_64 macos support
FlyAndNotDown Nov 10, 2024
7d2c9bc
feat: new gameplay framework
FlyAndNotDown Nov 10, 2024
7683e36
feat: new gameplay framework
FlyAndNotDown Nov 16, 2024
a94ce79
feat: support rvalue for Mirror::Any
FlyAndNotDown Nov 16, 2024
3127ab7
feat: support inplace new for Mirror::Any
FlyAndNotDown Nov 17, 2024
e20d02a
fix: macos cmake issue
FlyAndNotDown Nov 30, 2024
1e96a27
fix: macos mirror tool header path issue
FlyAndNotDown Nov 30, 2024
53a7ada
feat: new gameplay framework
FlyAndNotDown Nov 30, 2024
14da8b3
feat: support std templates for mirror
FlyAndNotDown Nov 30, 2024
7f286ab
feat: gameplay framework update
FlyAndNotDown Dec 6, 2024
4925c8b
feat: support github actions tmate debug
FlyAndNotDown Dec 7, 2024
23e0f27
fix: macos build issue
FlyAndNotDown Dec 7, 2024
2184198
feat: new gameplay framework
FlyAndNotDown Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Build

on: [pull_request, workflow_dispatch]
on:
pull_request:
workflow_dispatch:
inputs:
debug:
type: boolean
description: 'Enable TMate Debug'
required: false
default: false

env:
BUILD_TYPE: Release
Expand All @@ -16,6 +24,16 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Setup TMate Session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }}
with:
detached: true

- name: Set XCode Version
run: sudo xcode-select -s /Library/Developer/CommandLineTools
if: runner.os == 'macOS'

- name: Checkout Repo
uses: actions/checkout@v2

Expand Down
24 changes: 14 additions & 10 deletions CMake/Target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,11 @@ function(AddMirrorInfoSourceGenerationTarget)
foreach (SEARCH_DIR ${PARAMS_SEARCH_DIR})
file(GLOB_RECURSE INPUT_HEADER_FILES "${SEARCH_DIR}/*.h")
foreach (INPUT_HEADER_FILE ${INPUT_HEADER_FILES})
get_filename_component(FILENAME ${INPUT_HEADER_FILE} NAME_WE)
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" TEMP ${INPUT_HEADER_FILE})
get_filename_component(DIR ${TEMP} DIRECTORY)
get_filename_component(FILENAME ${TEMP} NAME_WE)

set(OUTPUT_SOURCE "${CMAKE_BINARY_DIR}/Generated/MirrorInfoSource/${PARAMS_NAME}/${FILENAME}.generated.cpp")
set(OUTPUT_SOURCE "${CMAKE_BINARY_DIR}/Generated/MirrorInfoSource/${DIR}/${FILENAME}.generated.cpp")
list(APPEND OUTPUT_SOURCES ${OUTPUT_SOURCE})

add_custom_command(
Expand Down Expand Up @@ -289,10 +291,10 @@ function(AddExecutable)
)
endif()

add_executable(
add_executable(${PARAMS_NAME})
target_sources(
${PARAMS_NAME}
${PARAMS_SRC}
${GENERATED_SRC}
PRIVATE ${PARAMS_SRC} ${GENERATED_SRC}
)
target_include_directories(
${PARAMS_NAME}
Expand Down Expand Up @@ -351,8 +353,10 @@ function(AddLibrary)
add_library(
${PARAMS_NAME}
${PARAMS_TYPE}
${PARAMS_SRC}
${GENERATED_SRC}
)
target_sources(
${PARAMS_NAME}
PRIVATE ${PARAMS_SRC} ${GENERATED_SRC}
)
target_include_directories(
${PARAMS_NAME}
Expand Down Expand Up @@ -414,10 +418,10 @@ function(AddTest)
)
endif()

add_executable(
add_executable(${PARAMS_NAME})
target_sources(
${PARAMS_NAME}
${PARAMS_SRC}
${GENERATED_SRC}
PRIVATE ${PARAMS_SRC} ${GENERATED_SRC}
)
target_include_directories(
${PARAMS_NAME}
Expand Down
4 changes: 2 additions & 2 deletions CMake/ThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function(Get3rdPlatformValue)
cmake_parse_arguments(PARAMS "ARCH" "OUTPUT" "INPUT" ${ARGN})

if (${PARAMS_ARCH})
set(PLATFORM_KEYWORDS "Windows-AMD64;Darwin-arm64;Darwin-x86_64")
set(PLATFORM_KEYWORDS "Windows-AMD64;Darwin-arm64")
set(CURRENT_KEYWORDS "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
else()
set(PLATFORM_KEYWORDS "Windows;Darwin;Linux")
Expand Down Expand Up @@ -331,7 +331,7 @@ function(Add3rdCMakeProject)
SOURCE_DIR ${SOURCE_DIR}
BINARY_DIR ${BINARY_DIR}
CMAKE_ARGS ${CMAKE_BUILD_TYPE_ARGS} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ${PARAMS_CMAKE_ARG}
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG>
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG> -j 16
INSTALL_COMMAND ${CMAKE_COMMAND} --install <BINARY_DIR> --config $<CONFIG>
)
set_target_properties(
Expand Down
2 changes: 1 addition & 1 deletion Editor/Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AddExecutable(
NAME Editor
SRC ${SOURCES}
INC Include
LIB Qt Core RHI Rendering Runtime
LIB Qt Core RHI Runtime
RES ${FINAL_RESOURCES}
)

Expand Down
5 changes: 1 addition & 4 deletions Editor/Source/Include/Editor/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#pragma once

#include <Runtime/Engine.h>
#include <Rendering/RenderingModule.h>
#include <Render/RenderModule.h>

namespace Editor {
class Core {
Expand All @@ -17,17 +17,14 @@ namespace Editor {
void Initialize(int argc, char** argv);
void Cleanup();
bool ProjectHasSet() const;
Rendering::RenderingModule* GetRenderingModule() const;
Runtime::Engine* GetEngine() const;

private:
Core();

void ParseCommandLineArgs(int argc, char** argv) const;
void InitializeRuntime();
void InitializeRendering();

Rendering::RenderingModule* renderingModule;
Runtime::Engine* engine;
};
}
22 changes: 3 additions & 19 deletions Editor/Source/Src/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ namespace Editor {
}

Core::Core()
: renderingModule(nullptr)
, engine(nullptr)
: engine(nullptr)
{
}

Expand All @@ -32,13 +31,11 @@ namespace Editor {
{
ParseCommandLineArgs(argc, argv);
InitializeRuntime();
InitializeRendering();
}

void Core::Cleanup() // NOLINT
{
::Core::ModuleManager::Get().Unload("Runtime");
::Core::ModuleManager::Get().Unload("Rendering");
}

Runtime::Engine* Core::GetEngine() const
Expand All @@ -51,11 +48,6 @@ namespace Editor {
return !caProjectFile.GetValue().empty();
}

Rendering::RenderingModule* Core::GetRenderingModule() const
{
return renderingModule;
}

void Core::ParseCommandLineArgs(int argc, char** argv) const // NOLINT
{
::Core::Cli::Get().Parse(argc, argv);
Expand All @@ -65,17 +57,9 @@ namespace Editor {
{
Runtime::EngineInitParams params {};
params.projectFile = caProjectFile.GetValue();
params.rhiType = caRhiType.GetValue();

Runtime::EngineHolder::Load("Editor", params);
engine = &Runtime::EngineHolder::Get();
}

void Core::InitializeRendering()
{
renderingModule = ::Core::ModuleManager::Get().FindOrLoadTyped<Rendering::RenderingModule>("Rendering");
Assert(renderingModule != nullptr);

Rendering::RenderingModuleInitParams initParams;
initParams.rhiType = RHI::RHIAbbrStringToRHIType(caRhiType.GetValue());
renderingModule->Initialize(initParams);
}
}
1 change: 0 additions & 1 deletion Engine/Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_subdirectory(Mirror)
add_subdirectory(Core)
add_subdirectory(Render)
add_subdirectory(Runtime)
add_subdirectory(Rendering)

add_subdirectory(RHI-Dummy)
add_subdirectory(RHI-Vulkan)
Expand Down
2 changes: 1 addition & 1 deletion Engine/Source/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AddLibrary(
TYPE STATIC
SRC ${SOURCES}
PUBLIC_INC Include
LIB debugbreak cityhash taskflow fmt-lib rapidjson
LIB debugbreak cityhash taskflow rapidjson
)

file(GLOB TEST_SOURCES Test/*.cpp)
Expand Down
Loading
Loading