FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(graphic): add custom mesh creation and integration in setup by Miou-zora · Pull Request #463 · EngineSquared/EngineSquared · GitHub

feat(graphic): add custom mesh creation and integration in setup - #463

Merged
Miou-zora merged 6 commits into
mainfrom
enhance-graphic-usage
Feb 10, 2026
Merged

feat(graphic): add custom mesh creation and integration in setup#463
Miou-zora merged 6 commits into
mainfrom
enhance-graphic-usage

Conversation

Miou-zora commented Jan 31, 2026
edited by coderabbitai Bot
Loading

Copy link
Copy Markdown
Contributor

This pull request introduces a new custom mesh to the graphics example, demonstrating how to define and add a user-defined mesh alongside the existing cube. The main change is the addition of the CreateCustomMesh function, which constructs a simple quad mesh, and its integration into the scene setup.

Mesh creation and scene setup:

  • Added a CreateCustomMesh function that defines a quad mesh with custom vertices, normals, texture coordinates, and indices.
  • Updated the Setup function to create a new entity with a transform and the custom mesh, positioning it next to the existing cube.

Summary by CodeRabbit

  • New Features
    • The graphics example demonstrates custom mesh creation and usage: a new entity with a custom mesh has been added to the scene, showcasing defined vertices, normals, texture coordinates (UVs), and indices, and positioned alongside existing scene objects.

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

Miou-zora requested a review from a team January 31, 2026 20:43
Miou-zora self-assigned this Jan 31, 2026
Miou-zora added the documentation Improvements or additions to documentation label Jan 31, 2026

coderabbitai Bot commented Jan 31, 2026
edited
Loading

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A new CreateCustomMesh() function is added that constructs and returns a custom Mesh with vertices, normals, texture coordinates, and indices. The function is used in Setup() to create a customMesh entity positioned at (1.5, 0, 0) alongside existing scene objects.

Changes

Cohort / File(s) Summary
Custom Mesh Creation
examples/graphic_usage/src/main.cpp
Adds CreateCustomMesh() that constructs a mesh (vertices, normals, UVs, indices). Setup() now instantiates a customMesh entity at (1.5, 0, 0) using Object::Component::Mesh(CreateCustomMesh()).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰✨ I stitched new vertices, neat and bright,
Normals and UVs curled just right,
At (1.5, 0, 0) I hop and pose,
A custom mesh in gentle rows,
Hooray — new geometry, soft as snows!

🚥 Pre-merge checks | ✅ 2 | ❌ 1 ❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 accurately describes the main change: adding a custom mesh creation function and integrating it into the setup process, which aligns with the changeset that adds CreateCustomMesh() function and updates Setup() to use it.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enhance-graphic-usage

No actionable comments were generated in the recent review. 🎉


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.

coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@examples/graphic_usage/src/main.cpp`:
- Around line 53-56: The triangle winding in mesh.SetIndices currently produces
a -Y face normal; to match the +Y vertex normals and avoid backface
culling/light issues, invert the winding for both triangles by swapping two
indices per triangle (e.g., use 0,2,1 and 2,0,3 instead of 0,1,2 and 2,3,0) so
the triangles' vertex order is consistent with +Y normals.

Comment thread examples/graphic_usage/src/main.cpp Outdated

Copy link
Copy Markdown

Miou-zora merged commit 0a7a1d2 into main Feb 10, 2026
16 checks passed
Miou-zora deleted the enhance-graphic-usage branch February 10, 2026 17:14
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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL