Opengl - #33
Merged
Merged
Conversation
…lization tests - windows.yml: build+test windows-msvc (Debug/Release) alongside windows-clang, reusing the existing MSVC setup step that was already present but unused in the matrix. - format.yml (new): clang-format --dry-run --Werror over changed C++ files in a PR, wired into ci.yml as a required job in quality-gate. - scene_serialization_tests.cpp: re-enable the previously fully-commented-out destructive/round-trip SceneSerializer test suite, ported to the current API (no Application dependency), plus new cases: DeserializeFromString with invalid YAML, duplicate entity UUIDs, string-only round trip, and deserializing into a non-empty scene. Verified locally (11/11 passing, windows-clang Debug).
- ResolveAssemblyPath/TryAutoLoad: centralize DLL resolution (5 duplicated blocks → 1) - AssetPath: add TrimCopy/NormalizeAssetPath/FileExists (replace duplicated helpers) - RuntimeLayer: cache Renderer*/AssetManager* to avoid repeated ServiceLocator calls - ProjectSettingsPanel: replace if-else chains with constexpr lookup tables (shadow/AA) - ContentBrowser: replace switch with constexpr arrays for filter types and icons - ProjectManager: auto-generate assets/scripts/, .csproj, and Starter.cs on new project - Glue cleanup: remove debug log, fix div-by-zero, add null-checks, named constants - String interop: replace char16_t* with Coral::UCChar* for cross-platform support - Use Coral::StringHelper for correct UTF-8↔UTF-16 conversion - Remove duplicated ch_log_u16, add ResolveComponentName helper" - Added gpak library to pack resources in .pak
…e failure CI failed configuring windows-msvc/pak_archive because pak_archive/external's find_package(zstd CONFIG REQUIRED) fallback ran before the zstd:: aliases existed. Create the aliases in zstd.cmake right after the zstd targets are defined, instead of duplicating the same logic later in pak_archive.cmake.
… CI fix - Fix metalness blackening textures: roughness was sampled from texture3 (unbound) instead of texture1 (packed metallic-roughness map). Changed texture(texture3, texCoord).g to texture(texture1, texCoord).g in material_pbr.glsl:19. - Add std::vector<Material> Materials to ModelComponent for per-entity material property persistence. Material Editor panel now initializes and edits component-level materials instead of the shared ModelAsset. Renderer uses component materials via ResolveMaterialForMesh(). - Fix pak_archive zstd target collision on CI (Ubuntu 24.04): guard now checks raw targets (libzstd_static/libzstd_shared) in addition to aliases (zstd::*) to prevent find_package from picking up a system- installed libzstd-dev that conflicts with the vendored build. - Add AGENTS.md with build/test/format/architecture guidance.
- Remove pak_archive as git submodule - Add pak_archive as vendored directory (latest main, 4593dfd) - Use root-level zstd (via zstd::libzstd_static alias) instead of find_package - Create ZLIB::ZLIB alias pointing to assimp's zlibstatic in pak_archive.cmake - Fixes CI failure: submodule reference 4fb7c96 not found on remote
Root .gitignore rule 'lib/' was blocking thirdparty/pak_archive/lib/ (11 gpak source files). Added negation rule to whitelist it.
- Delete thirdparty/pak_archive/ directory - Delete engine/assets/pak_archive.h and pak_archive.cpp - Delete cmake/external/pak_archive.cmake - Remove MountPakArchive/ExtractFromPak from AssetManager - Remove .pak packing from ProjectExporter (now copies loose files) - Remove .pak mounting from RuntimeLayer - Remove libgpak from CMake dependencies - Clean up .gitignore pak_archive negation rule Exported builds now ship loose assets/ directory instead of assets.pak.
now material editor can change properties and etc fix(test) : fix linking error with MSVC compiler TODO : implement networking + add more tests
- CompilerGCC: prefer lld (guarded by find_program), split-dwarf in Debug, and gc-sections in all configs to stop the BFD linker exhausting memory. - Cap parallel compiles via CH_COMPILE_JOBS job pool (MinGW/MSVC) and serialize MinGW link steps to avoid cc1 OOM / MSVC C1060 out-of-heap. - Remove bogus /NODEFAULTLIB:libcmtd /DEFAULTLIB:msvcrtdd from integration tests: it forced a nonexistent dynamic CRT and broke the MSVC link (LNK1104); global /MTd policy already keeps the CRT consistent. - windows.yml: install mingw-w64-x86_64-lld and pass -DCH_COMPILE_JOBS=4.
TODO : refactor renderer/scenerenderer and fix bugs
refactoring graphics pipeline, making new managers feat : changed api for file dialogs , added new dialogs to editor (usablity)
refactoring graphics pipeline, making new managers feat : changed api for file dialogs , added new dialogs to editor (usablity)
…nder engine/ - Complete rewrite of NativeCallGenerator using ISourceGenerator to auto-generate unmanaged delegate pointers (_Ptr fields) and C# getters/setters via [NativeCall] and [NativeProperty] attributes. - Refactor managed C# component wrappers (PlayerComponent, TransformComponent, RigidBodyComponent, SpawnComponent, NetworkIdentityComponent) to use attributes, eliminating over 70% of boilerplate code. - Relocate scripting directory into engine/scripting to align with engine subsystem structure. - Add comprehensive documentation in docs/SCRIPTING_INTEROP.md.
Build config cleanup: - cmake/ProjectHelpers.cmake: remove unused SHARED Module lib and redundant GameTarget wrapper; POST_BUILD commands now target Exe - game/*/CMakeLists.txt: update POST_BUILD targets accordingly - CMakePresets.json: switch windows-msvc to Ninja Multi-Config + cl; add windows-vs2022 preset (Visual Studio 18 2026 .sln) Game scaffolding: - tools/create_game.py: new script to scaffold game/mygame/ with CMakeLists.txt, main.cpp, .chproject, assets/scripts/ - editor/project_manager.cpp: CMakeLists.txt + src/main.cpp generated by NewProject() — place project under game/ for auto-discovery Docs: - readme.md: 686→305 lines, remove duplicated Components/Audio/Physics, add presets table, reference create_game.py, runtime bug note - AGENTS.md, CLAUDE.md: document windows-vs2022 preset and create_game.py CI: - .github/workflows/windows.yml: add --parallel to build step Verified: 898/898 targets built, 146/146 tests passed (clang preset).
…iplayer scene sync - Implement 3D nametag rendering system with FreeType-GL font atlas and distance-compensated dynamic scaling - Add in-game scriptable chat system (InGameChat.cs) with network synchronization and input focus handling - Add Cyrillic and Ukrainian font glyph baking (0x0400..0x04FF) for ImGui UI and 3D world text - Fix client scene transition from lobby by dispatching SceneChangeRequestEvent on SceneChangeMessage - Fix client LocalNetworkID persistence across scene loads and ensure IsOwner is assigned to local player avatar - Reorganize C# scripts into lowercase domain folders (gameplay/, network/, player/, ui/) - Guard against duplicate script instantiations in ScriptEngine and add IsOwner checks on player scripts - Fix peer avatar velocity replication in Jolt physics for network-driven avatars - Refactor glue registration file to script_glue_generated_reg.inl
- Move nametag_system from engine_scene to engine_graphics to break circular dependency (scene_renderer -> nametag_system) - Remove Renderer* parameter from DrawNametags, use ServiceLocator instead (consistent with Network/AssetManager pattern) - Remove dead engine_dummy.cpp (never compiled, CH_ENGINE_SHARED=OFF)
…action + UPnP status Networking refactoring: - Extract NetworkSession (connection state machine, ENet lifecycle) - Extract NetworkTransport (send/recv, crypto, packet callbacks) - Extract NetworkPlayerManager (player list, names, skins, IDs) - Add NetworkError enum for error handling (Initialize/HostGame/ConnectTo) - Add connection/disconnection callbacks - Network class now composes the three components (facade pattern) - Add Network.IsUpnpAvailable() for C++/C# API - Show UPnP status in editor panel and LobbyUI Camera system: - Add CameraAutoSelectSystem for menu scenes - Selects camera by BackgroundMode (orthographic 2D / perspective 3D) - Added MenuCamera2D and MenuCamera3D to start_menu.chscene UI module: - Extract engine/graphics/ui/ -> engine/ui/ as standalone CMake module - Replace UIFactory with CreateDefaultWidgetData()/WidgetTypeName() functions - Update all consumers to use new include paths README: - Add networking module to project structure - Add ENet/libsodium/miniupnpc to dependencies - Add multiplayer capability to overview
…ort DLL filtering, PackMode::Max Physics: - Fix HasCachedMeshShape to check both raw key and _convex suffix for convex hull cache hits - Fix QueuePrebuildShape dedup to also check convex hull cache with both keys - Remove redundant InitializeBodies call from Scene::InitializePhysicsStartup - Add Physics* context emplacement directly in InitializePhysicsStartup Mesh merger: - Fuse separate vertex/normal/tangent loops into single pass with reserve() Editor: - Fix ImGui DisplayHex/DisplayRGB mutually exclusive flag assertion - Append .chscene/.chenv extensions in save dialogs if missing - Fix OpenScene filter name - Redesign export dialog with 4 mode buttons (Fast/Balanced/Max/Raw) - Add PackMode::Max (threshold=0.0 forced) Export: - Filter DLLs by CH_BUILD_CONFIG define: Debug-only for debug, release-only for release - Only copy .chproject in raw mode (already in resources.pack for others) - Add CH_BUILD_CONFIG/CH_BUILD_PRESET compile definitions via CMake
- Add firewall_helper.h/cpp with cross-platform support: - Windows: netsh advfirewall (requires admin) - Linux: iptables/nftables (requires root) - Auto-add inbound UDP rule on HostGame(), remove on Shutdown() - Expose IsFirewallRuleActive to C# scripting and editor panel - Show firewall status in lobby UI (FW: OK / FW: No rule) - Network panel shows green/orange firewall status indicator
… timeout, unregister UPnP/Firewall glue Firewall: - Replace _popen with CreateProcess for reliable netsh output capture - Add detailed logging for IsElevated, AddUDPRule, RuleExists - Fix rule detection: match ruleName in output (not just 'Ok.') Connection state: - Add m_Connected flag to NetworkSession (set only on ENET_EVENT_TYPE_CONNECT) - Expose IsFullyConnected() through Network service + C# scripting - ConnectButton polls IsFullyConnected with 5s timeout before loading lobby - Shows error if connection fails/times out Script glue: - Register missing IsUpnpAvailable, IsFirewallRuleActive, IsFullyConnected - These were declared in C# but never wired up in script_glue.cpp UI: - FW status: only show when active (hide 'no rule' text, just show disabled hint) - Lobby header: 'FW: OK' appended only when rule exists
- Each test gets a unique port (atomic counter) to avoid binding conflicts - Increase PumpUntil timeout from 5s to 10s for slow CI containers - Add <atomic> include for std::atomic
- Add SetTestMode(true) to Network service - Skips upnpDiscover(2s blocking) and firewall rule creation in tests - Tests enable test mode in SetUp() before Initialize() - This eliminates the 2-second UPnP block per HostGame call that was causing cascading timeouts in CI containers
- Editor panel: bullet list with Radmin VPN setup instructions - Lobby UI: one-line tip when UPnP is Manual - Gives players a practical alternative to port forwarding
Pure encode/decode tests (NetworkMessageTest) still run. Loopback tests only run locally.
- Builds windows-clang debug and release presets - Runs resource sync via Python - Uploads artifacts per preset
- Fix SplitCustom flag not persisting: auto-detect from SplitSizeMB when loading export dialog - Update project exporter to respect custom split size - Various other fixes across engine, editor, and game code
Gameplay fixes:
- ResolveComponentName: alias "RigidBodyComponent" to the registry key
"Rigid BodyComponent". The registry derives SerializationKey from the
display name ("Rigid Body" + "Component"), but C# sends the CLR type name
with no space, so GetComponent<RigidBodyComponent>() never matched and
PlayerController.OnUpdate bailed before applying WASD movement.
- Application::~Application: run Log::Shutdown() after m_Window.reset().
~GlfwWindow logs "Glfw Window Closed" during teardown; resetting the core
logger first dereferenced a null spdlog::logger and segfaulted.
Docs:
- Rewrite docs/SCRIPTING_API.md against the real managed API surface
(public override lifecycle, Key/MouseButton enums, ulong OnCollisionEnter,
UI.Text only) with a verified worked example.
- Correct readme.md scripting/collision/UI examples to match, and note the
font system needs rework for scenes and the editor.
Snapshot of ongoing work on the opengl branch across the renderer, editor panels, scripting host, physics, asset loaders, and tests. Committed separately from the WASD/shutdown fixes and doc rewrite so those stay isolated in history.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.