Compare commits
38 Commits
6a858f49e6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
565c91b276 | ||
|
|
fec9286dee | ||
|
|
9f83ac816a | ||
|
|
076fe75409 | ||
|
|
913d1437c0 | ||
|
|
edd6b2f19e | ||
|
|
1a5dc70632 | ||
|
|
037aefc711 | ||
|
|
61bc9f032d | ||
|
|
b1b283f4c6 | ||
|
|
2fa9c3780d | ||
|
|
c99c89d26a | ||
|
|
b02fc33da3 | ||
|
|
9005863300 | ||
|
|
60a1683255 | ||
|
|
e85781c29e | ||
|
|
580c05c37b | ||
|
|
2c7bb51658 | ||
|
|
3f80057682 | ||
|
|
8f868529f8 | ||
|
|
8e6da66609 | ||
|
|
ae4e81c937 | ||
|
|
ed1dc1eed9 | ||
|
|
50dc6c8195 | ||
|
|
bbbe7adb3a | ||
|
|
09a70ab98d | ||
|
|
84c0733a77 | ||
|
|
2f1bb884d7 | ||
|
|
9d36bfd13f | ||
|
|
734caada6c | ||
|
|
3ae209819a | ||
|
|
e3678118b4 | ||
|
|
d654c99a8e | ||
|
|
ee4729d31e | ||
|
|
32746e7f95 | ||
|
|
dac1551039 | ||
|
|
9a395bd741 | ||
|
|
e106427ebc |
@@ -9,9 +9,11 @@ jobs:
|
||||
force: false
|
||||
condition: SUCCESSFUL
|
||||
optional: false
|
||||
jobExecutor: terra-executor
|
||||
triggers:
|
||||
- type: BranchUpdateTrigger
|
||||
branches: main
|
||||
paths: -.onedev-buildspec.yml
|
||||
userMatch: anyone
|
||||
projects: OpenEngine
|
||||
- type: TagCreateTrigger
|
||||
@@ -31,6 +33,17 @@ jobs:
|
||||
withSubmodules: false
|
||||
condition: SUCCESSFUL
|
||||
optional: false
|
||||
- type: SetupCacheStep
|
||||
name: conan-cache
|
||||
key: conan-cache-@file:./conanfile.txt@
|
||||
loadKeys:
|
||||
- conan-cache-@project_name@
|
||||
paths:
|
||||
- /root/.conan2
|
||||
uploadStrategy: UPLOAD_IF_NOT_HIT
|
||||
changeDetectionExcludes: /root/.conan2/p/*/dl /root/.conan2/logs
|
||||
condition: SUCCESSFUL
|
||||
optional: true
|
||||
- type: CommandStep
|
||||
name: Compile for Linux
|
||||
runInContainer: true
|
||||
@@ -38,11 +51,17 @@ jobs:
|
||||
interpreter:
|
||||
type: DefaultInterpreter
|
||||
commands: |
|
||||
echo find nethost =================================
|
||||
find /usr/share/dotnet -name "nethost.h"
|
||||
conan profile detect --force
|
||||
#git clone --depth 1 https://github.com/dotnet/runtime.git
|
||||
#cd runtime
|
||||
#./build.sh -c Release -subset host
|
||||
|
||||
#cp artifacts/bin/native/net10.0-linux-Release-x64/nethost/libnethost.a /onedev-build/workspace/lib/
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
conan profile detect --force
|
||||
conan install . -c tools.system.package_manager:mode=install --output-folder=build --build=missing -s build_type=${BUILD_TYPE}
|
||||
|
||||
cmake -S . -G Ninja -B build -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
|
||||
|
||||
echo ====== Building =============================
|
||||
@@ -63,6 +82,58 @@ jobs:
|
||||
artifacts: editor/* open_engine/*
|
||||
condition: SUCCESSFUL
|
||||
optional: false
|
||||
jobExecutor: luna-executor
|
||||
triggers:
|
||||
- type: BranchUpdateTrigger
|
||||
branches: main
|
||||
paths: -.onedev-buildspec.yml
|
||||
userMatch: anyone
|
||||
projects: OpenEngine
|
||||
retryCondition: never
|
||||
maxRetries: 3
|
||||
retryDelay: 30
|
||||
timeout: 14400
|
||||
- name: Release to Gitea
|
||||
steps:
|
||||
- type: CommandStep
|
||||
name: Release to Gitea
|
||||
runInContainer: true
|
||||
image: erriss/erris-build_tools:V0.8
|
||||
interpreter:
|
||||
type: DefaultInterpreter
|
||||
commands: |
|
||||
# 1. Create the Release metadata
|
||||
RELEASE_JSON=$(printf '{"tag_name":"v0.0.%s","target_commitish":"main","name":"Release v0.0.%s","body":"Automated build from OneDev","draft":false,"prerelease":false}' "$ONEDEV_BUILD_NUMBER" "$ONEDEV_BUILD_NUMBER")
|
||||
|
||||
curl -X 'POST' \
|
||||
"https://gitea.anfer.fr/api/v1/repos/anfer/OpenEngine/releases" \
|
||||
-H "Authorization: token @secret:Gitea@" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$RELEASE_JSON" > release_info.json
|
||||
|
||||
# 2. Extract the Release ID (using jq)
|
||||
RELEASE_ID=$(jq '.id' release_info.json)
|
||||
|
||||
# 3. Upload your binary (oe_editor)
|
||||
curl -X 'POST' \
|
||||
"https://gitea.anfer.fr/api/v1/repos/anfer/OpenEngine/releases/$RELEASE_ID/assets?name=oe_editor" \
|
||||
-H "Authorization: token @secret:Gitea@" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F attachment=@@editor/oe_editor
|
||||
envVars:
|
||||
- name: ONEDEV_BUILD_NUMBER
|
||||
value: '1'
|
||||
useTTY: true
|
||||
condition: SUCCESSFUL
|
||||
optional: false
|
||||
jobExecutor: terra-executor
|
||||
triggers:
|
||||
- type: DependencyFinishedTrigger
|
||||
projects: OpenEngine
|
||||
jobDependencies:
|
||||
- jobName: Compile for Linux
|
||||
requireSuccessful: true
|
||||
artifacts: '**'
|
||||
retryCondition: never
|
||||
maxRetries: 3
|
||||
retryDelay: 30
|
||||
|
||||
@@ -7,6 +7,8 @@ joltphysics/5.2.0
|
||||
fastgltf/0.9.0
|
||||
glm/1.0.1
|
||||
glfw/3.4
|
||||
shaderc/2025.3
|
||||
spirv-cross/1.4.321.0
|
||||
|
||||
[generators]
|
||||
CMakeDeps
|
||||
|
||||
@@ -19,10 +19,25 @@ add_executable(${PROJECT_EXECUTABLE_NAME}
|
||||
${SRC_FILES}
|
||||
)
|
||||
|
||||
file(GLOB NETHOST_DIR_CANDIDATES
|
||||
"/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.*-x64/*/runtimes/linux-x64/native"
|
||||
"/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.*-x64/*/runtimes/arch-x64/native"
|
||||
)
|
||||
|
||||
# Pick the first match
|
||||
list(GET NETHOST_DIR_CANDIDATES 0 NETHOST_DIR)
|
||||
|
||||
if(NOT NETHOST_DIR)
|
||||
message(FATAL_ERROR "Could not find NETCore native directory")
|
||||
else()
|
||||
message(STATUS "Found nethost dir: ${NETHOST_DIR}")
|
||||
endif()
|
||||
|
||||
target_include_directories(${PROJECT_EXECUTABLE_NAME} PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${PROJECT_SOURCE_DIR}/editor/include"
|
||||
"/usr/include/freetype2/"
|
||||
"${NETHOST_DIR}"
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_EXECUTABLE_NAME} PRIVATE
|
||||
@@ -30,12 +45,12 @@ target_link_libraries(${PROJECT_EXECUTABLE_NAME} PRIVATE
|
||||
imgui::imgui
|
||||
open_engine
|
||||
dl
|
||||
nethost
|
||||
freetype
|
||||
EnTT::EnTT
|
||||
nethost
|
||||
)
|
||||
|
||||
target_link_directories(${PROJECT_EXECUTABLE_NAME} PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/lib
|
||||
/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.arch-x64/10.0.3/runtimes/arch-x64/native
|
||||
${CMAKE_SOURCE_DIR}/lib
|
||||
${NETHOST_DIR}
|
||||
)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "open_engine/renderer/renderer3d.hpp"
|
||||
#include "open_engine/scene/components.hpp"
|
||||
#include "panels/content_browser.hpp"
|
||||
#include "panels/models_panel.hpp"
|
||||
#include "panels/scene_hierarchy.hpp"
|
||||
|
||||
#include <Jolt/Physics/Collision/Shape/Shape.h>
|
||||
@@ -585,6 +586,7 @@ namespace OpenEngine {
|
||||
DrawStats();
|
||||
scene_hierarchy.OnImGuiRender();
|
||||
browser.OnImGuiRender();
|
||||
ModelsPanelOnImGuiRender();
|
||||
DrawViewport();
|
||||
DrawPlayBar();
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include <open_engine.hpp>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.arch-x64/10.0.3/runtimes/arch-x64/native/nethost.h"
|
||||
#include "/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.arch-x64/10.0.3/runtimes/arch-x64/native/hostfxr.h"
|
||||
#include "/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.arch-x64/10.0.3/runtimes/arch-x64/native/coreclr_delegates.h"
|
||||
#include <nethost.h>
|
||||
#include <hostfxr.h>
|
||||
#include <coreclr_delegates.h>
|
||||
|
||||
class Modding : public OpenEngine::Layer
|
||||
{
|
||||
|
||||
10
editor/include/panels/models_panel.hpp
Normal file
10
editor/include/panels/models_panel.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef MODELS_PANEL_HPP
|
||||
#define MODELS_PANEL_HPP
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
void ModelsPanelOnImGuiRender();
|
||||
|
||||
}
|
||||
|
||||
#endif // MODELS_PANEL_HPP
|
||||
20
editor/src/panels/models_panel.cpp
Normal file
20
editor/src/panels/models_panel.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <panels/models_panel.hpp>
|
||||
#include <open_engine.hpp>
|
||||
|
||||
#include "imgui.h"
|
||||
#include <vector>
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
static std::vector<Ref<Model3D>> temp_model_list;
|
||||
|
||||
void ModelsPanelOnImGuiRender()
|
||||
{
|
||||
ImGui::Begin("Models");
|
||||
|
||||
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
}
|
||||
34
imgui.ini
34
imgui.ini
@@ -1,6 +1,6 @@
|
||||
[Window][WindowOverViewport_11111111]
|
||||
Pos=0,24
|
||||
Size=1272,1363
|
||||
Size=2560,1371
|
||||
Collapsed=0
|
||||
|
||||
[Window][Debug##Default]
|
||||
@@ -10,31 +10,31 @@ Collapsed=0
|
||||
|
||||
[Window][Statistics]
|
||||
Pos=0,24
|
||||
Size=409,437
|
||||
Size=409,439
|
||||
Collapsed=0
|
||||
DockId=0x00000003,0
|
||||
|
||||
[Window][Properties]
|
||||
Pos=822,24
|
||||
Size=450,805
|
||||
Pos=2110,24
|
||||
Size=450,810
|
||||
Collapsed=0
|
||||
DockId=0x00000007,0
|
||||
|
||||
[Window][Viewport]
|
||||
Pos=411,61
|
||||
Size=409,956
|
||||
Size=1697,964
|
||||
Collapsed=0
|
||||
DockId=0x00000012,0
|
||||
|
||||
[Window][Dear ImGui Demo]
|
||||
Pos=822,831
|
||||
Size=450,556
|
||||
Pos=2110,836
|
||||
Size=450,559
|
||||
Collapsed=0
|
||||
DockId=0x00000008,0
|
||||
|
||||
[Window][Scene]
|
||||
Pos=0,463
|
||||
Size=409,924
|
||||
Pos=0,465
|
||||
Size=409,930
|
||||
Collapsed=0
|
||||
DockId=0x00000004,0
|
||||
|
||||
@@ -143,8 +143,8 @@ Collapsed=0
|
||||
DockId=0x00000012,1
|
||||
|
||||
[Window][Assets]
|
||||
Pos=411,1019
|
||||
Size=409,368
|
||||
Pos=411,1027
|
||||
Size=1697,368
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,0
|
||||
|
||||
@@ -156,12 +156,18 @@ DockId=0x0000000F,0
|
||||
|
||||
[Window][##play_state_bar]
|
||||
Pos=411,24
|
||||
Size=409,35
|
||||
Size=1697,35
|
||||
Collapsed=0
|
||||
DockId=0x00000011,0
|
||||
|
||||
[Window][Models]
|
||||
Pos=411,1027
|
||||
Size=1697,368
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,1
|
||||
|
||||
[Docking][Data]
|
||||
DockSpace ID=0x08BD597D Window=0x1BBC0F80 Pos=0,24 Size=1272,1363 Split=X
|
||||
DockSpace ID=0x08BD597D Window=0x1BBC0F80 Pos=0,24 Size=2560,1371 Split=X
|
||||
DockNode ID=0x00000005 Parent=0x08BD597D SizeRef=820,1386 Split=X
|
||||
DockNode ID=0x00000001 Parent=0x00000005 SizeRef=409,1386 Split=Y Selected=0xE601B12F
|
||||
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=255,417 Selected=0x553E127E
|
||||
@@ -175,7 +181,7 @@ DockSpace ID=0x08BD597D Window=0x1BBC0F80 Pos=0,24 Size=1272,1363
|
||||
DockNode ID=0x00000011 Parent=0x00000010 SizeRef=594,35 HiddenTabBar=1 Selected=0xAB37695D
|
||||
DockNode ID=0x00000012 Parent=0x00000010 SizeRef=594,964 CentralNode=1 Selected=0xC450F867
|
||||
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=800,993 Selected=0x3EEA4247
|
||||
DockNode ID=0x0000000C Parent=0x00000009 SizeRef=409,368 Selected=0x42C24103
|
||||
DockNode ID=0x0000000C Parent=0x00000009 SizeRef=409,368 Selected=0xEAE75860
|
||||
DockNode ID=0x0000000A Parent=0x00000002 SizeRef=483,600 Selected=0x1BCA3180
|
||||
DockNode ID=0x00000006 Parent=0x08BD597D SizeRef=450,1386 Split=Y Selected=0x8C72BEA8
|
||||
DockNode ID=0x00000007 Parent=0x00000006 SizeRef=444,805 Selected=0x8C72BEA8
|
||||
|
||||
@@ -18,6 +18,8 @@ find_package(fastgltf REQUIRED)
|
||||
find_package(spdlog REQUIRED)
|
||||
find_package(glm REQUIRED)
|
||||
find_package(glfw3 REQUIRED)
|
||||
find_package(shaderc REQUIRED)
|
||||
find_package(spirv-cross REQUIRED)
|
||||
|
||||
file(GLOB_RECURSE SRC_FILES "src/*.cpp")
|
||||
file(GLOB IMGUIZMO_SRC_FILES "${CMAKE_SOURCE_DIR}/vendor/ImGuizmo/*.cpp")
|
||||
@@ -43,9 +45,6 @@ target_include_directories(${PROJECT_EXECUTABLE_NAME} PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/vendor/ImGuizmo"
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_EXECUTABLE_NAME} PRIVATE "/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64/10.0.0/runtimes/linux-x64/native")
|
||||
target_link_libraries(${PROJECT_EXECUTABLE_NAME} PRIVATE "/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64/10.0.0/runtimes/linux-x64/native/libnethost.a")
|
||||
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
||||
#set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -fsanitize=address")
|
||||
|
||||
@@ -60,7 +59,7 @@ target_link_libraries(${PROJECT_EXECUTABLE_NAME} PUBLIC
|
||||
X11
|
||||
yaml-cpp::yaml-cpp
|
||||
nfd
|
||||
shaderc_combined
|
||||
shaderc::shaderc
|
||||
glslang
|
||||
glslang-default-resource-limits
|
||||
SPIRV
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "open_engine/renderer/renderer2d.hpp"
|
||||
#include "open_engine/renderer/renderer3d.hpp"
|
||||
#include "open_engine/renderer/renderer.hpp"
|
||||
#include <open_engine/renderer/model3d.hpp>
|
||||
#include "open_engine/renderer/texture.hpp"
|
||||
#include "open_engine/renderer/buffer.hpp"
|
||||
#include "open_engine/renderer/shader.hpp"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#ifndef PCH_HPP
|
||||
#define PCH_HPP
|
||||
|
||||
#include "open_engine/logging.hpp"
|
||||
#include <open_engine/logging.hpp>
|
||||
#include <shaderc/shaderc.hpp>
|
||||
|
||||
#include <functional>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define SHADER_HPP
|
||||
|
||||
#include <open_engine/ref_scope.hpp>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -6,14 +6,12 @@
|
||||
#include <core/time.hpp>
|
||||
#include <logging.hpp>
|
||||
|
||||
#include <shaderc/shaderc.hpp>
|
||||
#include <spirv_cross/spirv_cross.hpp>
|
||||
#include <spirv_cross/spirv_glsl.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
#include <glm/glm.hpp>
|
||||
#include <filesystem>
|
||||
#include <glad/glad.h>
|
||||
//#include <alloca.h>
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
@@ -30,7 +28,7 @@ namespace OpenEngine {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static shaderc_shader_kind GLShaderStageToShaderC(GLenum stage)
|
||||
static ::shaderc_shader_kind GLShaderStageToShaderC(GLenum stage)
|
||||
{
|
||||
switch (stage)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "core/uuid.hpp"
|
||||
#include "logging.hpp"
|
||||
#include "scene/scene_camera.hpp"
|
||||
#include <pch.hpp>
|
||||
@@ -19,6 +20,7 @@
|
||||
#include <cstdint>
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <vector>
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user