You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(ww3d2): Route texture stage transforms via Renderer - #3700
Now texture stage transforms are on Renderer as Set_Texture_Transform. It forwards to DX8Wrapper::Set_Transform with D3DTS_TEXTURE0 + stage, as the mappers did before. The raw _Get_DX8_Transform and _Set_DX8_Transform calls in the terrain, water and shader manager code read the device matrix and stay as they are.
Todo:
Build win32, including W3DView and WorldBuilder
Load a skirmish save and the shell map. Same result as main
No actionable comments were generated in the recent review.
Walkthrough
The change adds rendering and capability methods to Renderer, with forwarding implementations in DX8Backend. It updates WW3D, game-device, Generals, GeneralsMD, and tool rendering paths to call Renderer for the affected operations. Most existing rendering conditions and arguments remain unchanged.
Changes
Renderer API routing
Layer / File(s)
Summary
Renderer interface and DX8 forwarding Core/Libraries/Source/WWVegas/WW3D2/Renderer.h, Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.cpp
Renderer adds capability and rendering methods. DX8Backend forwards them to DX8Wrapper; narrowing for 16-bit APIs is checked.
WW3D capability and state routing Core/Libraries/Source/WWVegas/WW3D2/{dx8renderer.cpp,mapper.cpp,matrixmapper.cpp,matpass.cpp,meshmdl.cpp,meshmatdesc.cpp,statistics.cpp,texture.cpp,textureloader.cpp,ww3dformat.cpp}, Core/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp
Capability queries, texture transforms, texture format selection, and material-pass setup use Renderer. The GeneralsMD mesh material descriptor also comments out two bump-environment capability checks.
Geometry renderers, sorting, decals, 2D rendering, and scene lighting route affected state, buffer, and draw operations through Renderer.
Game-device terrain, water, and effects Core/GameEngineDevice/Source/W3DDevice/GameClient/*
Terrain, water, shader, particle, track, and effect paths use Renderer for the affected capability, render-state, buffer, texture, target, and draw operations.
TheSuperHackers/GeneralsGameCode#3419: Adds Renderer::Set_Transform and Get_Transform; this change adds texture-transform routing through Renderer::Set_Texture_Transform.
This refactor routes rendering and capability calls through a common Renderer interface without intended behavior changes. No specific defect was found. Before merging, confirm that the build succeeds and run the skirmish-save and shell-map checks the author left unchecked.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: texture stage transforms are now routed through Renderer. The changeset adds Renderer::Set_Texture_Transform and updates the mapper Apply methods (mapper.cpp, matrixma…
Description check
The description is related to the changeset. It states that texture stage transforms moved to Renderer::Set_Texture_Transform, that this forwards to DX8Wrapper::Set_Transform with D3DTS_TEXTURE0 + sta…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: texture stage transforms are now routed through Renderer. The changeset adds Renderer::Set_Texture_Transform and updates the mapper Apply methods (mapper.cpp, matrixmapper.cpp) to use it. The title does not mention the wider Renderer routing in the summary, but it refers to a real and central part of the change.
Full details: Description check
Explanation
The description is related to the changeset. It states that texture stage transforms moved to Renderer::Set_Texture_Transform, that this forwards to DX8Wrapper::Set_Transform with D3DTS_TEXTURE0 + stage, and it lists build and runtime verification steps. It describes the mapper and transform work that the summary shows.
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.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
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
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.
Now texture stage transforms are on
RendererasSet_Texture_Transform. It forwards toDX8Wrapper::Set_TransformwithD3DTS_TEXTURE0 + stage, as the mappers did before. The raw_Get_DX8_Transformand_Set_DX8_Transformcalls in the terrain, water and shader manager code read the device matrix and stay as they are.Todo: