Added mirroring support for child meshes#25
Merged
Conversation
JohnGreenFC
commented
Jul 13, 2026
- Removed old system for requesting reversed index buffers
- Added support to read the transform of a mesh and reverse its index winding based on that
- Removed old system for requesting reversed index buffers - Added support to read the transform of a mesh and reverse its index winding based on that
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v20.1.2
Click here for the full clang-format patch
diff --git a/trinity/Eve/SpaceObject/Children/EveChildParticleSystem.cpp b/trinity/Eve/SpaceObject/Children/EveChildParticleSystem.cpp
index 81ffe20..8134510 100644
--- a/trinity/Eve/SpaceObject/Children/EveChildParticleSystem.cpp
+++ b/trinity/Eve/SpaceObject/Children/EveChildParticleSystem.cpp
@@ -199 +198,0 @@ void EveChildParticleSystem::UpdateSyncronous( const EveUpdateContext& updateCon
-
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Pull request overview
This PR updates Trinity’s mesh rendering path to support mirrored (reflected) child meshes by selecting reversed index winding at batch-build time based on the mesh transform, removing the prior “request reversed index buffers” mechanism.
Changes:
- Added a
reverseWinding/reverseAreasparameter to mesh batch generation so callers can flip winding per draw based on transform determinant. - Removed the legacy reversed-index-buffer request flow (
ReverseIndexBuffers()/RequestReversedIndexBuffers()). - Updated geometry resource preparation to always generate reversed index buffers and account for their memory cost.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| trinity/Tr2MeshBase.h | Extends GetBatches signature with reverseWinding; updates CreateGeometryBatch declaration. |
| trinity/Tr2MeshBase.cpp | Propagates reverseWinding into batch creation; removes legacy reversed-index request logic. |
| trinity/Tr2MeshArea.cpp | Removes automatic reversed-index-buffer requesting when an area becomes reversed. |
| trinity/Tr2Mesh.h | Removes ReverseIndexBuffers() override from Tr2Mesh. |
| trinity/Tr2Mesh.cpp | Removes reversed-index-buffer requesting in geometry resource setters and the ReverseIndexBuffers() implementation. |
| trinity/Tr2InstancedMesh.h | Consolidates GetBatches overloads and adds reverseAreas default parameter. |
| trinity/Tr2InstancedMesh.cpp | Removes legacy wrapper overload; keeps a single GetBatches with reverseAreas. |
| trinity/Resources/TriGeometryRes.h | Removes RequestReversedIndexBuffers() API and the request-tracking flag. |
| trinity/Resources/TriGeometryRes.cpp | Removes old request-time reversal; always builds reversed index buffers and updates memory accounting. |
| trinity/Eve/SpaceObject/Children/EveChildParticleSystem.cpp | Removes per-update reversal request (render-time reversal already used). |
| trinity/Eve/SpaceObject/Children/EveChildMesh.cpp | Computes transform determinant and passes reverseWinding into mesh batch generation for mirrored children and shadows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ikreb1
approved these changes
Jul 13, 2026
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.