1 // Copyright (C) 2003 Dolphin Project.
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, version 2.0.
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // GNU General Public License 2.0 for more details.
12 // A copy of the GPL 2.0 should have been included with the program.
13 // If not, see http://www.gnu.org/licenses/
15 // Official SVN repository and contact information can be found at
16 // http://code.google.com/p/dolphin-emu/
26 // Font creation flags
27 #define D3DFONT_BOLD 0x0001
28 #define D3DFONT_ITALIC 0x0002
30 // Font rendering flags
31 #define D3DFONT_CENTERED 0x0001
35 ID3D11ShaderResourceView
* m_pTexture
;
37 ID3D11InputLayout
* m_InputLayout
;
38 ID3D11PixelShader
* m_pshader
;
39 ID3D11VertexShader
* m_vshader
;
40 ID3D11BlendState
* m_blendstate
;
41 ID3D11RasterizerState
* m_raststate
;
42 const int m_dwTexWidth
;
43 const int m_dwTexHeight
;
44 unsigned int m_LineHeight
;
45 float m_fTexCoords
[128-32][4];
49 // 2D text drawing function
50 // Initializing and destroying device-dependent objects
53 int DrawTextScaled(float x
, float y
,
55 float spacing
, u32 dwColor
,
56 const char* strText
, bool center
=true);
64 void SetPointCopySampler();
65 void SetLinearCopySampler();
67 void drawShadedTexQuad(ID3D11ShaderResourceView
* texture
,
68 const D3D11_RECT
* rSource
,
71 ID3D11PixelShader
* PShader
,
72 ID3D11VertexShader
* VShader
,
73 ID3D11InputLayout
* layout
);
74 void drawShadedTexSubQuad(ID3D11ShaderResourceView
* texture
,
75 const MathUtil::Rectangle
<float>* rSource
,
78 const MathUtil::Rectangle
<float>* rDest
,
79 ID3D11PixelShader
* PShader
,
80 ID3D11VertexShader
* Vshader
,
81 ID3D11InputLayout
* layout
);
82 void drawClearQuad(u32 Color
, float z
, ID3D11PixelShader
* PShader
, ID3D11VertexShader
* Vshader
, ID3D11InputLayout
* layout
);
83 void drawColorQuad(u32 Color
, float x1
, float y1
, float x2
, float y2
);