Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RYUICHIKAWANO committed Mar 6, 2020
2 parents a2dcc6e + 65a1828 commit 30435d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Chapter18/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Application::Initialize() {
_heapForSpriteFont = _dx12->CreateDescriptorHeapForSpriteFont();
spriteFont = new DirectX::SpriteFont(_dx12->Device(),
resUploadBatch,
L"font/fonttest.spritefont",
L"font/hgpop.spritefont",
_heapForSpriteFont->GetCPUDescriptorHandleForHeapStart(),
_heapForSpriteFont->GetGPUDescriptorHandleForHeapStart());
auto future = resUploadBatch.End(_dx12->CmdQue());
Expand Down Expand Up @@ -405,15 +405,16 @@ Application::Run() {
_dx12->SetFocusPos(pnt.x, pnt.y);
}

_dx12->CmdList()->SetDescriptorHeaps(1, _heapImgui.GetAddressOf());
ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), _dx12->CmdList());


_dx12->CmdList()->SetDescriptorHeaps(1, _heapForSpriteFont.GetAddressOf());
_spriteBatch->Begin(_dx12->CmdList());
spriteFont->DrawString(_spriteBatch, L"DirectX12の魔導書", DirectX::XMFLOAT2(102, 102), DirectX::Colors::Black);
spriteFont->DrawString(_spriteBatch, L"DirectX12の魔導書", DirectX::XMFLOAT2(100, 100), DirectX::Colors::Yellow);
_spriteBatch->End();

_dx12->CmdList()->SetDescriptorHeaps(1, _heapImgui.GetAddressOf());
ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), _dx12->CmdList());

_dx12->Flip();
}
Expand Down
Binary file added Chapter18/font/hgpop.spritefont
Binary file not shown.

0 comments on commit 30435d3

Please sign in to comment.