MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / Render

Method Render

SampleFramework12/v1.00/Graphics/SpriteRenderer.cpp:146–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void SpriteRenderer::Render(ID3D12GraphicsCommandList* cmdList, const Texture* texture, const SpriteTransform& transform,
147 const Float4& color, const Float4* drawRect)
148{
149 if(texture == nullptr)
150 texture = &defaultTexture;
151
152 SpriteDrawData drawData;
153 drawData.Transform = transform;
154 drawData.Color = color;
155 if(drawRect != nullptr)
156 drawData.DrawRect = *drawRect;
157 else
158 drawData.DrawRect = Float4(0.0f, 0.0f, float(texture->Width), float(texture->Height));
159
160 RenderBatch(cmdList, texture, &drawData, 1);
161}
162
163void SpriteRenderer::RenderBatch(ID3D12GraphicsCommandList* cmdList, const Texture* texture,
164 const SpriteDrawData* drawData, uint64 numSprites)

Callers

nothing calls this directly

Calls 1

Float4Class · 0.70

Tested by

no test coverage detected