Skip to content

refactor(graphic): remove default render pipeline from graphic plugin#424

Merged
Miou-zora merged 12 commits into
mainfrom
remove-default-render-pipeline-from-graphic-plugin
Jan 15, 2026
Merged

refactor(graphic): remove default render pipeline from graphic plugin#424
Miou-zora merged 12 commits into
mainfrom
remove-default-render-pipeline-from-graphic-plugin

Conversation

@Miou-zora
Copy link
Copy Markdown
Contributor

@Miou-zora Miou-zora commented Jan 13, 2026

Not related to any issues.

As graphic plugin is getting bigger over time, I wanted to split it into 2 parts: one for the skeleton (graphic) that can be used to implement real implementation of graphic pipeline, and one for the implementation (default pipeline) that creates RenderPass, components and all stuff related to real 3d related stuff.

Summary by CodeRabbit

  • New Features

    • Added a DefaultPipeline plugin to provide a centralized default render pipeline and utilities.
    • ResourceManager gained safe GetDefault() accessors.
  • Refactor

    • Reorganized graphics subsystems into the DefaultPipeline; trimmed public surface of the legacy graphics plugin.
    • Examples and build scripts updated to use the consolidated pipeline dependency and simplified initialization.
  • Tests

    • Added unit and integration tests for the DefaultPipeline plugin.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 13, 2026

Warning

Rate limit exceeded

@Miou-zora has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between f72bdcf and 343e22b.

📒 Files selected for processing (1)
  • src/plugin/graphic/src/system/initialization/ConfigureSurface.cpp

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds a new DefaultPipeline plugin that extracts GPU-component wiring, render-pipeline setup, material/lighting buffers, and update systems from the Graphic plugin; updates examples/build to use DefaultPipeline; introduces tests and resource API additions; moves many namespaces from Graphic::* to DefaultPipeline::*.

Changes

Cohort / File(s) Summary
New DefaultPipeline plugin
src/plugin/default-pipeline/src/plugin/PluginDefaultPipeline.hpp, src/plugin/default-pipeline/src/plugin/PluginDefaultPipeline.cpp, src/plugin/default-pipeline/src/DefaultPipeline.hpp
New DefaultPipeline::Plugin type and Bind implementation that requires Rendering/Graphic, registers AmbientLight resource, wires GPU component lifecycle, and registers setup/preparation systems.
DefaultPipeline components
src/plugin/default-pipeline/src/component/*
GPU component headers relocated into DefaultPipeline::Component (GPUCamera, GPUMaterial, GPUMesh, GPUTransform) — namespace changes only.
DefaultPipeline resources & buffers
src/plugin/default-pipeline/src/resource/*, src/plugin/default-pipeline/src/resource/buffer/*
AmbientLight and multiple GPU buffer types moved to DefaultPipeline::Resource; many types now derive from or reference Graphic::Resource::... and signatures updated to use fully-qualified Graphic resource/context types.
GPU component management systems
src/plugin/default-pipeline/src/system/GPUComponentManagement/*
On{Camera,Material,Mesh,Transform}{Creation,Destruction} implementations and declarations moved to DefaultPipeline::System; component and resource type usages adjusted.
Initialization & preparation systems
src/plugin/default-pipeline/src/system/initialization/*, src/plugin/default-pipeline/src/system/preparation/*
CreateDefaultRenderPipeline/CreateDefaultMaterial/CreateAmbientLight/CreatePointLights and Update* systems moved/rewritten under DefaultPipeline::System; adds UpdatePointLights implementation.
Utilities & utils hub
src/plugin/default-pipeline/src/utils/*, src/plugin/default-pipeline/src/DefaultPipeline.hpp
Adds DefaultRenderPass, DefaultMaterial, AmbientLight, PointLights utils under DefaultPipeline::Utils and a centralized include hub.
Plugin tests & build
src/plugin/default-pipeline/tests/*, src/plugin/default-pipeline/xmake.lua
Adds GoogleTest harness, test main, and PluginDefaultPipeline xmake target; per-test binaries auto-generated.
Graphic plugin pruning
src/plugin/graphic/src/plugin/PluginGraphic.cpp, src/plugin/graphic/src/Graphic.hpp
Removed GPU wiring, ambient/point light registrations, and many system registrations; public include surface narrowed.
Graphic utilities & tests
src/plugin/graphic/src/utils/EndRenderTexture.hpp, src/plugin/graphic/tests/*, src/plugin/graphic/xmake.lua
Adds END_RENDER_TEXTURE_ID util, updates tests to reference new symbol paths, and adds tinyobjloader package.
Removed Graphic point-lights API
src/plugin/graphic/src/resource/PointLights.hpp, src/plugin/graphic/src/system/initialization/CreatePointLights.cpp, src/plugin/graphic/src/system/preparation/UpdatePointLights.cpp
Deletes public PointLights facility and its Create/Update implementations (migrated to DefaultPipeline).
Examples & root build
examples/*/src/main.cpp, examples/*/xmake.lua, xmake.lua
Examples switched to DefaultPipeline::Plugin; example xmake files consolidated to EngineSquared; root xmake adds PluginDefaultPipeline and PluginEvent deps and imports default-pipeline xmake.
Resource manager API
src/plugin/object/src/resource/ResourceManager.hpp
Adds GetDefault() and const GetDefault() const accessors that throw if no default resource is set.

Sequence Diagram(s)

sequenceDiagram
    participant Core as Engine::Core
    participant Plugin as DefaultPipeline::Plugin
    participant Rendering as RenderingPipeline
    participant GraphicRes as Graphic::Resource

    Core ->> Plugin: construct Plugin(core)
    Plugin ->> Core: Require(Rendering, Graphic)
    Plugin ->> Core: Register Resource(AmbientLight)
    Plugin ->> Rendering: Register Setup systems (CreateDefaultRenderPipeline, CreateDefaultMaterial, CreatePointLights)
    Plugin ->> Rendering: Register Preparation systems (UpdateGPUTransforms, UpdateGPUCameras, UpdateGPUMaterials, UpdateAmbientLight, UpdatePointLights)
    Core ->> Rendering: Run Setup -> create shaders, buffers, bind groups (uses Graphic::Resource)
    Core ->> Rendering: Run Preparation -> update GPU buffers from components
    Rendering ->> GraphicRes: Store/Update GPU buffers & bind groups
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • ripel2

Poem

🐰 I hopped through headers, buffers, and light,

I moved namespaces deep into the night.
Pipelines tidy, systems aligned,
A rabbit claps—builds passing, refined! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.60% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main refactoring objective: removing the default render pipeline from the graphic plugin.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/plugin/default-pipeline/src/resource/buffer/PointGPUBuffer.hpp (1)

29-39: Potential out-of-bounds access if normals/texCoords arrays are smaller than vertices.

The loop iterates based on vertices.size() but unconditionally accesses normals[i] and texCoords[i]. If these arrays have fewer elements than vertices, this results in undefined behavior.

Suggested defensive check
+        if (meshComponent->vertices.size() != meshComponent->normals.size() ||
+            meshComponent->vertices.size() != meshComponent->texCoords.size())
+        {
+            throw Graphic::Exception::NonexistentComponentError(
+                "Mesh vertices, normals, and texCoords must have the same size.");
+        }
+
         for (uint64_t i = 0; i < meshComponent->vertices.size(); ++i)
         {
src/plugin/graphic/src/system/preparation/PrepareEndRenderTexture.cpp (1)

86-111: Address TODO for END_DEPTH_RENDER_TEXTURE_ID namespace inconsistency.

END_DEPTH_RENDER_TEXTURE_ID (lines 86, 88, 93, 97, 111) is defined in Graphic::System while END_RENDER_TEXTURE_ID is in Graphic::Utils. The code already contains a TODO comment acknowledging this: "remove this from Graphic plugin, as we don't theorically need it here". Migrate END_DEPTH_RENDER_TEXTURE_ID to Graphic::Utils to align with END_RENDER_TEXTURE_ID and resolve the inconsistency.

🤖 Fix all issues with AI agents
In @src/plugin/default-pipeline/src/DefaultPipeline.hpp:
- Around line 18-24: Remove the duplicate include of the OnCameraCreation.hpp
header in DefaultPipeline.hpp: keep a single #include
"system/GPUComponentManagement/OnCameraCreation.hpp" and delete the other
redundant line so the header is only included once.

In @src/plugin/default-pipeline/src/system/preparation/UpdatePointLight.cpp:
- Line 1: There are unused/duplicate files: an empty UpdatePointLight.cpp and
UpdatePointLights.hpp (singular) while the real implementation lives in
UpdatePointLights.cpp/UpdatePointLights.hpp (plural) and none are referenced;
either remove the empty/duplicate singular files from the PR and from build
lists (CMakeLists/compile units) to avoid confusion, or consolidate by
moving/renaming the implemented symbols from UpdatePointLights (plural) to the
singular filenames and update any registration/registration list (system
registry, plugin init, or systems vector) to reference the intended
class/function (the UpdatePointLights system) so only one consistent pair is
built and registered. Ensure you also update include paths and any forward
declarations so the build and system integration reference the single canonical
symbol (UpdatePointLights) and remove the unused files from version control if
you choose deletion.

In @src/plugin/default-pipeline/xmake.lua:
- Around line 33-38: The add_headerfiles patterns currently listed
(add_headerfiles("src/(component/*.hpp)", "src/(plugin/*.hpp)",
"src/(resource/*.hpp)", "src/(system/*.hpp)", "src/(system/preparation/*.hpp)",
"src/(utils/*.hpp)")) omit deeper subdirectories and thus miss headers in
resource/buffer, system/GPUComponentManagement, and system/initialization;
update the add_headerfiles invocations to either add explicit patterns for those
subdirs (e.g., include src/(resource/buffer/*.hpp),
src/(system/GPUComponentManagement/*.hpp), src/(system/initialization/*.hpp)) or
replace the single-level globs with recursive globs (e.g.,
src/(resource/**.hpp), src/(system/**.hpp)) so all nested headers are captured.

In @src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp:
- Around line 6-16: The function GetRenderGraph is dead code; either remove
GetRenderGraph or update ExecuteRenderPass to call GetRenderGraph instead of
using GetOrDefault() so lookups throw on missing graphs. If you choose removal,
delete the GetRenderGraph definition and any unused includes; if you choose to
enforce strict lookup, replace the RenderGraphContainer::GetOrDefault(...) call
inside ExecuteRenderPass with a call to GetRenderGraph(core, name) (which relies
on RenderGraphContainer::Contains and Get) so missing graphs raise a
runtime_error.
🧹 Nitpick comments (20)
src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp (1)

3-3: Unused include.

entity/Entity.hpp is included but no Entity type or related functionality appears to be used in this file. Consider removing this include.

src/plugin/graphic/tests/BufferTest.cpp (2)

5-5: Potentially unused include.

Object.hpp does not appear to be directly used in this test file. If it's not required transitively, consider removing it.


12-24: Consider guarding against double-creation to prevent resource leaks.

If Create() is called twice without an intervening Destroy(), the previously created buffer will be leaked. While this test code controls the call sequence, adding a guard improves robustness and mirrors production patterns.

💡 Suggested guard
     void Create(Engine::Core &core) override
     {
+        if (_isCreated)
+        {
+            return; // or throw, depending on desired behavior
+        }
         const auto &context = core.GetResource<Graphic::Resource::Context>();

         wgpu::BufferDescriptor bufferDesc(wgpu::Default);
src/plugin/default-pipeline/src/system/preparation/UpdatePointLight.hpp (1)

1-1: Consider deferring creation of this empty header file.

This header is currently empty and unused in the codebase. Files should be created when they have actual content rather than committing empty scaffolding. Either add the intended declarations for UpdatePointLight now, or defer creation of this file until the system is implemented.

src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraDestruction.hpp (1)

6-10: LGTM!

The namespace migration to DefaultPipeline::System is correct and consistent with the PR's refactoring goals.

🔧 Optional: Add closing namespace comment for consistency

Other files in this PR include closing namespace comments. Consider adding one here for consistency:

 void OnCameraDestruction(Engine::Core &core, Engine::Entity entity);
 
-}
+} // namespace DefaultPipeline::System
src/plugin/default-pipeline/src/component/GPUMaterial.hpp (2)

17-17: Remove the trailing semicolon after the namespace closing brace.

Namespaces don't require a semicolon after the closing brace. While most compilers tolerate this, it's technically superfluous.

Suggested fix
-}; // namespace DefaultPipeline::Component
+} // namespace DefaultPipeline::Component

3-4: Remove unused includes.

Camera.hpp and Transform.hpp are not referenced in this header—the GPUMaterial struct only depends on entt::hashed_string. Removing them would reduce coupling and improve compile times.

Suggested fix
 #pragma once
 
-#include "component/Camera.hpp"
-#include "component/Transform.hpp"
 #include "glm/glm.hpp"
 #include <entt/core/hashed_string.hpp>
src/plugin/default-pipeline/src/plugin/PluginDefaultPipeline.hpp (1)

8-11: Minor formatting inconsistency.

The constructor's brace placement and the // empty comment are unconventional. Consider aligning with standard formatting.

Suggested formatting
     explicit Plugin(Engine::Core &core)
-        : Engine::APlugin(core){
-              // empty
-          };
+        : Engine::APlugin(core)
+    {
+    }
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (1)

35-37: Consider caching the context reference to avoid redundant resource lookups.

GetResource<Graphic::Resource::Context>() is called twice. Other buffer implementations (e.g., CameraGPUBuffer.hpp lines 17-18) cache the context in a local reference.

Suggested improvement
+        const auto &context = core.GetResource<Graphic::Resource::Context>();
-        _buffer = core.GetResource<Graphic::Resource::Context>().deviceContext.GetDevice()->createBuffer(bufferDesc);
+        _buffer = context.deviceContext.GetDevice()->createBuffer(bufferDesc);

-        core.GetResource<Graphic::Resource::Context>().queue->writeBuffer(_buffer, 0, indices.data(), bufferDesc.size);
+        context.queue->writeBuffer(_buffer, 0, indices.data(), bufferDesc.size);
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)

17-18: Minor inconsistency in component namespace qualification.

Line 17 uses DefaultPipeline::Component::GPUCamera (fully qualified) while line 43 uses Component::GPUCamera (relative). Both resolve correctly, but consider using consistent qualification style throughout the file.

Also applies to: 43-44

src/plugin/default-pipeline/tests/PluginDefaultPipelineTest.cpp (1)

8-19: Consider a more descriptive test name and adding assertions.

The test name "Casual" doesn't convey what's being verified. Consider renaming to something like PluginRegistration_RunsWithoutCrashing or SmokeTest.

The test currently only verifies that the plugin loads and systems run without throwing, which is a valid smoke test. However, consider adding assertions to verify expected state after RunSystems() completes (e.g., that expected resources are registered).

src/plugin/default-pipeline/src/system/initialization/CreatePointLights.hpp (1)

9-9: Minor: Add namespace closing comment for consistency.

Other headers in this PR (e.g., UpdateGPUCameras.hpp) use } // namespace DefaultPipeline::System for the closing brace. Consider adding the same comment here for consistency.

Suggested fix
-}
+} // namespace DefaultPipeline::System
src/plugin/default-pipeline/src/component/GPUTransform.hpp (1)

11-11: Nitpick: Remove unnecessary semicolon after namespace closing brace.

Namespaces don't require a semicolon after the closing brace (unlike classes/structs). This compiles fine but is unnecessary.

Suggested fix
-}; // namespace DefaultPipeline::Component
+} // namespace DefaultPipeline::Component
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshDestruction.hpp (1)

6-10: Consider adding closing namespace comment for consistency.

Other files in this PR include closing comments (e.g., // namespace DefaultPipeline::Resource). Adding one here would maintain consistency.

🔧 Suggested change
 namespace DefaultPipeline::System {

 void OnMeshDestruction(Engine::Core &core, Engine::Entity entity);

-}
+} // namespace DefaultPipeline::System
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialCreation.hpp (1)

6-10: Consider adding closing namespace comment for consistency.

Same as OnMeshDestruction.hpp — a closing comment would align with other files in this PR.

🔧 Suggested change
 namespace DefaultPipeline::System {

 void OnMaterialCreation(Engine::Core &core, Engine::Entity entity);

-}
+} // namespace DefaultPipeline::System
src/plugin/default-pipeline/src/system/initialization/CreateDefaultRenderPipeline.hpp (1)

5-7: LGTM with a minor style suggestion.

The namespace migration is correct. For consistency with other headers in this PR (e.g., UpdateGPUMaterials.hpp, UpdatePointLights.cpp), consider adding the closing namespace comment.

♻️ Optional style improvement
 namespace DefaultPipeline::System {
 void CreateDefaultRenderPipeline(Engine::Core &core);
-}
+} // namespace DefaultPipeline::System
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformCreation.hpp (1)

6-10: Namespace migration is correct.

The function declaration is properly moved to DefaultPipeline::System. Consider adding a closing namespace comment for consistency with other headers in this PR (e.g., CreateAmbientLight.hpp uses // namespace DefaultPipeline::System).

♻️ Optional: Add closing namespace comment for consistency
 namespace DefaultPipeline::System {

 void OnTransformCreation(Engine::Core &core, Engine::Entity entity);

-}
+} // namespace DefaultPipeline::System
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialDestruction.hpp (1)

6-10: Namespace change looks good, but missing closing comment.

The namespace refactoring to DefaultPipeline::System is consistent with the PR objectives. However, for consistency with other files in this PR (e.g., UpdateAmbientLight.hpp, CreateDefaultMaterial.hpp), consider adding the closing namespace comment.

✨ Suggested improvement
 namespace DefaultPipeline::System {
 
 void OnMaterialDestruction(Engine::Core &core, Engine::Entity entity);
 
-}
+} // namespace DefaultPipeline::System
src/plugin/graphic/src/system/preparation/PrepareEndRenderTexture.hpp (1)

8-9: Acknowledged TODO for future cleanup.

The TODO comment correctly identifies that END_DEPTH_RENDER_TEXTURE_ID should eventually be moved out of the Graphic plugin to align with the refactoring goals (similar to how END_RENDER_TEXTURE_ID was moved to Graphic::Utils).

Would you like me to open an issue to track this cleanup task?

src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp (1)

42-57: Consider extracting buffer creation to a private helper for consistency.

Unlike sibling buffer classes (AmbientLightBuffer, TransformGPUBuffer, CameraGPUBuffer) that use a private _CreateBuffer helper method, this class inlines the buffer creation logic directly in Create(). Consider extracting to a _CreateBuffer method for consistency.

♻️ Optional refactor for consistency
 void Create(Engine::Core &core) override
 {
     const auto &context = core.GetResource<Graphic::Resource::Context>();

-    wgpu::BufferDescriptor bufferDesc(wgpu::Default);
-    bufferDesc.usage = wgpu::BufferUsage::CopyDst | wgpu::BufferUsage::Uniform;
-    bufferDesc.size = sizeof(PointLightsData);
-    bufferDesc.label = wgpu::StringView(_debugName);
-
-    _buffer = context.deviceContext.GetDevice()->createBuffer(bufferDesc);
+    _buffer = _CreateBuffer(context.deviceContext);
     _isCreated = true;

     PointLightsData data{};
     data.count = 0;
     context.queue->writeBuffer(_buffer, 0, &data, sizeof(PointLightsData));
 }
+
+private:
+wgpu::Buffer _CreateBuffer(const Graphic::Resource::DeviceContext &context)
+{
+    wgpu::BufferDescriptor bufferDesc(wgpu::Default);
+    bufferDesc.usage = wgpu::BufferUsage::CopyDst | wgpu::BufferUsage::Uniform;
+    bufferDesc.size = sizeof(PointLightsData);
+    bufferDesc.label = wgpu::StringView(_debugName);
+    return context.GetDevice()->createBuffer(bufferDesc);
+}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8070047 and f37eaec.

📒 Files selected for processing (78)
  • examples/graphic_light_usage/src/main.cpp
  • examples/graphic_light_usage/xmake.lua
  • examples/graphic_material_usage/src/main.cpp
  • examples/graphic_material_usage/xmake.lua
  • examples/graphic_usage/src/main.cpp
  • examples/graphic_usage/xmake.lua
  • src/plugin/default-pipeline/src/DefaultPipeline.hpp
  • src/plugin/default-pipeline/src/component/GPUCamera.hpp
  • src/plugin/default-pipeline/src/component/GPUMaterial.hpp
  • src/plugin/default-pipeline/src/component/GPUMesh.hpp
  • src/plugin/default-pipeline/src/component/GPUTransform.hpp
  • src/plugin/default-pipeline/src/plugin/PluginDefaultPipeline.cpp
  • src/plugin/default-pipeline/src/plugin/PluginDefaultPipeline.hpp
  • src/plugin/default-pipeline/src/resource/AmbientLight.cpp
  • src/plugin/default-pipeline/src/resource/AmbientLight.hpp
  • src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/PointGPUBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraCreation.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraDestruction.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraDestruction.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialCreation.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialDestruction.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialDestruction.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshCreation.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshDestruction.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshDestruction.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformCreation.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformDestruction.cpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformDestruction.hpp
  • src/plugin/default-pipeline/src/system/initialization/CreateAmbientLight.cpp
  • src/plugin/default-pipeline/src/system/initialization/CreateAmbientLight.hpp
  • src/plugin/default-pipeline/src/system/initialization/CreateDefaultMaterial.cpp
  • src/plugin/default-pipeline/src/system/initialization/CreateDefaultMaterial.hpp
  • src/plugin/default-pipeline/src/system/initialization/CreateDefaultRenderPipeline.cpp
  • src/plugin/default-pipeline/src/system/initialization/CreateDefaultRenderPipeline.hpp
  • src/plugin/default-pipeline/src/system/initialization/CreatePointLights.cpp
  • src/plugin/default-pipeline/src/system/initialization/CreatePointLights.hpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateAmbientLight.cpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateAmbientLight.hpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateGPUCameras.cpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateGPUCameras.hpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateGPUMaterials.cpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateGPUMaterials.hpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateGPUTransforms.cpp
  • src/plugin/default-pipeline/src/system/preparation/UpdateGPUTransforms.hpp
  • src/plugin/default-pipeline/src/system/preparation/UpdatePointLight.cpp
  • src/plugin/default-pipeline/src/system/preparation/UpdatePointLight.hpp
  • src/plugin/default-pipeline/src/system/preparation/UpdatePointLights.cpp
  • src/plugin/default-pipeline/src/system/preparation/UpdatePointLights.hpp
  • src/plugin/default-pipeline/src/utils/AmbientLight.hpp
  • src/plugin/default-pipeline/src/utils/DefaultMaterial.hpp
  • src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp
  • src/plugin/default-pipeline/src/utils/PointLights.hpp
  • src/plugin/default-pipeline/tests/PluginDefaultPipelineTest.cpp
  • src/plugin/default-pipeline/tests/main.cpp
  • src/plugin/default-pipeline/xmake.lua
  • src/plugin/graphic/src/Graphic.hpp
  • src/plugin/graphic/src/plugin/PluginGraphic.cpp
  • src/plugin/graphic/src/resource/PointLights.hpp
  • src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp
  • src/plugin/graphic/src/system/initialization/CreatePointLights.cpp
  • src/plugin/graphic/src/system/preparation/PrepareEndRenderTexture.cpp
  • src/plugin/graphic/src/system/preparation/PrepareEndRenderTexture.hpp
  • src/plugin/graphic/src/system/preparation/UpdatePointLights.cpp
  • src/plugin/graphic/src/utils/EndRenderTexture.hpp
  • src/plugin/graphic/tests/BufferTest.cpp
  • src/plugin/graphic/tests/PrepareEndRenderTextureTest.cpp
  • src/plugin/graphic/xmake.lua
  • xmake.lua
💤 Files with no reviewable changes (3)
  • src/plugin/graphic/src/system/initialization/CreatePointLights.cpp
  • src/plugin/graphic/src/system/preparation/UpdatePointLights.cpp
  • src/plugin/graphic/src/resource/PointLights.hpp
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2026-01-11T10:21:30.302Z
Learnt from: ripel2
Repo: EngineSquared/EngineSquared PR: 423
File: examples/graphic_usage_with_physics/src/main.cpp:16-16
Timestamp: 2026-01-11T10:21:30.302Z
Learning: In the EngineSquared repository, examples located under the examples/ directory may not need strict production-quality rules (e.g., removing unused includes). Reviews of example files should focus on demonstrating functionality and correct behavior rather than enforcing full production-grade code cleanliness.

Applied to files:

  • examples/graphic_usage/src/main.cpp
  • examples/graphic_light_usage/src/main.cpp
  • examples/graphic_material_usage/src/main.cpp
📚 Learning: 2026-01-11T10:25:31.402Z
Learnt from: ripel2
Repo: EngineSquared/EngineSquared PR: 423
File: src/plugin/camera-movement/src/plugin/PluginCameraMovement.hpp:7-17
Timestamp: 2026-01-11T10:25:31.402Z
Learning: The Object plugin in the EngineSquared codebase is a static library (target "PluginObject") that provides components like Transform and Camera. It does not have an APlugin implementation or Object::Plugin class, so it should never be added to RequirePlugins(). Object components are made available through build-time dependencies via add_deps("PluginObject") in xmake.lua files.

Applied to files:

  • src/plugin/default-pipeline/src/plugin/PluginDefaultPipeline.hpp
📚 Learning: 2026-01-11T10:25:23.874Z
Learnt from: ripel2
Repo: EngineSquared/EngineSquared PR: 423
File: src/plugin/camera-movement/src/plugin/PluginCameraMovement.hpp:7-17
Timestamp: 2026-01-11T10:25:23.874Z
Learning: In EngineSquared, PluginObject is a static library exposing Object components (e.g., Transform, Camera). Do not add an APlugin or Object::Plugin to RequirePlugins(). Instead, make object components available via build-time dependencies by adding add_deps("PluginObject") in xmake.lua files that depend on those components. This rule applies across all xmake.lua configurations that reference PluginObject.

Applied to files:

  • examples/graphic_material_usage/xmake.lua
  • examples/graphic_light_usage/xmake.lua
  • xmake.lua
  • examples/graphic_usage/xmake.lua
  • src/plugin/graphic/xmake.lua
  • src/plugin/default-pipeline/xmake.lua
🧬 Code graph analysis (33)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialDestruction.cpp (1)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialDestruction.hpp (1)
  • OnMaterialDestruction (8-8)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshCreation.cpp (2)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshCreation.hpp (1)
  • OnMeshCreation (8-8)
src/engine/src/entity/Entity.hpp (1)
  • static_cast (65-65)
examples/graphic_usage/src/main.cpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/utils/AmbientLight.hpp (1)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (1)
  • AMBIENT_LIGHT_BUFFER_ID (14-14)
src/plugin/default-pipeline/src/system/preparation/UpdatePointLights.hpp (2)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/initialization/CreateAmbientLight.cpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUMaterials.hpp (2)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/preparation/UpdateAmbientLight.cpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/initialization/CreateAmbientLight.hpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUCameras.cpp (2)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUCameras.hpp (1)
  • UpdateGPUCameras (7-7)
src/plugin/default-pipeline/src/component/GPUCamera.hpp (2)
  • camera (23-30)
  • camera (23-23)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformDestruction.cpp (1)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformDestruction.hpp (1)
  • OnTransformDestruction (8-8)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUCameras.hpp (2)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/initialization/CreateDefaultMaterial.hpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp (1)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (14)
  • context (86-94)
  • context (86-86)
  • context (96-101)
  • context (96-97)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (3)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (6)
  • context (51-61)
  • context (51-51)
  • core (15-24)
  • core (15-15)
  • core (37-46)
  • core (37-37)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (2)
  • context (84-92)
  • context (84-84)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (2)
  • context (71-81)
  • context (71-71)
src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp (2)
src/plugin/graphic/src/resource/RenderGraph.hpp (4)
  • name (47-47)
  • name (49-49)
  • name (53-53)
  • name (53-53)
src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.hpp (1)
  • ExecuteRenderPass (7-7)
src/plugin/default-pipeline/src/resource/AmbientLight.cpp (2)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (3)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (5)
  • context (51-61)
  • context (51-51)
  • core (15-24)
  • _isCreated (26-33)
  • _isCreated (35-35)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (2)
  • context (71-81)
  • context (71-71)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (4)
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (2)
  • core (15-40)
  • _buffer (64-64)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (3)
  • context (71-81)
  • context (71-71)
  • _buffer (68-68)
src/plugin/default-pipeline/src/resource/buffer/PointGPUBuffer.hpp (1)
  • _buffer (78-78)
src/plugin/graphic/tests/BufferTest.cpp (1)
  • _buffer (43-43)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUTransforms.cpp (1)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUTransforms.hpp (1)
  • UpdateGPUTransforms (7-7)
src/plugin/graphic/src/plugin/PluginGraphic.cpp (6)
src/plugin/graphic/src/system/initialization/CreateDefaultSampler.cpp (2)
  • CreateDefaultSampler (8-16)
  • CreateDefaultSampler (8-8)
src/plugin/graphic/src/system/initialization/CreateDefaultSampler.hpp (1)
  • CreateDefaultSampler (6-6)
src/plugin/graphic/src/system/initialization/SetupResizableRenderTexture.cpp (2)
  • SetupResizableRenderTexture (11-17)
  • SetupResizableRenderTexture (11-11)
src/plugin/graphic/src/system/initialization/SetupResizableRenderTexture.hpp (1)
  • SetupResizableRenderTexture (7-7)
src/plugin/graphic/src/system/preparation/PrepareEndRenderTexture.cpp (2)
  • PrepareEndRenderTexture (114-130)
  • PrepareEndRenderTexture (114-114)
src/plugin/graphic/src/system/preparation/PrepareEndRenderTexture.hpp (1)
  • PrepareEndRenderTexture (11-11)
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (2)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (3)
  • _buffer (48-48)
  • core (15-24)
  • bufferDesc (53-53)
src/plugin/graphic/tests/BufferTest.cpp (2)
  • _buffer (43-43)
  • bufferDesc (16-16)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshDestruction.cpp (1)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshDestruction.hpp (1)
  • OnMeshDestruction (8-8)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraCreation.cpp (2)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraCreation.hpp (1)
  • OnCameraCreation (8-8)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUMaterials.cpp (1)
src/plugin/default-pipeline/src/system/preparation/UpdateGPUMaterials.hpp (1)
  • UpdateGPUMaterials (7-7)
src/plugin/default-pipeline/src/system/initialization/CreatePointLights.cpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (6)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
  • AMBIENT_LIGHT_BUFFER_ID (14-14)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/initialization/CreateDefaultRenderPipeline.cpp (4)
src/plugin/default-pipeline/src/system/initialization/CreateDefaultRenderPipeline.hpp (1)
  • CreateDefaultRenderPipeline (6-6)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp (2)
  • renderPass (156-204)
  • renderPass (156-156)
src/plugin/default-pipeline/src/system/initialization/CreateDefaultMaterial.cpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (3)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (17)
  • entity (67-67)
  • entity (67-67)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
  • context (86-94)
  • context (86-86)
  • context (96-101)
  • context (96-97)
  • _buffer (81-81)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (4)
  • core (15-24)
  • context (51-61)
  • context (51-51)
  • _buffer (48-48)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (3)
  • context (84-92)
  • context (84-84)
  • _buffer (79-79)
src/plugin/default-pipeline/src/system/preparation/UpdatePointLights.cpp (3)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (10)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraDestruction.cpp (2)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraDestruction.hpp (1)
  • OnCameraDestruction (8-8)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)
  • core (15-24)
src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp (3)
src/plugin/default-pipeline/src/component/GPUCamera.hpp (2)
  • camera (23-30)
  • camera (23-23)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (12)
  • core (40-46)
  • core (40-40)
  • core (47-54)
  • core (47-47)
  • core (56-56)
  • core (56-56)
  • core (57-65)
  • core (57-57)
  • core (69-79)
  • core (69-69)
  • entity (67-67)
  • entity (67-67)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (2)
  • materialComponent (94-98)
  • materialComponent (94-94)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialCreation.cpp (3)
src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialCreation.hpp (1)
  • OnMaterialCreation (8-8)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (3)
  • core (15-24)
  • context (51-61)
  • context (51-51)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (2)
  • context (84-92)
  • context (84-84)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Run tests (ubuntu-latest)
  • GitHub Check: Build and verify binaries (windows-latest)
  • GitHub Check: Build and verify binaries (ubuntu-latest)
  • GitHub Check: Build and verify binaries (macos-latest)
  • GitHub Check: Run tests (macos-latest)
  • GitHub Check: Run tests (windows-latest)

Comment thread src/plugin/default-pipeline/src/DefaultPipeline.hpp Outdated
Comment thread src/plugin/default-pipeline/src/system/preparation/UpdatePointLight.cpp Outdated
Comment thread src/plugin/default-pipeline/xmake.lua
Comment thread src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp Outdated
Comment thread src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp Outdated
@EngineSquared EngineSquared deleted a comment from coderabbitai Bot Jan 13, 2026
@Miou-zora
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 13, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @src/plugin/default-pipeline/src/DefaultPipeline.hpp:
- Around line 1-6: The header aggregator is missing the material component and
its GPU buffer: add #include "component/GPUMaterial.hpp" so
DefaultRenderPass.hpp can use Component::GPUMaterial without incomplete-type
errors, and add #include "resource/buffer/MaterialGPUBuffer.hpp" to match the
other *GPUBuffer includes so functions like CreateDefaultMaterial and
OnMaterialCreation that reference MaterialGPUBuffer compile correctly; update
the includes in DefaultPipeline.hpp accordingly.

In @src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp:
- Around line 158-164: In DefaultRenderPass::UniqueRenderCallback, avoid UB by
not calling .front() on an entt::view before verifying it contains elements:
first get the view from core.GetRegistry().view<Component::GPUCamera>(), check
view.empty() (or view.begin() == view.end()) and log/return if no camera exists,
then call view.front() to construct Engine::Entity camera and proceed; update
any uses of core.IsEntityValid(camera) accordingly so the emptiness check occurs
before .front() is invoked.
🧹 Nitpick comments (2)
src/plugin/object/src/resource/ResourceManager.hpp (1)

184-198: Add [[nodiscard]] attribute and documentation for consistency.

The new GetDefault() methods are missing:

  1. [[nodiscard]] attribute — all other getter methods (Get, GetOrDefault) use it.
  2. Doxygen documentation — all other public methods in this class are documented.
♻️ Suggested fix
+    /**
+     * @brief Get the default resource.
+     *
+     * @exception ResourceManagerError if no default resource is set.
+     *
+     * @return the default resource
+     */
+    [[nodiscard]] ResourceType &GetDefault()
-    ResourceType &GetDefault()
     {
         if (!defaultResource.has_value())
             throw ResourceManagerError("No default resource is set.");

         return *defaultResource;
     }

