#pragmaonce#include "DirectXHelper.h"// Helper class that initializes DirectX APIs for 3D rendering.refclassDirect3DBaseabstract{internal:Direct3DBase();public:virtualvoidInitialize();virtualvoidCreateDeviceResources();virtualvoidCreateWindowSizeDependentResources();virtualvoidUpdateForRenderResolutionChange(floatwidth,floatheight);virtualvoidUpdateForWindowSizeChange(floatwidth,floatheight);virtualvoidRender()=0;internal:virtualID3D11Texture2D*GetTexture(){returnm_renderTarget.Get();}protectedprivate:// Direct3D Objects.Microsoft::WRL::ComPtr<ID3D11Device1>m_d3dDevice;Microsoft::WRL::ComPtr<ID3D11DeviceContext1>m_d3dContext;Microsoft::WRL::ComPtr<ID3D11Texture2D>m_renderTarget;Microsoft::WRL::ComPtr<ID3D11RenderTargetView>m_renderTargetView;Microsoft::WRL::ComPtr<ID3D11DepthStencilView>m_depthStencilView;// Cached renderer properties.D3D_FEATURE_LEVELm_featureLevel;Windows::Foundation::Sizem_renderTargetSize;Windows::Foundation::Rectm_windowBounds;};