Phase 2 validation#4
Merged
Merged
Conversation
…r design B.1 Light-system memory leak fix: - Scene.update() now calls removeLights(scene) on each instance pruned from the active list before discarding it, so LightInstance objects are properly unregistered from W3xSceneWorldLightManager. Previously orphaned lights accumulated indefinitely, causing memory growth and frame-time drift. - W3xSceneWorldLightManager.remove() documented as idempotent (ArrayList.remove is a no-op for absent elements, preventing state corruption on double-calls). - W3xSceneWorldLightManager logs active dynamic light count to stdout every ~60 s ([LightManager] active dynamic lights=N) for leak verification. B.2 Shader target normalization: - vsHd / fsHd upgraded from #version 120 to #version 330 core: attribute → in, varying → out/in, texture2D() → texture(), gl_FragColor → explicit out vec4 fragColor. - BONE_TEXTURE_330 helper in MdxShaders provides a #version 330 core-safe copy of Shaders.boneTexture (texture2D → texture) used exclusively by vsHd. - Shaders.transforms updated: attribute → in (used only by vsHd, safe). - WarsmashTestGame2 and WarsmashTestGame3 test shaders lowered from #version 450 core to #version 330 core (no 450-specific features used). B.3 Parser consolidation design: - docs/PARSER_CONSOLIDATION_DESIGN.md: unified TableDataSource interface, DataTable as canonical backend, adapter layer, migration order, test strategy, and open questions. Implementation deferred to Phase C. Docs: CHANGELOG.md and ENGINE_MODERNIZATION_ANALYSIS.md updated; Phase B marked complete, Phase C promoted to Next. https://claude.ai/code/session_015jYzYrpFJctvaAqjpvw6m7
Previously removeLights() ignored the scene parameter and used this.scene instead. While the values are typically identical, using the parameter is semantically correct and prevents stale-reference issues when the instance's scene field is out of sync with the caller's scene (e.g. during Scene.update() pruning). Co-authored-by: awest813 <awest813@users.noreply.github.com>
- Configure JUnit 5 dependency and test source set for core module. - Add MdxShadersTest with 21 assertions validating the GLSL 120->330 core migration: version directives, keyword replacements (attribute -> in, varying -> out, texture2D -> texture, gl_FragColor -> fragColor), bone-texture 330 helper, and transforms shared string. - Update CI workflow to run :core:test after assemble. Co-authored-by: awest813 <awest813@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
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.
Integrate Phase B changes, including GLSL shader normalization and light system improvements, and add comprehensive validation tests.
The
MdxComplexInstance.removeLights()method was incorrectly usingthis.sceneinstead of the passedsceneparameter, which could lead to subtle issues during scene updates. This PR corrects that semantic error.