+    /**
+     * @brief Get the default resource.
+     *
+     * @exception ResourceManagerError if no default resource is set.
+     *
+     * @return the default resource
+     */
+    [[nodiscard]] const ResourceType &GetDefault() const
-    const ResourceType &GetDefault() const
     {
         if (!defaultResource.has_value())
             throw ResourceManagerError("No default resource is set.");

         return *defaultResource;
     }
src/plugin/default-pipeline/xmake.lua (1)

63-63: Use separate add_deps calls for consistency across the codebase.

This line mixes a string (plugin_name) with a table (target_dependencies), whereas line 31 in the same file and virtually all other test targets in the codebase call add_deps separately for each dependency. The overwhelming pattern in the codebase is individual string arguments or a single table, not mixed arguments.

♻️ Suggested refactor for consistency
-        add_deps(plugin_name, target_dependencies)
+        add_deps(plugin_name)
+        add_deps(target_dependencies)
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f37eaec and 079e29a.

📒 Files selected for processing (5)
  • src/plugin/default-pipeline/src/DefaultPipeline.hpp
  • src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp
  • src/plugin/default-pipeline/xmake.lua
  • src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp
  • src/plugin/object/src/resource/ResourceManager.hpp
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-11T10:25:23.874Z
Learnt from: ripel2
Repo: EngineSquared/EngineSquared PR: 423
File: src/plugin/camera-movement/src/plugin/PluginCameraMovement.hpp:7-17
Timestamp: 2026-01-11T10:25:23.874Z
Learning: In EngineSquared, PluginObject is a static library exposing Object components (e.g., Transform, Camera). Do not add an APlugin or Object::Plugin to RequirePlugins(). Instead, make object components available via build-time dependencies by adding add_deps("PluginObject") in xmake.lua files that depend on those components. This rule applies across all xmake.lua configurations that reference PluginObject.

Applied to files:

  • src/plugin/default-pipeline/xmake.lua
🧬 Code graph analysis (2)
src/plugin/object/src/resource/ResourceManager.hpp (1)
src/plugin/object/src/exception/ResourceManagerError.hpp (2)
  • ResourceManagerError (28-28)
  • ResourceManagerError (28-28)
src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp (6)
src/plugin/default-pipeline/src/component/GPUCamera.hpp (2)
  • camera (23-30)
  • camera (23-23)
src/plugin/default-pipeline/src/resource/AmbientLight.hpp (5)
  • core (16-16)
  • core (17-17)
  • core (18-18)
  • core (19-19)
  • core (22-22)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (4)
  • core (15-24)
  • core (15-15)
  • core (37-46)
  • core (37-37)
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (7)
  • core (15-40)
  • core (15-15)
  • core (41-48)
  • core (41-41)
  • core (50-50)
  • core (50-50)
  • core (51-62)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (2)
  • entity (67-67)
  • entity (67-67)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (2)
  • materialComponent (94-98)
  • materialComponent (94-94)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Run tests (ubuntu-latest)
  • GitHub Check: Run tests (windows-latest)
  • GitHub Check: Build and verify binaries (windows-latest)
🔇 Additional comments (10)
src/plugin/default-pipeline/xmake.lua (3)

