Skip to content

refactor(ww3d2): Route texture binding via Renderer - #3422

Draft
bobtista wants to merge 4 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/route-texture-binding
Draft

bobtista wants to merge 4 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/route-texture-binding

Conversation

@bobtista

@bobtista bobtista commented Oct 4, 2026 •

Copy link
Copy Markdown

Now Set_Texture is on Renderer and its callers use it. Set_DX8_Texture, which takes a raw D3D texture, stays on DX8Wrapper.

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

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8eb09bd1-f9f7-422a-a1f3-6180176dabd3
📥 Commits

Reviewing files that changed from the base of the PR and between 2f023de and 1bc7ca241f1bd772affbf5261bb6f65bbde25d8e.

📒 Files selected for processing (59)
  • 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/W3DTerrainBackground.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/Backend/RenderBackend.h
  • Core/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt
  • Core/Libraries/Source/WWVegas/WW3D2/IRenderBackend.h
  • Core/Libraries/Source/WWVegas/WW3D2/Renderer.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/Libraries/Source/WWVegas/WW3D2/ww3d.h
  • Core/Tools/W3DView/GammaDialog.cpp
  • Core/Tools/W3DView/MainFrm.cpp
  • Core/Tools/W3DView/ScreenCursor.cpp
  • Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp
  • Generals/Code/Libraries/Source/WWVegas/WW3D2/camera.cpp
  • Generals/Code/Libraries/Source/WWVegas/WW3D2/render2d.cpp
  • Generals/Code/Libraries/Source/WWVegas/WW3D2/scene.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
💤 Files with no reviewable changes (4)
  • Core/Libraries/Source/WWVegas/WW3D2/Backend/RenderBackend.h
  • Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.h
  • Core/Libraries/Source/WWVegas/WW3D2/ww3d.h
  • Core/Libraries/Source/WWVegas/WW3D2/IRenderBackend.h

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

Walkthrough

This pull request adds a static Renderer interface backed by DX8 forwarding methods. It replaces selected DX8Wrapper and backend-instance calls across WW3D2, game rendering, scene and camera code, and tools. Existing rendering pass order and DX8-specific operations remain in place.

Changes

Renderer interface and lifecycle

Layer / File(s) Summary
Renderer API and lifecycle
Core/Libraries/Source/WWVegas/WW3D2/Renderer.h, Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.cpp, Core/Libraries/Source/WWVegas/WW3D2/ww3d.*, Core/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt
The static Renderer interface and DX8 forwarding methods replace the backend instance and IRenderBackend interface. WW3D delegates initialization, shutdown, device queries, and frame operations to Renderer.

WW3D2 render paths

Layer / File(s) Summary
WW3D2 render-state and transform calls
Core/Libraries/Source/WWVegas/WW3D2/*.cpp, GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/*.cpp
Mesh, particle, line, decal, sorting, and other renderers route selected state and transform calls through Renderer. Buffer setup and drawing operations remain on DX8-specific paths.

Game rendering paths

Layer / File(s) Summary
Game rendering paths
Core/GameEngineDevice/Source/W3DDevice/GameClient/*, Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/*, Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp, GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/*
Terrain, water, shadow, scene, and other game render paths use Renderer for selected state setup, transforms, capability queries, and clears. Existing pass order and draw operations remain unchanged.

Camera, scene, and tool integrations

Layer / File(s) Summary
Camera, scene, and tool integrations
Generals/Code/Libraries/Source/WWVegas/WW3D2/{camera,render2d,scene}.cpp, GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/{camera,render2d,scene,dazzle,boxrobj,decalmsh,linegrp,mapper,mesh}.cpp, Core/Tools/W3DView/*, GeneralsMD/Code/Tools/WorldBuilder/src/DrawObject.cpp
Camera and 2D rendering code use Renderer viewport and transform APIs. Scene lighting and clears, W3DView gamma controls, screen-cursor rendering, and WorldBuilder drawing also use the interface.

Priority: Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Refactor

Suggested reviewers: xezon

Merge Risk: Minimal · previous review 1bc7c

No identified issue blocks merging; the inspected lifecycle and render-to-texture paths preserve their existing behavior.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main change: routing texture binding through the Renderer interface.
Description check Passed The description directly explains the Renderer and DX8Wrapper changes, test results, and remaining Generals replication task.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@bobtista
bobtista force-pushed the bobtista/refactor/route-texture-binding branch from 8ebb39b to 9a32b79 Compare October 9, 2026 15:49
@bobtista bobtista changed the title refactor(ww3d2): Route texture binding via IRenderBackend refactor(ww3d2): Route texture binding via Renderer Oct 9, 2026
@bobtista
bobtista force-pushed the bobtista/refactor/route-texture-binding branch 3 times, most recently from d716cd8 to 6a2a0bf Compare October 11, 2026 06:41
@bobtista
bobtista force-pushed the bobtista/refactor/route-texture-binding branch 2 times, most recently from a1628a9 to f55c79b Compare October 24, 2026 16:40
@bobtista
bobtista force-pushed the bobtista/refactor/route-texture-binding branch from f55c79b to 0851772 Compare October 28, 2026 18:06
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