Repository navigation
Conversation
This branch has not been deployed
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 #722.
Keep eligible shapes on the vertex-array/VBO path when a single 2D texture on unit 0 uses default texture coordinates. Evaluate the existing default mapping into a temporary coordinate array, so both shaders using their own UVs and shaders reading the supplied texture coordinates retain the expected behavior.
Implementation
SoVertexArrayTexCoordGuard. Restore the coordinate state afterfinishVertexArray()and before destroying the texture-coordinate bundle.SoIndexedFaceSet,SoFaceSet,SoPointSet,SoIndexedPointSet,SoIndexedLineSet, andSoVRMLIndexedFaceSet.SoShape::startVertexArray(), once per node type and texture unit. The return value continues to distinguish VBOs from CPU arrays.SoIndexedPointSetpath, and avoid arrays forSoFaceSetwhen generated normals do not cover a nonzerostartIndex.Validation
Based on master
ca247c1321bce07199ec0f034493977761b3218e.CoinTextureArrayTest, andCoinTestsbuild successfully.TextureCoordinateArrayRenderingandCoinTestspass (2/2).SoFaceSet::startIndex. No missing-array diagnostics.git diff --checkpasses; all five commits are SSH-signed.Local validation used Linux, Xvfb, and Mesa/llvmpipe. Other platforms and hardware drivers have not been validated locally.
Local performance measurement
For a textured
SoIndexedFaceSetwith explicit indexed normals and a shader using its own constant UVs:These compare rendering paths in the same corrected Debug library, rather than two separately built revisions. Each entry is the median of three 30-frame runs after five warmup frames. Rendering caches are disabled, and timings include
glFinish(). The viewport is 128×128 and the renderer is llvmpipe (LLVM 20.1.2 / Mesa 25.2.8). Scene construction and final image readback are excluded. CPU arrays perform similarly to VBOs in this software renderer. The measured 36–45% reduction does not predict Release or physical-GPU performance.