1-22: LGTM on includes and dependency declarations.

The package list and target dependencies are appropriate for a graphics pipeline plugin. The inclusion of PluginGraphic as a dependency aligns with the PR's goal of separating the default pipeline from the core graphic plugin.


24-45: Main target configuration looks correct.

The static library setup with C++20, packages, dependencies, and header/source organization follows established patterns. Consider adding target_end() after line 45 before the test loop for explicit target closure, though xmake handles the implicit closure when the next target() is called.


47-73: Test generation loop structure is correct.

The goto continue / ::continue:: pattern is valid Lua for implementing continue behavior. Skipping main.cpp and adding it separately to each test target is the correct approach for gtest.

src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp (1)

8-9: LGTM - Simplified execution flow looks correct.

The delegation to the default render graph aligns with the refactoring objectives. Note that if no default render graph exists, the function silently returns. Verify this is the intended behavior when only custom pipelines are registered.

src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp (5)

16-22: LGTM - Namespace relocation is consistent.

The include path and namespace changes correctly reflect the migration to DefaultPipeline::Utils.


166-192: LGTM - Component qualifications are consistent.

The namespace-relative qualifications (Component::GPUCamera, Component::GPUMaterial, etc.) correctly reference the DefaultPipeline::Component types within the DefaultPipeline::Utils namespace scope.


251-255: LGTM - Buffer size reference updated correctly.

The Resource::PointLightsBuffer::GPUSize() reference correctly uses the relative namespace path within DefaultPipeline::Utils.


286-298: LGTM - Validation error severity references are correct.

The fully qualified Graphic::Utils::ValidationError::Severity is appropriate since ValidationError remains in the Graphic plugin while this code is now in DefaultPipeline::Utils.


303-303: LGTM - Namespace closing is correct.

src/plugin/default-pipeline/src/DefaultPipeline.hpp (1)

7-40: LGTM - Well-organized aggregator header.

The includes are logically grouped by category (plugin, resources, systems, utils) with clear visual separation. This structure will aid maintainability as the DefaultPipeline grows.

Comment thread src/plugin/default-pipeline/src/DefaultPipeline.hpp
Comment thread src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp Outdated
@Miou-zora
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 13, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/plugin/graphic/tests/BufferTest.cpp (1)

50-66: LGTM!

The test covers the complete GPU buffer lifecycle effectively.

Consider also testing that Update throws after Destroy to verify the guard in Update works correctly in the post-destruction state.

🧪 Optional: Add post-destroy Update test
     buffer.Destroy(core);
     EXPECT_FALSE(buffer.IsCreated(core));
+
+    EXPECT_THROW(buffer.Update(core), Graphic::Exception::UpdateBufferError);
 }
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (1)

52-64: Unused variable in Update() method.

The meshComponent variable fetched on line 60 is never used. While the comment explains dynamic resizing isn't implemented, the unused variable should be removed or commented out to avoid compiler warnings and clarify intent.

Proposed fix
     void Update(Engine::Core &core) override
     {
         if (!_isCreated)
         {
             throw Graphic::Exception::UpdateBufferError("Cannot update a GPU buffer that is not created.");
         }

-        auto &meshComponent = core.GetRegistry().get<Object::Component::Mesh>(_entity);
-
         // For now, we will not implement dynamic resizing of the buffer. As we should have a way to know if the size
         // changed. And it would be so heavy to check every frame every index.
+        // TODO: Implement dynamic resizing when mesh indices change.
     };
src/plugin/default-pipeline/tests/PluginDefaultPipelineTest.cpp (1)

8-20: Consider adding assertions to verify plugin initialization state.

This smoke test only verifies that the plugin doesn't crash during initialization. Consider adding assertions to confirm expected resources or components are registered, which would catch initialization regressions more effectively.

Example additions:

// After RunSystems(), verify expected resources exist
EXPECT_NO_THROW(core.GetResource<Graphic::Resource::Context>());
// Or verify specific systems were registered
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 079e29a and 0ea501b.

📒 Files selected for processing (21)
  • src/plugin/default-pipeline/src/DefaultPipeline.hpp
  • src/plugin/default-pipeline/src/component/GPUMaterial.hpp
  • src/plugin/default-pipeline/src/component/GPUTransform.hpp
  • src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp
  • src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraDestruction.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialDestruction.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshDestruction.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformDestruction.hpp
  • src/plugin/default-pipeline/src/system/initialization/CreateDefaultRenderPipeline.hpp
  • src/plugin/default-pipeline/src/system/initialization/CreatePointLights.hpp
  • src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp
  • src/plugin/default-pipeline/tests/PluginDefaultPipelineTest.cpp
  • src/plugin/default-pipeline/xmake.lua
  • src/plugin/graphic/tests/BufferTest.cpp
  • src/plugin/object/src/resource/ResourceManager.hpp
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshCreation.hpp
  • src/plugin/default-pipeline/src/DefaultPipeline.hpp
  • src/plugin/default-pipeline/src/utils/DefaultRenderPass.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialCreation.hpp
  • src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformDestruction.hpp
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-11T10:25:23.874Z
Learnt from: ripel2
Repo: EngineSquared/EngineSquared PR: 423
File: src/plugin/camera-movement/src/plugin/PluginCameraMovement.hpp:7-17
Timestamp: 2026-01-11T10:25:23.874Z
Learning: In EngineSquared, PluginObject is a static library exposing Object components (e.g., Transform, Camera). Do not add an APlugin or Object::Plugin to RequirePlugins(). Instead, make object components available via build-time dependencies by adding add_deps("PluginObject") in xmake.lua files that depend on those components. This rule applies across all xmake.lua configurations that reference PluginObject.

Applied to files:

  • src/plugin/default-pipeline/xmake.lua
🧬 Code graph analysis (5)
src/plugin/graphic/tests/BufferTest.cpp (7)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (10)
  • core (15-24)
  • core (15-15)
  • core (37-46)
  • core (37-37)
  • context (51-61)
  • context (51-51)
  • bufferDesc (53-53)
  • _buffer (48-48)
  • _isCreated (26-33)
  • _isCreated (35-35)
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (10)
  • core (15-42)
  • core (15-15)
  • core (43-50)
  • core (43-43)
  • core (52-52)
  • core (52-52)
  • core (53-64)
  • core (53-53)
  • bufferDesc (28-28)
  • _buffer (66-66)
src/plugin/graphic/src/resource/AGPUBuffer.hpp (4)
  • core (10-10)
  • core (11-11)
  • core (13-13)
  • core (14-14)
src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp (4)
  • context (114-122)
  • context (114-114)
  • bufferDesc (116-116)
  • _buffer (107-107)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (4)
  • context (84-92)
  • context (84-84)
  • bufferDesc (86-86)
  • _buffer (79-79)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (4)
  • context (71-81)
  • context (71-71)
  • bufferDesc (73-73)
  • _buffer (68-68)
src/plugin/graphic/src/utils/webgpu.hpp (1)
  • StringView (619-619)
src/plugin/object/src/resource/ResourceManager.hpp (1)
src/plugin/object/src/exception/ResourceManagerError.hpp (2)
  • ResourceManagerError (28-28)
  • ResourceManagerError (28-28)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (5)
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (9)
  • core (15-42)
  • core (15-15)
  • core (43-50)
  • core (43-43)
  • core (52-52)
  • core (52-52)
  • core (53-64)
  • core (53-53)
  • _buffer (66-66)
src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp (11)
  • core (42-52)
  • core (42-42)
  • core (54-61)
  • core (54-54)
  • core (63-63)
  • core (63-63)
  • core (65-105)
  • core (65-65)
  • context (114-122)
  • context (114-114)
  • _buffer (107-107)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (3)
  • context (84-92)
  • context (84-84)
  • _buffer (79-79)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (3)
  • context (71-81)
  • context (71-71)
  • _buffer (68-68)
src/plugin/default-pipeline/src/resource/buffer/PointGPUBuffer.hpp (1)
  • _buffer (78-78)
src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp (7)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (8)
  • context (51-61)
  • context (51-51)
  • core (15-24)
  • core (15-15)
  • core (37-46)
  • core (37-37)
  • _buffer (48-48)
  • bufferDesc (53-53)
src/plugin/default-pipeline/src/resource/buffer/MaterialGPUBuffer.hpp (5)
  • context (84-92)
  • context (84-84)
  • _buffer (79-79)
  • bufferDesc (86-86)
  • _debugName (81-81)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (7)
  • context (86-94)
  • context (86-86)
  • context (96-101)
  • context (96-97)
  • _buffer (81-81)
  • bufferDesc (88-88)
  • _debugName (83-83)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (4)
  • context (71-81)
  • context (71-71)
  • _buffer (68-68)
  • bufferDesc (73-73)
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (10)
  • core (15-42)
  • core (15-15)
  • core (43-50)
  • core (43-43)
  • core (52-52)
  • core (52-52)
  • core (53-64)
  • core (53-53)
  • _buffer (66-66)
  • bufferDesc (28-28)
src/plugin/graphic/tests/BufferTest.cpp (6)
  • core (11-23)
  • core (11-11)
  • core (33-41)
  • core (33-33)
  • _buffer (42-42)
  • bufferDesc (15-15)
src/plugin/graphic/src/utils/webgpu.hpp (1)
  • StringView (619-619)
src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (5)
src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (8)
  • context (51-61)
  • context (51-51)
  • core (15-24)
  • core (15-15)
  • core (37-46)
  • core (37-37)
  • _buffer (48-48)
  • bufferDesc (53-53)
src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp (12)
  • context (114-122)
  • context (114-114)
  • core (42-52)
  • core (42-42)
  • core (54-61)
  • core (54-54)
  • core (63-63)
  • core (63-63)
  • core (65-105)
  • core (65-65)
  • _buffer (107-107)
  • bufferDesc (116-116)
src/plugin/default-pipeline/src/resource/buffer/AmbientLightBuffer.hpp (6)
  • context (86-94)
  • context (86-86)
  • context (96-101)
  • context (96-97)
  • _buffer (81-81)
  • bufferDesc (88-88)
src/plugin/default-pipeline/src/resource/buffer/TransformGPUBuffer.hpp (4)
  • context (71-81)
  • context (71-71)
  • _buffer (68-68)
  • bufferDesc (73-73)
src/plugin/default-pipeline/src/resource/buffer/PointGPUBuffer.hpp (2)
  • _buffer (78-78)
  • bufferDesc (41-41)
🔇 Additional comments (22)
src/plugin/object/src/resource/ResourceManager.hpp (1)

184-212: LGTM!

The new GetDefault() accessors are well-implemented and consistent with the existing class patterns:

  • Follows the same error-handling approach as GetOrDefault().
  • Proper use of [[nodiscard]] attribute matching other getters.
  • Documentation is complete and accurate.
  • Both const and non-const overloads are provided appropriately.
src/plugin/default-pipeline/src/component/GPUMaterial.hpp (1)

5-14: LGTM!

Clean namespace migration from Graphic::Component to DefaultPipeline::Component. The struct definition remains unchanged, and the closing comment correctly reflects the new namespace. The removal of unused includes (Camera.hpp, Transform.hpp, glm/glm.hpp as noted in the summary) is appropriate.

src/plugin/default-pipeline/src/component/GPUTransform.hpp (1)

5-11: LGTM!

Consistent namespace migration from Graphic::Component to DefaultPipeline::Component, matching the pattern established in other GPU component headers. The struct definition and its members remain unchanged.

src/plugin/default-pipeline/src/system/GPUComponentManagement/OnTransformCreation.hpp (1)

6-10: LGTM!

Clean namespace migration from Graphic::System to DefaultPipeline::System. The function signature remains unchanged, and the closing comment correctly reflects the new namespace. This aligns with the broader refactoring to separate the default render pipeline into its own plugin.

src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMeshDestruction.hpp (1)

6-10: Namespace migration is complete and consistent.

The namespace change from Graphic::System to DefaultPipeline::System has been properly applied across both the header declaration and the implementation file. No remaining references to the old namespace exist.

src/plugin/graphic/tests/BufferTest.cpp (3)

1-5: LGTM!

The includes are appropriate for the test requirements.


7-48: LGTM!

The GPUBufferTest class correctly implements the AGPUBuffer interface, following the same patterns used in other buffer implementations (e.g., CameraGPUBuffer, MaterialGPUBuffer). The lifecycle management with _isCreated flag, proper guard in Update, and release() in Destroy are all correctly implemented.


68-81: LGTM!

The test setup correctly configures the graphic plugin for headless testing by setting WindowSystem::None.

