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

Method RenderHUD

BindlessDeferred/BindlessDeferred.cpp:2062–2077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2060}
2061
2062void BindlessDeferred::RenderHUD(const Timer& timer)
2063{
2064 ID3D12GraphicsCommandList* cmdList = DX12::CmdList;
2065 PIXMarker pixMarker(cmdList, "HUD Pass");
2066
2067 Float2 viewportSize;
2068 viewportSize.x = float(swapChain.Width());
2069 viewportSize.y = float(swapChain.Height());
2070 spriteRenderer.Begin(cmdList, viewportSize, SpriteFilterMode::Point, SpriteBlendMode::AlphaBlend);
2071
2072 Float2 textPos = Float2(25.0f, 25.0f);
2073 wstring fpsText = MakeString(L"Frame Time: %.2fms (%u FPS)", 1000.0f / fps, fps);
2074 spriteRenderer.RenderText(cmdList, font, fpsText.c_str(), textPos, Float4(1.0f, 1.0f, 0.0f, 1.0f));
2075
2076 spriteRenderer.End();
2077}
2078
2079int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
2080{

Callers

nothing calls this directly

Calls 9

Float2Class · 0.85
MakeStringFunction · 0.85
RenderTextMethod · 0.80
c_strMethod · 0.80
Float4Class · 0.50
WidthMethod · 0.45
HeightMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected