refactor to use new graphics library#24
Merged
Thomas-Chqt merged 65 commits intomasterfrom May 4, 2026
Merged
Conversation
Add include/Game-Engine/{Components.hpp,Entity.hpp} and update ECSWorld
to introduce a Component concept and a templated basic_entity API.
Remove old src/Components.hpp and src/Entity.*. Update tests: rename
test target to GE_test, glob test sources, and add Entity unit tests.
- move main to engine side - add imgui - use frame graph to render frame
Squashed commit of the following: commit aad0fd5 Author: Thomas Choquet <semoir.dense-0h@icloud.com> Date: Sun Mar 15 17:22:10 2026 +0900 add entity inspector commit ca48f21 Author: Thomas Choquet <semoir.dense-0h@icloud.com> Date: Sun Mar 15 15:44:40 2026 +0900 fix bindings commit c042095 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 07:54:06 2026 +0000 Merge setClearColor/setClearDepth into setColorAttachment/setDepthAttachment with default params Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit e1dab84 Author: Thomas <semoir.dense-0h@icloud.com> Date: Sun Mar 15 16:47:39 2026 +0900 Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> commit 003bb1b Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 07:16:01 2026 +0000 Remove add*Buffer/addTexture helpers from builder base; pass builders populate declarations directly in build() Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit cc67f7a Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 07:00:21 2026 +0000 Make addConstantBuffer/addStructuredBuffer/addTexture protected, add texture declarations to passes Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 4baa323 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 06:30:11 2026 +0000 Move resource declarations to FlatGeometryPassBuilder constructor using builder methods Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 9b747cc Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 06:29:01 2026 +0000 Add pass-level resource declarations and validate resource references in FrameGraph Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 819791f Author: Thomas Choquet <semoir.dense-0h@icloud.com> Date: Sun Mar 15 14:21:18 2026 +0900 refactor and improvments commit 040674f Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 02:49:00 2026 +0000 Add assert(newBuffer) for constant and structured buffer allocations Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 4041ae3 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 02:44:25 2026 +0000 Default m_depthAttachment to std::nullopt, make depth opt-in via setDepthAttachment() Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 0ef8e24 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 02:39:54 2026 +0000 Use .at() instead of operator[] for constantBuffers and bufferMap access Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 3efad9f Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 02:04:11 2026 +0000 Remove buildAttachments helper — inline assignments in each build() function Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 9403118 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 01:47:33 2026 +0000 Rename FramePassContext to FramePassExecuteContext, store AttachmentDescriptor directly in builder base, use std::byte, remove renderSize from contexts Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 70863bb Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sun Mar 15 01:19:37 2026 +0000 Address review: rename texture/attachment, constructor params, buffer tracking, move VP to setup, filter resources per pass Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit f736f1d Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sat Mar 14 16:02:43 2026 +0000 Address review comments: single AttachmentUsage struct, back buffer in texture list, CRTP builder base, setup context with setStructuredBufferContent Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit f586248 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sat Mar 14 14:47:16 2026 +0000 Use .at() for safe textureMap access in sampled attachment loop Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit b3b0c43 Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sat Mar 14 14:42:11 2026 +0000 Fix unique_ptr to shared_ptr conversion in buffer creation Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit 58ac64d Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sat Mar 14 14:33:32 2026 +0000 Restructure frame graph: add buffer support, move attachment declarations to graph level, add setup phase - AttachmentDescriptor now only contains name/size/pixelFormat (resource declaration) - New ColorAttachmentUsage and DepthAttachmentUsage for pass-level references - New ConstantBufferDescriptor and StructuredBufferDescriptor types - New FramePassSetupContext for the setup phase - FramePassContext now uses bufferMap instead of individual buffer members - FramePass gains an optional setup function run before execute - FrameGraph::Descriptor now has attachments, constantBuffers, structuredBuffers - Renderer manages buffers from frame graph descriptors - Editor updated to new API Co-authored-by: Thomas-Chqt <104726659+Thomas-Chqt@users.noreply.github.com> commit c085cbc Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Date: Sat Mar 14 14:21:25 2026 +0000 Initial plan commit c08dafa Author: Thomas Choquet <semoir.dense-0h@icloud.com> Date: Sat Mar 14 22:51:17 2026 +0900 add flat geometry frame pass builder commit 7664817 Author: Thomas Choquet <semoir.dense-0h@icloud.com> Date: Fri Mar 13 12:10:21 2026 +0900 add shaders
- Add AssetManagerView with per-scene asset ID/path mapping and built-in cube handling - Move AssetID/BUILT_IN_CUBE_ASSET_ID to AssetManagerView and switch components to include it - Replace Project scene storage from `std::list<Scene>` to `std::map<uint32_t, Scene::Descriptor>` with start-scene ID accessors - Build default project scene via `Scene::Descriptor` data instead of runtime entity creation - Add Scene constructor from descriptor and ECS entity ID registration - Simplify FlatGeometryPassBuilder to depend only on `Scene` - Introduce `ContentBrowserPanel` with ImGui drag-and-drop payload support
Introduce ICamera interface, EditorCamera and Viewport. Pass ICamera to FlatGeometryPassBuilder and use viewport.size() for framegraph textures. Make ViewportPanel own its size and report resizes via a callback. Add keyboard shortcuts (1/2) to switch between editor and scene cameras and wire viewport camera into the editor.
Rename Project::gameDescriptor() to Project::makeGameDescriptor() (header + implementation). Replace Game::switchActiveScene with an inline Game::setActiveScene in the header and remove the unused implementation in Game.cpp. Add a comment in FramePassBuilder noting that loading assets during the pass may be undesirable.
Change ICamera::viewProjectionMatrix to accept an aspect ratio. FramePassBuilder now takes scene/camera provider functions and computes the view-projection using either an ICamera implementation or the scene's active camera entity, deriving aspect from the color attachment. Remove the Editor Viewport types and adapt Editor/EditorCamera usage. Add Scene::makeDescriptor and expose AssetManagerView::registredAssets.
Add Editor(int argc, char* argv[]) and delete the default ctor. Introduce loadProjectFile(...) to load/validate YAML and use it on startup when an argv path is provided, setting m_projectFilePath. Load ImGui settings from the project and only reload the script library if the file exists. Refactor loadProject to reuse the helper. Enable moves for Project by defaulting its move ctor and move assignment.
Store inputs in a map keyed by name and replace vector-based addInput with addInput(name, VInput). Add setInputCallback<T>(name, callback) to assign callbacks into the input variant. Introduce the InputType concept and constrain InputMapper templates accordingly. Refactor Editor to build inputs with makeEditorInputs and register callbacks via setInputCallback. Add an insert assert and update iteration to use map entries.
Encapsulate dynamic library handling and symbol lookup in ScriptLibraryManager. Update Editor, Game and EntityInspectorPanel to use the new ListScriptNamesFn / ListScriptParametersFn / MakeScriptInstanceFn APIs and remove direct dlLoad usage. Add implementation and adjust tests.
Pass Scene* to EntityInspectorPanel to access AssetManagerView and implement MeshComponent UI (combo, drag-and-drop, asset registration). Change BUILT_IN_CUBE_ASSET_ID to 0 and start generated AssetIDs at 1; preload registered assets in AssetManagerView constructor. Update example project asset IDs and mesh data.
Switch Scene::Descriptor and AssetManagerView to use a map keyed by VAssetPath with AssetID values. Update AssetManagerView internals to maintain both maps and to register assets correctly. Update YAML decoder to accept both the new map shape and the legacy id->path form for backwards compatibility. Adjust UI and tests to the new mapping and add a test for legacy YAML decoding. Use VAssetPath->AssetID for registered assets map
Include <vector> and materialize the transformed ECS view into a std::vector before iterating to avoid lifetime issues with transient ranges.
Implement player movement, rotation and jumping logic in the PlayerController script and add script parameters for speeds and gravity Add worldPosition/worldRotation/worldScale helpers to Entity and use them to compute camera position/direction in FramePassBuilder Add InputContext::clearAllInputCallbacks and call it on game teardown Update example project scene layout and input mappings to match new controls Pass DL_NOW|DL_LOCAL to dlLoad and bump FetchContent git tags for deps
Replace separate const/non-const accessors with C++ deducing-this forms for InputContext, inputs and Archetype::getEntityID. Move the getEntityID implementation into the header and use conditional_t to select constness. Remove redundant .cpp definitions.
Replace mainMenuBar with a generic menuFromPath and add context menus for the scene graph and scene window. Introduce collapsingHeaderWithActionButton to render a SmallButton next to CollapsingHeader and use it for component/input removal and related UI adjustments (button sizing and callbacks).
Add post-build codesign commands for GE-Editor and GE_test when building on macOS with non-Xcode generators. Support optional entitlements via new ge-editor.entitlements and ge-test.entitlements, and expose CODESIGN_IDENTITY cache variable (default "-")
Export CMAKE_SHARED_LIBRARY_SUFFIX as GE_SHARED_LIBRARY_EXTENSION so code can compare platform-specific shared library suffix. Strip the suffix when serializing scriptsLib and append it when deserializing if missing. Update example project to store scriptsLib without the extension.
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.