src/plugin/default-pipeline/src/system/GPUComponentManagement/OnMaterialDestruction.hpp (1)

6-10: Namespace change aligns with the plugin restructuring and migration is complete.

The namespace migration from Graphic::System to DefaultPipeline::System is consistent with the file's location within the default-pipeline plugin and the PR's objective to separate the default render pipeline from the core graphic plugin. No lingering references to the old namespace remain, and all call sites have been properly updated to use the new namespace via the plugin's function pointer registration.

src/plugin/default-pipeline/src/resource/buffer/PointLightsBuffer.hpp (4)

13-14: LGTM!

The namespace move to DefaultPipeline::Resource and explicit qualification of the base class Graphic::Resource::AGPUBuffer align well with the PR objective of separating the default pipeline implementation from the core graphic plugin skeleton.


42-52: LGTM!

The Create method correctly delegates buffer creation to the new _CreateBuffer helper and follows the established pattern seen in other buffer implementations (e.g., IndexGPUBuffer). The fully qualified Graphic::Resource::Context is appropriate given the namespace move.


65-72: LGTM!

The Update method correctly uses fully qualified types (Graphic::Exception::UpdateBufferError, Graphic::Resource::Context) after the namespace move. The existing logic for iterating point lights and updating the GPU buffer remains intact and correct.


114-122: LGTM!

The _CreateBuffer helper follows the established pattern used by other buffer implementations in the codebase (MaterialGPUBuffer, TransformGPUBuffer, CameraGPUBuffer, AmbientLightBuffer). This extraction improves code organization and maintainability.

src/plugin/default-pipeline/xmake.lua (2)

24-45: LGTM!

The target configuration correctly sets up a C++20 static library with appropriate dependencies, packages, and include paths. The header file patterns comprehensively cover the module structure.


47-74: The code is correct as-is; explicit target_end() is not required.

In xmake, target_end() is optional. According to xmake documentation, opening a new target domain (such as calling target(name) with a different name) implicitly closes the previous target scope. Since each loop iteration calls target(name) with a different test file name, the previous iteration's target is automatically closed when the next iteration begins.

However, for improved code clarity and to follow modern xmake best practices, consider using the function form instead:

for _, file in ipairs(os.files("tests/**.cpp")) do
    local name = path.basename(file)
    if name == "main" then
        goto continue
    end
    target(name, function()
        set_group(TEST_GROUP_NAME)
        set_kind("binary")
        if is_plat("linux") then
            add_cxxflags("--coverage", "-fprofile-arcs", "-ftest-coverage", {force = true})
            add_ldflags("--coverage")
        end
        set_languages("cxx20")
        add_packages("gtest", required_packages)
        add_links("gtest")
        add_deps(plugin_name)
        add_deps(target_dependencies)
        add_files(file)
        add_files("tests/main.cpp")
        add_tests("default")
        if is_mode("debug") then
            add_defines("DEBUG")
        end
    end)
    ::continue::
end

This function form automatically confines configuration to the target scope without requiring explicit target_end() calls.

Likely an incorrect or invalid review comment.

src/plugin/default-pipeline/src/resource/buffer/CameraGPUBuffer.hpp (1)

9-73: LGTM!

The namespace migration to DefaultPipeline::Resource is consistent with the PR's refactoring goals. The fully-qualified references to Graphic::Resource::Context, Graphic::Resource::DeviceContext, and Graphic::Exception::UpdateBufferError correctly maintain the dependency on the graphic plugin's core types while relocating the buffer implementation.

src/plugin/default-pipeline/src/resource/buffer/IndexGPUBuffer.hpp (1)

10-11: LGTM!

The namespace relocation and inheritance from Graphic::Resource::AGPUBuffer are consistent with the other buffer implementations in the DefaultPipeline module.

src/plugin/default-pipeline/tests/PluginDefaultPipelineTest.cpp (1)

1-6: LGTM!

The includes and test setup are appropriate for a plugin integration test. Disabling the window system via SetWindowSystem(Graphic::Resource::WindowSystem::None) is a good practice for headless CI environments.

src/plugin/default-pipeline/src/system/initialization/CreatePointLights.hpp (1)

5-9: LGTM!

The namespace relocation from Graphic::System to DefaultPipeline::System is clean and consistent with the broader refactoring effort.

src/plugin/default-pipeline/src/system/initialization/CreateDefaultRenderPipeline.hpp (1)

5-7: LGTM!

Namespace relocation is consistent with the default pipeline extraction pattern.

src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraCreation.hpp (1)

6-10: LGTM!

Namespace relocation is consistent. The includes properly cover both parameter types.

src/plugin/default-pipeline/src/system/GPUComponentManagement/OnCameraDestruction.hpp (1)

6-10: LGTM!

Namespace relocation is consistent with the rest of the refactoring. All references to OnCameraDestruction have been properly updated—the function is declared and implemented in DefaultPipeline::System, and all call sites in PluginDefaultPipeline.cpp correctly resolve to the new namespace.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the graphic plugin by splitting it into two parts: a core graphics plugin (skeleton) that provides the base infrastructure for graphics pipelines, and a new DefaultPipeline plugin that implements the actual 3D rendering functionality. This separation enables better modularity and allows alternative rendering pipeline implementations to be created more easily.

Changes:

  • Created a new DefaultPipeline plugin containing rendering components, systems, and resources previously in the Graphic plugin
  • Added safe GetDefault() accessors to ResourceManager for accessing default resources
  • Simplified example build configurations to use the unified EngineSquared dependency

Reviewed changes

Copilot reviewed 77 out of 77 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
xmake.lua Added DefaultPipeline plugin dependency to main build
src/plugin/object/src/resource/ResourceManager.hpp Added GetDefault() methods with exception handling
src/plugin/graphic/xmake.lua Added tinyobjloader package dependency
src/plugin/graphic/tests/*.cpp Updated tests to use new namespaces and simplified buffer testing
src/plugin/graphic/src/utils/EndRenderTexture.hpp New file defining END_RENDER_TEXTURE_ID constant
src/plugin/graphic/src/system/preparation/PrepareEndRenderTexture.cpp Updated to use Graphic::Utils::END_RENDER_TEXTURE_ID
src/plugin/graphic/src/system/commandCreation/ExecuteRenderPass.cpp Refactored to use default render pass from container
src/plugin/graphic/src/plugin/PluginGraphic.cpp Removed GPU component setup and rendering systems (moved to DefaultPipeline)
src/plugin/graphic/src/Graphic.hpp Removed includes for moved components and systems
src/plugin/default-pipeline/** New plugin with all components, resources, systems, and utilities for 3D rendering
examples/** Updated to use DefaultPipeline::Plugin and simplified build dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/plugin/default-pipeline/src/plugin/PluginDefaultPipeline.hpp
Comment thread examples/graphic_material_usage/src/main.cpp Outdated
@Miou-zora Miou-zora marked this pull request as ready for review January 13, 2026 15:09
@Miou-zora Miou-zora enabled auto-merge (squash) January 14, 2026 10:37
Comment thread examples/graphic_light_usage/src/main.cpp Outdated
@sonarqubecloud
Copy link
Copy Markdown

@Miou-zora Miou-zora merged commit a2bae5e into main Jan 15, 2026
14 checks passed
@Miou-zora Miou-zora deleted the remove-default-render-pipeline-from-graphic-plugin branch January 15, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants