Skip to content

refactor(ww3d2): Route shader and material state via IRenderBackend - #3421

Draft
bobtista wants to merge 5 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/route-shader-material
Draft

bobtista wants to merge 5 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/route-shader-material

Conversation

@bobtista

@bobtista bobtista commented Oct 4, 2026 •

Copy link
Copy Markdown

Now Set_Shader, Set_Material and Apply_Render_State_Changes are on IRenderBackend, and the remaining Invalidate_Cached_Render_States callers use the existing method. DX8Backend forwards each one to DX8Wrapper. This includes callers in the DX8 renderer classes, which are shared code and need the backend for anything other than DX8.

Many of these functions still set texture stage and render state through DX8Wrapper right after the routed calls. Those calls stay as they are.

Todo:

  • Build win32, including W3DView and WorldBuilder
  • Load two skirmish saves and the shell map, open W3DView through its device dialog, and open WorldBuilder. Same result as main
  • Replicate to Generals

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c033e4a-7036-4920-8bb2-3b2890ed4c02
📥 Commits

Reviewing files that changed from the base of the PR and between f8ba7eb and 49697d3.

📒 Files selected for processing (50)
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/BaseHeightMap.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/FlatHeightMap.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/HeightMap.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DDebugIcons.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DScorch.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainTracks.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWater.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.h
  • Core/Libraries/Source/WWVegas/WW3D2/IRenderBackend.h
  • Core/Libraries/Source/WWVegas/WW3D2/dx8renderer.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/dx8wrapper.h
  • Core/Libraries/Source/WWVegas/WW3D2/dynamesh.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/line3d.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/matpass.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/streakRender.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/ww3d.cpp
  • Core/Tools/W3DView/GammaDialog.cpp
  • Core/Tools/W3DView/MainFrm.cpp
  • Core/Tools/W3DView/ScreenCursor.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DBibBuffer.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DBridgeBuffer.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DRoadBuffer.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DStatusCircle.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/boxrobj.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/camera.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/decalmsh.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/linegrp.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/mapper.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/mesh.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/render2d.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/scene.cpp
  • GeneralsMD/Code/Tools/WorldBuilder/src/DrawObject.cpp
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant