| 2060 | } |
| 2061 | |
| 2062 | void 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 | |
| 2079 | int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) |
| 2080 | { |
nothing calls this directly
no test coverage detected