Render: dead stubs - #27
Merged
Merged
Conversation
RenderStub.cpp carried link-only bodies for symbols the retired D3D9 backend
used to define. Some are still demanded -- by live code, at that: GrassMap::
BuildGrass wants ColorByNormalRGBA, cTexture::CalcTextureSize wants
GetTextureFormatSize, LensFlareRenderer and cOcclusionSilouette construct a
cOcclusionQuery, GameShell owns an sVideoWrite. Those stay.
These do not. Verified by deleting them and relinking (Debug and RelWithDebInfo,
both clean):
DrawStrip::Begin/End
PoolManager, Pool, VertexPool, IndexPool (the D3D9 tilemap page allocator)
DrawType::BeginDraw/SetTileColor
cTileMapRender (7 members)
cD3DRender::LockTexture x2, UnlockTexture, DrawQuad, createRenderTargets,
deleteRenderTargets, CreateFloatTexture, CreateMirageMap, SetAdvance,
SetBlendState, SetRenderTarget1
DrawStrip is the one worth a note rather than a silent delete: its Set() is an
inline that writes into a locked cVertexBuffer we do not have, so a body would
leave the pointer garbage. Without one, a new caller now fails at link time
instead of corrupting the heap at run time -- strictly better than the assert
that was there. The comment says so, and says where callers should go instead.
D3DRenderTilemap.h goes with cTileMapRender; nothing else in the file needed it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The header still described the D3D9 backend as "the real renderer", the SDL one as "Track B", and this file as no-op definitions for a silent renderer on the platforms D3D could not reach. All three stopped being true when D3D9 was retired -- which is why the file reads as disposable when it holds the only CreateIRenderDevice the engine has. Rewritten to describe the two things actually in it: the renderer's entry point and backend globals, and the seam retirement could not reach -- portable engine code that still speaks D3D9 nouns (GetTextureFormatSize, ColorByNormalRGBA, IDirect3DSurface9* parameters) and still owns classes whose only implementation was D3D9 (cOcclusionQuery, sVideoWrite, the dynamic buffer family). It also draws a distinction the old header did not, and that cost time to rediscover: the cD3DRender:: helpers are unreachable, every call arriving through the null gb_RenderDevice3D -- but the other bodies DO run and their returns are consumed. GrassMap::BuildGrass writes ColorByNormalRGBA's result into every bush, cOcclusionQuery answers IsVisible() = true, GetTextureFormatSize reports 0 bpp. Answers the game acts on, not silence. Same pass over the section comments, which framed everything as Windows vs off-Windows: the samplers, CreateIRenderDevice, RegisterVertexDeclaration, cSkinVertex, the sPtr bodies. Comments only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
No description provided.