5 #pragma warning(disable: 4005) 8 #include <unordered_map> 19 Texture(RvPtr::pointer pRV_, uint32_t w_, uint32_t h_) :
20 pRV(pRV_), w(w_), h(h_)
33 FontTexture(uint32_t w_, uint32_t h_, uint32_t startChar_, uint32_t endChar_) :
34 w(w_), h(h_), startChar(startChar_), endChar(endChar_)
53 uint32_t texW_, uint32_t texH_,
54 int dx_,
int dy_,
bool lrInv_,
bool udInv_,
55 int sx_,
int sy_,
int sw_,
int sh_,
56 int cx_,
int cy_,
float scaleX_,
float scaleY_,
float angle_,
57 uint32_t fontColor_,
float alpha_) :
58 pRV(pRV_), texW(texW_), texH(texH_),
59 dx(dx_), dy(dy_), lrInv(lrInv_), udInv(udInv_),
60 sx(sx_), sy(sy_), sw(sw_), sh(sh_),
61 cx(cx_), cy(cy_), scaleX(scaleX_), scaleY(scaleY_), angle(angle_),
62 fontColor(fontColor_), alpha(alpha_)
73 uint32_t refreshRate = 60;
74 bool fullScreen =
false;
90 static const int SrcSizeDefault = -1;
96 LRESULT onSize(HWND hWnd, UINT
msg, WPARAM wParam, LPARAM lParam);
121 int dx,
int dy,
bool lrInv =
false,
bool udInv =
false,
122 int sx = 0,
int sy = 0,
int sw = SrcSizeDefault,
int sh = SrcSizeDefault,
123 int cx = 0,
int cy = 0,
float angle = 0.0f,
124 float scaleX = 1.0f,
float scaleY = 1.0f,
float alpha = 1.0f);
127 uint32_t startChar, uint32_t endChar, uint32_t
w, uint32_t
h);
130 uint32_t color = 0x000000,
131 float scaleX = 1.0f,
float scaleY = 1.0f,
float alpha = 1.0f,
132 int *nextx =
nullptr,
int *nexty =
nullptr);
148 uint32_t color = 0x000000,
int ajustX = 0,
149 float scaleX = 1.0f,
float scaleY = 1.0f,
float alpha = 1.0f,
150 int *nextx =
nullptr,
int *nexty =
nullptr);
153 const DXGI_FORMAT BufferFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
154 const DXGI_SWAP_CHAIN_FLAG SwapChainFlag = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
155 const float ClearColor[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
156 const size_t DrawListMax = 1024;
157 const wchar_t *
const VS_FileName = L
"@VertexShader.cso";
158 const wchar_t *
const PS_FileName = L
"@PixelShader.cso";
174 std::vector<DrawTask> m_drawTaskList;
176 void initializeD3D();
177 void initBackBuffer();
util::ComPtr< ID3D11ShaderResourceView > RvPtr
util::ComPtr< ID3D11Texture2D > TexPtr
noncopyable & operator=(const noncopyable &)=delete
util::ComPtr< ID3D11ShaderResourceView > RvPtr
Texture(RvPtr::pointer pRV_, uint32_t w_, uint32_t h_)
std::shared_ptr< FontResource > FontResourcePtr
FontTexture(uint32_t w_, uint32_t h_, uint32_t startChar_, uint32_t endChar_)
char msg[LINE_DATA_SIZE-sizeof(LARGE_INTEGER)-sizeof(uint32_t)]
std::shared_ptr< TextureResource > TextureResourcePtr
std::vector< TexPtr > pTexList
std::vector< RvPtr > pRVList
DrawTask(const RvPtr &pRV_, uint32_t texW_, uint32_t texH_, int dx_, int dy_, bool lrInv_, bool udInv_, int sx_, int sy_, int sw_, int sh_, int cx_, int cy_, float scaleX_, float scaleY_, float angle_, uint32_t fontColor_, float alpha_)
std::unique_ptr< T, ComDeleter > ComPtr
unique_ptr of IUnknown with ComDeleter.