Add directwrite to example.
This commit is contained in:
parent
92d1f24613
commit
d1ec8b4f68
5 changed files with 235 additions and 21 deletions
|
@ -23,6 +23,11 @@ struct ID3D12Fence;
|
|||
struct ID3D12RootSignature;
|
||||
struct ID3D12PipelineState;
|
||||
|
||||
struct ID3D11Resource;
|
||||
struct ID2D1Bitmap1;
|
||||
struct ID2D1SolidColorBrush;
|
||||
struct IDWriteTextFormat;
|
||||
|
||||
class Win32DxWindowInterface
|
||||
{
|
||||
public:
|
||||
|
@ -46,6 +51,8 @@ private:
|
|||
void waitForPreviousFrame();
|
||||
void destroyWindow();
|
||||
|
||||
void renderD2d();
|
||||
|
||||
static const UINT FrameCount = 2;
|
||||
Win32DxInterface* mDxInterface{ nullptr };
|
||||
bool mInitialized{ false };
|
||||
|
@ -59,7 +66,6 @@ private:
|
|||
CD3DX12_VIEWPORT mViewport;
|
||||
CD3DX12_RECT mScissorRect;
|
||||
|
||||
Microsoft::WRL::ComPtr<ID3D12CommandQueue> mCommandQueue;
|
||||
Microsoft::WRL::ComPtr<ID3D12CommandAllocator> mCommandAllocator;
|
||||
Microsoft::WRL::ComPtr<ID3D12GraphicsCommandList> mCommandList;
|
||||
|
||||
|
@ -72,6 +78,11 @@ private:
|
|||
UINT mRtvDescriptorSize{ 0 };
|
||||
|
||||
Microsoft::WRL::ComPtr<ID3D12Resource> mRenderTargets[FrameCount];
|
||||
Microsoft::WRL::ComPtr<ID3D11Resource> mWrappedBackBuffers[FrameCount];
|
||||
Microsoft::WRL::ComPtr<ID2D1Bitmap1> mD2dRenderTargets[FrameCount];
|
||||
|
||||
Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> mTextBrush;
|
||||
Microsoft::WRL::ComPtr<IDWriteTextFormat> mTextFormat;
|
||||
|
||||
Microsoft::WRL::ComPtr<ID3D12Resource> mVertexBuffer;
|
||||
D3D12_VERTEX_BUFFER_VIEW mVertexBufferView{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue