annotate win32/directx/d3dx10core.d @ 1:4a9dcbd9e54f

-files of 0.13 beta -fixes so that it now compiles with the current dmd version
author marton@basel.hu
date Tue, 05 Apr 2011 20:44:01 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
1 /***********************************************************************\
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
2 * d3dx10core.d *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
3 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
4 * Windows API header module *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
5 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
6 * Placed into public domain *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
7 \***********************************************************************/
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
8 module win32.directx.d3dx10core;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
9
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
10 private import win32.windows;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
11
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
12 private import win32.directx.d3d10;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13 private import win32.directx.d3d10effect;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14 private import win32.directx.d3dx10math;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 const D3DX10_DLL_W = "d3dx10_36.dll";
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 const D3DX10_DLL_A = "d3dx10_36.dll";
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 version(Unicode) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 alias D3DX10_DLL_W D3DX10_DLL;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 alias D3DX10_DLL_A D3DX10_DLL;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
23 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 const D3DX10_SDK_VERSION = 36;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27 extern(Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 HRESULT D3DX10CreateDevice(IDXGIAdapter pAdapter, D3D10_DRIVER_TYPE DriverType,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 HMODULE Software, UINT Flags, ID3D10Device* ppDevice);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 HRESULT D3DX10CreateDeviceAndSwapChain(IDXGIAdapter pAdapter, D3D10_DRIVER_TYPE DriverType,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 HMODULE Software, UINT Flags, DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, IDXGISwapChain* ppSwapChain,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 ID3D10Device* ppDevice);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33 //TODO HRESULT D3DX10GetFeatureLevel1(ID3D10Device pDevice, ID3D10Device1* ppDevice1);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
34
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 debug(D3D10_DEBUG) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 BOOL D3DX10DebugMute(BOOL Mute);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 HRESULT D3DX10CheckVersion(UINT D3DSdkVersion, UINT D3DX10SdkVersion);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 UINT D3DX10GetDriverLevel(ID3D10Device pDevice);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 enum D3DX10_SPRITE_FLAG {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44 D3DX10_SPRITE_SORT_TEXTURE = 0x01,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 D3DX10_SPRITE_SORT_DEPTH_BACK_TO_FRONT = 0x02,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46 D3DX10_SPRITE_SORT_DEPTH_FRONT_TO_BACK = 0x04,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 D3DX10_SPRITE_SAVE_STATE = 0x08,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 D3DX10_SPRITE_ADDREF_TEXTURES = 0x10
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
49 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 struct D3DX10_SPRITE {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52 D3DXMATRIX matWorld;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 D3DXVECTOR2 TexCoord;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 D3DXVECTOR2 TexSize;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 D3DXCOLOR ColorModulate;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56 ID3D10ShaderResourceView pTexture;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 UINT TextureIndex;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
60 extern(C) const GUID IID_ID3DX10Sprite = {0xba0b762d, 0x8d28, 0x43ec, [0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x06, 0x14]};
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
61
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
62 interface ID3DX10Sprite : IUnknown {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
63 extern(Windows) :
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
64 HRESULT Begin(UINT flags);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
65 HRESULT DrawSpritesBuffered(D3DX10_SPRITE* pSprites, UINT cSprites);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
66 HRESULT Flush();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
67 HRESULT DrawSpritesImmediate(D3DX10_SPRITE* pSprites, UINT cSprites, UINT cbSprite, UINT flags);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
68 HRESULT End();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
69 HRESULT GetViewTransform(D3DXMATRIX* pViewTransform);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
70 HRESULT SetViewTransform(D3DXMATRIX* pViewTransform);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
71 HRESULT GetProjectionTransform(D3DXMATRIX* pProjectionTransform);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
72 HRESULT SetProjectionTransform(D3DXMATRIX* pProjectionTransform);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
73 HRESULT GetDevice(ID3D10Device* ppDevice);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
74 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
75
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
76 extern(Windows) HRESULT D3DX10CreateSprite(ID3D10Device pDevice, UINT cDeviceBufferSize, ID3DX10Sprite* ppSprite);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
77
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
78 interface ID3DX10DataLoader {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
79 /* TODO: fix vtbl[0] bug
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
80 extern(Windows) :
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
81 HRESULT Load();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
82 HRESULT Decompress(void** ppData, SIZE_T* pcBytes);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
83 HRESULT Destroy();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
84 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
85 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
86
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
87 interface ID3DX10DataProcessor {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
88 /* TODO: fix vtbl[0] bug
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
89 extern(Windows) :
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
90 HRESULT Process(void* pData, SIZE_T cBytes);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
91 HRESULT CreateDeviceObject(void** ppDataObject);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
92 HRESULT Destroy();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
93 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
94 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
95
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
96 extern(C) const GUID IID_ID3DX10ThreadPump = {0xc93fecfa, 0x6967, 0x478a, [0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb]};
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
97
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
98 interface ID3DX10ThreadPump : IUnknown {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
99 extern(Windows) :
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
100 HRESULT AddWorkItem(ID3DX10DataLoader pDataLoader, ID3DX10DataProcessor pDataProcessor, HRESULT *pHResult, void **ppDeviceObject);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
101 UINT GetWorkItemCount();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
102 HRESULT WaitForAllItems();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
103 HRESULT ProcessDeviceWorkItems(UINT iWorkItemCount);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
104 HRESULT PurgeAllItems();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
105 HRESULT GetQueueStatus(UINT* pIoQueue, UINT* pProcessQueue, UINT* pDeviceQueue);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
106 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
107
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
108 extern(Windows) HRESULT D3DX10CreateThreadPump(UINT cIoThreads, UINT cProcThreads,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
109 ID3DX10ThreadPump *ppThreadPump);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
110
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
111 struct D3DX10_FONT_DESCA {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
112 INT Height;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
113 UINT Width;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
114 UINT Weight;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
115 UINT MipLevels;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
116 BOOL Italic;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
117 BYTE CharSet;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
118 BYTE OutputPrecision;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
119 BYTE Quality;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
120 BYTE PitchAndFamily;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
121 CHAR[LF_FACESIZE] FaceName;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
122 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
123
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
124 struct D3DX10_FONT_DESCW {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
125 INT Height;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
126 UINT Width;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
127 UINT Weight;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
128 UINT MipLevels;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
129 BOOL Italic;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
130 BYTE CharSet;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
131 BYTE OutputPrecision;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
132 BYTE Quality;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
133 BYTE PitchAndFamily;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
134 WCHAR[LF_FACESIZE] FaceName;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
135 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
136
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
137 version(Unicode) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
138 alias D3DX10_FONT_DESCW D3DX10_FONT_DESC;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
139 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
140 alias D3DX10_FONT_DESCA D3DX10_FONT_DESC;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
141 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
142
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
143 extern(C) const GUID IID_ID3DX10Font = {0xd79dbb70, 0x5f21, 0x4d36, [0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc]};
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
144
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
145 interface ID3DX10Font : IUnknown {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
146 extern(Windows) :
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
147 HRESULT GetDevice(ID3D10Device* ppDevice);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
148 HRESULT GetDescA(D3DX10_FONT_DESCA* pDesc);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
149 HRESULT GetDescW(D3DX10_FONT_DESCW* pDesc);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
150 BOOL GetTextMetricsA(TEXTMETRICA* pTextMetrics);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
151 BOOL GetTextMetricsW(TEXTMETRICW* pTextMetrics);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
152 HDC GetDC();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
153 HRESULT GetGlyphData(UINT Glyph, ID3D10ShaderResourceView* ppTexture, RECT* pBlackBox, POINT* pCellInc);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
154 HRESULT PreloadCharacters(UINT First, UINT Last);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
155 HRESULT PreloadGlyphs(UINT First, UINT Last);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
156 HRESULT PreloadTextA(LPCSTR pString, INT Count);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
157 HRESULT PreloadTextW(LPCWSTR pString, INT Count);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
158 INT DrawTextA(ID3DX10Sprite pSprite, LPCSTR pString, INT Count, LPRECT pRect, UINT Format, D3DXCOLOR Color);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
159 INT DrawTextW(ID3DX10Sprite pSprite, LPCWSTR pString, INT Count, LPRECT pRect, UINT Format, D3DXCOLOR Color);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
160 version(Unicode) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
161 alias GetTextMetricsW GetTextMetrics;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
162 alias DrawTextW DrawText;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
163 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
164 alias GetTextMetricsA GetTextMetrics;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
165 alias DrawTextA DrawText;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
166 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
167 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
168
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
169 extern(Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
170 HRESULT D3DX10CreateFontA(ID3D10Device pDevice, INT Height, UINT Width, UINT Weight,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
171 UINT MipLevels, BOOL Italic, UINT CharSet, UINT OutputPrecision, UINT Quality,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
172 UINT PitchAndFamily, LPCSTR pFaceName, ID3DX10Font* ppFont);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
173 HRESULT D3DX10CreateFontW(ID3D10Device pDevice, INT Height, UINT Width, UINT Weight,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
174 UINT MipLevels, BOOL Italic, UINT CharSet, UINT OutputPrecision, UINT Quality,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
175 UINT PitchAndFamily, LPCWSTR pFaceName, ID3DX10Font* ppFont);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
176 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
177
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
178 version(Unicode) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
179 alias D3DX10CreateFontW D3DX10CreateFont;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
180 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
181 alias D3DX10CreateFontA D3DX10CreateFont;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
182 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
183
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
184 extern(Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
185 HRESULT D3DX10CreateFontIndirectA(ID3D10Device pDevice, D3DX10_FONT_DESCA* pDesc, ID3DX10Font* ppFont);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
186 HRESULT D3DX10CreateFontIndirectW(ID3D10Device pDevice, D3DX10_FONT_DESCW* pDesc, ID3DX10Font* ppFont);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
187 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
188
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
189 version(Unicode) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
190 alias D3DX10CreateFontIndirectW D3DX10CreateFontIndirect;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
191 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
192 alias D3DX10CreateFontIndirectA D3DX10CreateFontIndirect;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
193 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
194
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
195 extern(Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
196 HRESULT D3DX10UnsetAllDeviceObjects(ID3D10Device pDevice);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
197 //TODO HRESULT D3DX10ReflectShader(void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10ShaderReflection1 *ppReflector);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
198 HRESULT D3DX10DisassembleShader(void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
199 LPCSTR pComments, ID3D10Blob* ppDisassembly);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
200 HRESULT D3DX10DisassembleEffect(ID3D10Effect pEffect, BOOL EnableColorCode, ID3D10Blob* ppDisassembly);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
201 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
202
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
203 const _FACD3D = 0x876;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
204
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
205 HRESULT MAKE_D3DHRESULT(T)(T code) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
206 return MAKE_HRESULT(1, _FACD3D, code);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
207 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
208
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
209 HRESULT MAKE_D3DSTATUS(T)(T code) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
210 return MAKE_HRESULT(0, _FACD3D, code);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
211 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
212
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
213 const D3DERR_INVALIDCALL = MAKE_D3DHRESULT(2156);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
214 const D3DERR_WASSTILLDRAWING = MAKE_D3DHRESULT(540);