Support UINT8 indices in TriMesh and WireMesh#617
Open
AnouarMohamed wants to merge 1 commit intogoogle:mainfrom
Open
Support UINT8 indices in TriMesh and WireMesh#617AnouarMohamed wants to merge 1 commit intogoogle:mainfrom
AnouarMohamed wants to merge 1 commit intogoogle:mainfrom
Conversation
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.
Summary
Fixes #514.
This adds first-class
grfx::INDEX_TYPE_UINT8support to the CPU-side mesh containers that were left out when UINT8 index buffers were introduced forGeometry.The change updates
TriMeshandWireMeshso they can construct, pack, read back, and count UINT8 index data directly. It also adds anIndexType(...)option to the mesh option builders, so primitive factories and OBJ loading can emit a requested index width while preserving the existing default of UINT32 for.Indices().Details
GetDataIndicesU8()and internal UINT8 append paths forTriMeshandWireMesh.Geometry::Create(...)conversion, and debug overflow assertions.Testing
On Fedora 43 with GCC 15:
ctestresult: 230/230 tests passed.The extra
-Wno-error=stringop-overflowflag works around an unrelated GCC 15 warning inthird_party/stb/stb_image.hthat is promoted to an error by the repo-wide-Werrorsetting.