Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
c4c1873
feat: Video component + system
Sauterelle57 Sep 7, 2025
b0f182e
fix: compilation
Sauterelle57 Sep 7, 2025
08854cd
fix: crash when asset manager is not render
Sauterelle57 Sep 8, 2025
f98f367
fix: errors messages + add test video
Sauterelle57 Sep 8, 2025
1cd88c0
fix: error message and add debug for video system
Sauterelle57 Sep 8, 2025
e939dcd
feat: working video component + system
Sauterelle57 Sep 9, 2025
124161d
fix: code style + norm
Sauterelle57 Sep 10, 2025
f40b5fc
fix: play video only if scene is played
Sauterelle57 Sep 10, 2025
3b19985
fix: Load first frame of video
Sauterelle57 Sep 11, 2025
799d6cf
feat(nexo-vdeo): shortcut to play and pause game sim
ThomasParenteau Sep 11, 2025
3c2adbb
fix: clean resources folder + fix cube texture indices
Sauterelle57 Sep 11, 2025
156f2c2
feat: add example scenes
Sauterelle57 Sep 12, 2025
e785da0
feat(demo/scenes): add moving lights
Sauterelle57 Sep 12, 2025
2770bfb
ci: test older ubuntu version
Thyodas Sep 10, 2025
5976245
fix(windows-deps): fix missing deps for some dll
Thyodas Sep 10, 2025
a9fec15
feat(demo/scenes): add all scene
Sauterelle57 Sep 12, 2025
46fe08c
feat(keyframe-video): add video keyframe hendling with shortcuts
ThomasParenteau Sep 11, 2025
e398ec4
feat(keyframe-video): bool for show toolbar
ThomasParenteau Sep 12, 2025
1705dcf
fix(demo): init cpp scene
ThomasParenteau Sep 12, 2025
9c42feb
fix(demo): init scene
ThomasParenteau Sep 12, 2025
c1c9842
feat(demo): accurate keyframe for warmup pres
Sauterelle57 Sep 12, 2025
3043388
feat(demo): camera in front of the video
Sauterelle57 Sep 12, 2025
2e6de34
feat(demo): physics ball spawn by pressing L
Sauterelle57 Sep 12, 2025
9a5245e
fix(demo): placement of light scripting scene
Sauterelle57 Sep 12, 2025
fed851d
fix(demo/scenes): code style + sonar / clang tidy errors and warnings…
Sauterelle57 Sep 16, 2025
483452d
fix(demo/scenes): code style + sonar / clang tidy errors and warnings…
Sauterelle57 Sep 17, 2025
934cc43
fix(demo/scenes): code style + sonar + doc + clang tidy errors and wa…
Sauterelle57 Sep 17, 2025
7b993a4
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
510474d
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
1d9000d
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
6e551fd
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
1d1d67e
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
1eeb6cc
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
47aaacd
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
11a34da
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
c3a3777
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
da7e832
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
e8f0d9b
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
1e8b115
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
70405eb
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
5c9c986
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 17, 2025
7f9f278
fix(demo/scenes): compilation on Windows
Sauterelle57 Sep 17, 2025
41a405b
fix(demo/scenes): compilation on Windows
Sauterelle57 Sep 17, 2025
6bf8131
ci(demo/scenes): fix compilation on Ubuntu CI
Thyodas Sep 18, 2025
e7b4216
fix(demo/scenes): include in FileSystem.cpp needed for Linux
Sauterelle57 Sep 26, 2025
1a007ee
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 26, 2025
9da53d6
fix(demo/scenes): include in FileSystem.cpp needed for Linux
Sauterelle57 Sep 26, 2025
76db35a
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 26, 2025
b81d95d
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 28, 2025
b72e68c
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 28, 2025
1a3d4b6
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 28, 2025
7c4683e
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 28, 2025
dac5bea
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 28, 2025
9225b50
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 28, 2025
19ce62f
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 29, 2025
6de69f7
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Sep 29, 2025
6234c8c
fix(demo/scenes): compilation on ubuntu
Sauterelle57 Oct 2, 2025
4bd8587
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Oct 3, 2025
1265ec5
fix(demo/scenes): clean files + code style + sonar errors + documenta…
Sauterelle57 Oct 3, 2025
679dfa3
fix(sonar-errors): clean files + fix sonar issues
Sauterelle57 Oct 10, 2025
12a589c
fix(sonar-errors): compilation on ubuntu
Sauterelle57 Oct 10, 2025
ab80a49
fix(sonar-errors): compilation on ubuntu
Sauterelle57 Oct 10, 2025
b35a619
fix(sonar-errors): compilation on ubuntu
Sauterelle57 Oct 10, 2025
d54c32b
fix(sonar-errors): compilation on ubuntu and windows
Sauterelle57 Oct 12, 2025
ab9c71f
fix(sonar-errors): warnings
Sauterelle57 Oct 16, 2025
f67ce71
fix(sonar-errors): compilation
Sauterelle57 Oct 17, 2025
137ea55
fix(sonar-errors): security hotspot
Sauterelle57 Oct 17, 2025
cf4c5e7
fix(sonar-errors): add libltdl-dev in package of github action workflow
Sauterelle57 Oct 26, 2025
accfca4
feat(sonar-errors): edit changes asked fot PR approbation
Sauterelle57 Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ jobs:
libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-dri2-0-dev libxcb-dri3-dev
libxcb-glx0-dev libx11-xcb-dev libglu1-mesa-dev
libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
libegl1-mesa-dev mono-complete
version: 1.0
libegl1-mesa-dev mono-complete libxtst-dev libltdl-dev
version: 1.1
execute_install_scripts: true

- name: Install .NET SDK 9.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-dri2-0-dev libxcb-dri3-dev
libxcb-glx0-dev libx11-xcb-dev libglu1-mesa-dev
libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
libegl1-mesa-dev mono-complete
version: 1.0
libegl1-mesa-dev mono-complete libxtst-dev libltdl-dev
version: 1.1
execute_install_scripts: true

- name: Install .NET SDK 9.0
Expand Down
18 changes: 16 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ set(NEXO_GRAPHICS_API "OpenGL" CACHE STRING "Graphics API to use")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(NEXO_COMPILER_FLAGS_ALL --std=c++${CMAKE_CXX_STANDARD})
set(NEXO_COMPILER_FLAGS_DEBUG -g -Wmissing-field-initializers -Wall -Wextra -Wpedantic)
set(NEXO_COMPILER_FLAGS_RELEASE -O3)
set(NEXO_COMPILER_FLAGS_RELEASE -O3 -DNDEBUG)
set(NEXO_COVERAGE_FLAGS -O0 --coverage)

set(NEXO_LINKER_FLAGS_ALL "")
set(NEXO_LINKER_FLAGS_DEBUG "")
set(NEXO_LINKER_FLAGS_RELEASE "-flto")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(NEXO_COMPILER_FLAGS_ALL /nologo /W4 /std:c++${CMAKE_CXX_STANDARD} /Zc:preprocessor /utf-8)
set(NEXO_COMPILER_FLAGS_DEBUG /Zi /Od /Zc:preprocessor /MDd /D_DEBUG /D_ITERATOR_DEBUG_LEVEL=2 /D_SECURE_SCL=1)
set(NEXO_COMPILER_FLAGS_RELEASE /O2 /Zc:preprocessor)
set(NEXO_COMPILER_FLAGS_RELEASE /O2 /Zc:preprocessor /DNDEBUG /MD)
set(NEXO_COVERAGE_FLAGS "") # MSVC doesn't support coverage in the same way

set(NEXO_LINKER_FLAGS_ALL "")
set(NEXO_LINKER_FLAGS_DEBUG "")
set(NEXO_LINKER_FLAGS_RELEASE "/LTCG")
else()
message(WARNING "Unsupported compiler: ${CMAKE_CXX_COMPILER_ID}, using default flags")
endif()
Expand All @@ -34,6 +42,12 @@ add_compile_options(
"$<$<CONFIG:Release>:${NEXO_COMPILER_FLAGS_RELEASE}>"
)

add_link_options(
"${NEXO_LINKER_FLAGS_ALL}"
"$<$<CONFIG:Debug>:${NEXO_LINKER_FLAGS_DEBUG}>"
"$<$<CONFIG:Release>:${NEXO_LINKER_FLAGS_RELEASE}>"
)

# Prevent Visual Studio (or other build tools) from creating per config sub-directories (e.g. Debug, Release)
# Useful to look for resource files relative to the executable path
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>)
Expand Down
15 changes: 8 additions & 7 deletions common/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ namespace nexo {

inline std::string toString(const LogLevel level)
{
using enum LogLevel;
switch (level)
{
case LogLevel::FATAL: return "FATAL";
case LogLevel::ERR: return "ERROR";
case LogLevel::WARN: return "WARN";
case LogLevel::INFO: return "INFO";
case LogLevel::USER: return "USER";
case LogLevel::DEBUG: return "DEBUG";
case LogLevel::DEV: return "DEV";
case FATAL: return "FATAL";
case ERR: return "ERROR";
case WARN: return "WARN";
case INFO: return "INFO";
case USER: return "USER";
case DEBUG: return "DEBUG";
case DEV: return "DEV";
}
return "UNKNOWN";
}
Expand Down
1 change: 1 addition & 0 deletions editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ set(SRCS
editor/src/DocumentWindows/EditorScene/Shortcuts.cpp
editor/src/DocumentWindows/EditorScene/Show.cpp
editor/src/DocumentWindows/EditorScene/Shutdown.cpp
editor/src/DocumentWindows/EditorScene/Timecode.cpp
editor/src/DocumentWindows/EditorScene/Toolbar.cpp
editor/src/DocumentWindows/EditorScene/Update.cpp
editor/src/DocumentWindows/EditorScene/DragDrop.cpp
Expand Down
24 changes: 12 additions & 12 deletions editor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,46 @@
//
///////////////////////////////////////////////////////////////////////////////

#include "src/Editor.hpp"
#include "src/DocumentWindows/AssetManager/AssetManagerWindow.hpp"
#include "src/DocumentWindows/ConsoleWindow/ConsoleWindow.hpp"
#include "src/DocumentWindows/EditorScene/EditorScene.hpp"
#include "src/DocumentWindows/SceneTreeWindow/SceneTreeWindow.hpp"
#include "src/DocumentWindows/InspectorWindow/InspectorWindow.hpp"
#include "src/DocumentWindows/AssetManager/AssetManagerWindow.hpp"
#include "src/DocumentWindows/MaterialInspector/MaterialInspector.hpp"
#include "src/DocumentWindows/PrimitiveWindow/PrimitiveWindow.hpp"
#include "src/DocumentWindows/GameWindow/GameWindow.hpp"
#include "src/DocumentWindows/SceneTreeWindow/SceneTreeWindow.hpp"
#include "src/Editor.hpp"

#include <thread>
#include <loguru.hpp>
#include <core/exceptions/Exceptions.hpp>
#include <loguru.hpp>
#include <thread>

#include "scripting/native/ManagedTypedef.hpp"
#include "scripting/native/Scripting.hpp"

int main(int argc, char **argv)
try {
loguru::init(argc, argv);
loguru::g_stderr_verbosity = loguru::Verbosity_3;
loguru::g_stderr_verbosity = loguru::Verbosity_3;
nexo::editor::Editor &editor = nexo::editor::Editor::getInstance();

editor.registerWindow<nexo::editor::EditorScene>(
std::format("Default Scene{}{}", NEXO_WND_USTRID_DEFAULT_SCENE, 0)
);
std::format("Default Scene{}{}", NEXO_WND_USTRID_DEFAULT_SCENE, 0));
editor.registerWindow<nexo::editor::SceneTreeWindow>(NEXO_WND_USTRID_SCENE_TREE);
editor.registerWindow<nexo::editor::InspectorWindow>(NEXO_WND_USTRID_INSPECTOR);
editor.registerWindow<nexo::editor::ConsoleWindow>(NEXO_WND_USTRID_CONSOLE);
editor.registerWindow<nexo::editor::MaterialInspector>(NEXO_WND_USTRID_MATERIAL_INSPECTOR);
editor.registerWindow<nexo::editor::PrimitiveWindow>(NEXO_WND_USTRID_PRIMITIVE_WINDOW);
editor.registerWindow<nexo::editor::AssetManagerWindow>(NEXO_WND_USTRID_ASSET_MANAGER);

if (const auto defaultScene = editor.getWindow<nexo::editor::EditorScene>(std::format("Default Scene{}{}", NEXO_WND_USTRID_DEFAULT_SCENE, 0)).lock())
if (const auto defaultScene = editor
.getWindow<nexo::editor::EditorScene>(
std::format("Default Scene{}{}", NEXO_WND_USTRID_DEFAULT_SCENE, 0))
.lock())
defaultScene->setDefault();

editor.init();

while (editor.isOpen())
{
while (editor.isOpen()) {
auto start = std::chrono::high_resolution_clock::now();
editor.render();
editor.update();
Expand Down
39 changes: 18 additions & 21 deletions editor/src/ADocumentWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,48 @@

namespace nexo::editor {

void ADocumentWindow::beginRender(const std::string &windowName)
void ADocumentWindow::beginRender(const std::string& windowName)
{
dockingUpdate(windowName);
visibilityUpdate();
sizeUpdate();
}

void ADocumentWindow::dockingUpdate(const std::string &windowName)
void ADocumentWindow::dockingUpdate(const std::string& windowName)
{
if (const ImGuiWindow* currentWindow = ImGui::GetCurrentWindow(); currentWindow)
{
const bool isDocked = currentWindow->DockIsActive;
if (const ImGuiWindow* currentWindow = ImGui::GetCurrentWindow(); currentWindow) {
const bool isDocked = currentWindow->DockIsActive;
const ImGuiID currentDockID = currentWindow->DockId;
const auto dockId = m_windowRegistry.getDockId(windowName);
const auto dockId = m_windowRegistry.getDockId(windowName);

// If it's the first time opening the window and we have a dock id saved in the registry, then we force set it
// If it's the first time opening the window and we have a dock id saved in the registry, then we force set
// it
if (m_firstOpened && (dockId && currentDockID != *dockId))
ImGui::DockBuilderDockWindow(windowName.c_str(), *dockId);
// If the docks ids differ, it means the window got rearranged in the global layout
// If we are docked but we dont have a dock id saved in the registry, it means the user moved the window
// If we are docked, but we don't have a dock id saved in the registry, it means the user moved the window
// In both cases, we update our docking registry with the new dock id
else if ((dockId && currentDockID != *dockId) || (isDocked && !dockId))
m_windowRegistry.setDockId(windowName, currentDockID);


// If it is not docked anymore, we have a floating window without docking node,
// So we erase it from the docking registry
if (!m_firstOpened && !isDocked)
m_windowRegistry.resetDockId(windowName);
if (!m_firstOpened && !isDocked) m_windowRegistry.resetDockId(windowName);
m_firstOpened = false;
}
}

void ADocumentWindow::visibilityUpdate()
{
m_focused = ImGui::IsWindowFocused();
const bool isDocked = ImGui::IsWindowDocked();
m_focused = ImGui::IsWindowFocused();
const bool isDocked = ImGui::IsWindowDocked();
const ImGuiWindow* window = ImGui::GetCurrentWindow();

if (isDocked) {
// If the window is currently being rendered with normal content,
// and not hidden or set to skip items, then it is visible
m_isVisibleInDock = !window->Hidden && !window->SkipItems && window->Active;
}
else {
} else {
// Not docked windows are visible if we've reached this point
m_isVisibleInDock = true;
}
Expand All @@ -75,10 +72,10 @@ namespace nexo::editor {
void ADocumentWindow::sizeUpdate()
{
const ImGuiWindow* window = ImGui::GetCurrentWindow();
m_windowPos = window->Pos;
m_windowSize = window->Size;
m_contentSizeMin = ImGui::GetWindowContentRegionMin();
m_contentSizeMax = ImGui::GetWindowContentRegionMax();
m_contentSize = ImGui::GetContentRegionAvail();
m_windowPos = window->Pos;
m_windowSize = window->Size;
m_contentSizeMin = ImGui::GetWindowContentRegionMin();
m_contentSizeMax = ImGui::GetWindowContentRegionMax();
m_contentSize = ImGui::GetContentRegionAvail();
}
}
} // namespace nexo::editor
Loading
Loading