Rev 1 | Rev 10 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | (*==========================================================================; |
2 | * |
||
3 | * Copyright (C) 1994-1999 Microsoft Corporation. All Rights Reserved. |
||
4 | * |
||
5 | * DirectX header version 98.11.20 |
||
6 | * |
||
7 | * Present by Hiroyuki Hori. |
||
8 | * |
||
9 | * E-Mail: hori@ingjapan.ne.jp |
||
10 | * Homepage: http://www.ingjapan.ne.jp/hori/index.html |
||
11 | * Homepage: http://www.ingjapan.ne.jp/hori/index-e.html |
||
12 | * |
||
13 | * Present unit: |
||
14 | * DirectX.pas DirectX 7 (DirectX 7 SDK) |
||
15 | * DShow.pas DirectShow (DirectX Media SDK 5.1) |
||
16 | * DAnim.pas DirectAnimation (DirectX Media SDK 5.1) |
||
17 | * |
||
18 | *-------------------------------------------------------------------------- |
||
19 | * |
||
20 | * DirectMusic header version 1.0 |
||
21 | * |
||
22 | * Present by Kazuya Yamane |
||
23 | * |
||
24 | * e-mail : kazuya-y@infosakyu.ne.jp |
||
25 | * URL : http://www.infosakyu.ne.jp/~kazuya-y/index.html |
||
26 | * |
||
27 | ***************************************************************************) |
||
4 | daniel-mar | 28 | { |
29 | (c)2004 Jaro Benes Recompilation with Erik Unger's headers |
||
1 | daniel-mar | 30 | |
4 | daniel-mar | 31 | Join in order: |
32 | 1) DirectDraw |
||
33 | 2) Direct3D |
||
34 | 3) Direct3DRM |
||
35 | 4) DirectInput |
||
36 | 5) DirectPlay |
||
37 | 6) DirectSetup |
||
38 | 7) DirectSound |
||
39 | 8) DirectMusic |
||
40 | } |
||
41 | Unit DirectX; |
||
1 | daniel-mar | 42 | |
4 | daniel-mar | 43 | Interface |
1 | daniel-mar | 44 | |
4 | daniel-mar | 45 | {Delphi version marks} |
1 | daniel-mar | 46 | |
4 | daniel-mar | 47 | {$I DelphiXcfg.inc} |
1 | daniel-mar | 48 | |
4 | daniel-mar | 49 | {$MINENUMSIZE 4} |
50 | {$ALIGN ON} |
||
1 | daniel-mar | 51 | |
4 | daniel-mar | 52 | uses |
53 | Windows, MMSystem; |
||
54 | //DirectDraw file |
||
1 | daniel-mar | 55 | (*==========================================================================; |
56 | * |
||
4 | daniel-mar | 57 | * Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved. |
1 | daniel-mar | 58 | * |
4 | daniel-mar | 59 | * Files: ddraw.h dvp.h |
60 | * Content: DirectDraw and DirectDrawVideoPort include files |
||
1 | daniel-mar | 61 | * |
4 | daniel-mar | 62 | * DirectX 7.0 Delphi adaptation by Erik Unger |
63 | * |
||
64 | * Modified: 10-Sep-2000 |
||
65 | * |
||
66 | * Download: http://www.delphi-jedi.org/DelphiGraphics/ |
||
67 | * E-Mail: DelphiDirectX@next-reality.com |
||
68 | * |
||
69 | * |
||
1 | daniel-mar | 70 | ***************************************************************************) |
71 | |||
4 | daniel-mar | 72 | var |
73 | DDrawDLL : HMODULE = 0; |
||
1 | daniel-mar | 74 | |
4 | daniel-mar | 75 | function DDErrorString(Value: HResult) : string; |
1 | daniel-mar | 76 | |
4 | daniel-mar | 77 | function MAKEFOURCC(ch0, ch1, ch2, ch3: Char) : DWORD; |
1 | daniel-mar | 78 | |
4 | daniel-mar | 79 | (* |
80 | * FOURCC codes for DX compressed-texture pixel formats |
||
81 | *) |
||
1 | daniel-mar | 82 | const |
4 | daniel-mar | 83 | FOURCC_DXT1 = 'DXT1'; |
84 | FOURCC_DXT2 = 'DXT2'; |
||
85 | FOURCC_DXT3 = 'DXT3'; |
||
86 | FOURCC_DXT4 = 'DXT4'; |
||
87 | FOURCC_DXT5 = 'DXT5'; |
||
88 | |||
89 | (* |
||
90 | * GUIDS used by DirectDraw objects |
||
91 | *) |
||
92 | const |
||
1 | daniel-mar | 93 | CLSID_DirectDraw: TGUID = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}'; |
4 | daniel-mar | 94 | CLSID_DirectDraw7: TGUID = '{3c305196-50db-11d3-9cfe-00c04fd930c5}'; |
95 | CLSID_DirectDrawClipper: TGUID = '{593817A0-7DB3-11CF-A2DE-00AA00b93356}'; |
||
1 | daniel-mar | 96 | |
97 | const |
||
4 | daniel-mar | 98 | DD_ROP_SPACE = (256 div 32); // space required to store ROP array |
1 | daniel-mar | 99 | |
4 | daniel-mar | 100 | MAX_DDDEVICEID_STRING = 512; |
1 | daniel-mar | 101 | |
4 | daniel-mar | 102 | (* |
103 | * Flags for the IDirectDraw4::GetDeviceIdentifier method |
||
104 | *) |
||
1 | daniel-mar | 105 | |
4 | daniel-mar | 106 | (* |
107 | * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped |
||
108 | * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the |
||
109 | * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is |
||
110 | * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities |
||
111 | * of the DirectDraw object involved. |
||
112 | *) |
||
113 | DDGDI_GETHOSTIDENTIFIER = $00000001; |
||
114 | |||
115 | (*============================================================================ |
||
116 | * |
||
117 | * DirectDraw Structures |
||
118 | * |
||
119 | * Various structures used to invoke DirectDraw. |
||
120 | * |
||
121 | *==========================================================================*) |
||
122 | |||
123 | var |
||
124 | NilGUID : TGUID{$IfNDef VER6UP} absolute 0{$EndIf}; |
||
125 | |||
1 | daniel-mar | 126 | type |
4 | daniel-mar | 127 | TRefGUID = packed record |
128 | case integer of |
||
129 | 1: (guid : PGUID); |
||
130 | 2: (dwFlags : DWORD); |
||
131 | end; |
||
132 | |||
1 | daniel-mar | 133 | IDirectDraw = interface; |
134 | IDirectDraw2 = interface; |
||
135 | IDirectDraw4 = interface; |
||
136 | IDirectDraw7 = interface; |
||
137 | IDirectDrawSurface = interface; |
||
138 | IDirectDrawSurface2 = interface; |
||
139 | IDirectDrawSurface3 = interface; |
||
140 | IDirectDrawSurface4 = interface; |
||
141 | IDirectDrawSurface7 = interface; |
||
4 | daniel-mar | 142 | |
1 | daniel-mar | 143 | IDirectDrawPalette = interface; |
144 | IDirectDrawClipper = interface; |
||
145 | IDirectDrawColorControl = interface; |
||
146 | IDirectDrawGammaControl = interface; |
||
147 | |||
4 | daniel-mar | 148 | (* |
149 | * Generic pixel format with 8-bit RGB and alpha components |
||
150 | *) |
||
1 | daniel-mar | 151 | PDDARGB = ^TDDARGB; |
4 | daniel-mar | 152 | TDDARGB = packed record |
153 | blue: BYTE; |
||
154 | green: BYTE; |
||
155 | red: BYTE; |
||
156 | alpha: BYTE; |
||
1 | daniel-mar | 157 | end; |
158 | |||
4 | daniel-mar | 159 | (* |
160 | * This version of the structure remains for backwards source compatibility. |
||
161 | * The DDARGB structure is the one that should be used for all DirectDraw APIs. |
||
162 | *) |
||
1 | daniel-mar | 163 | PDDRGBA = ^TDDRGBA; |
4 | daniel-mar | 164 | TDDRGBA = packed record |
165 | red : BYTE; |
||
166 | green : BYTE; |
||
167 | blue : BYTE; |
||
168 | alpha : BYTE; |
||
1 | daniel-mar | 169 | end; |
170 | |||
4 | daniel-mar | 171 | (* |
172 | * TDDColorKey |
||
173 | *) |
||
1 | daniel-mar | 174 | PDDColorKey = ^TDDColorKey; |
4 | daniel-mar | 175 | TDDColorKey = packed record |
1 | daniel-mar | 176 | dwColorSpaceLowValue: DWORD; // low boundary of color space that is to |
4 | daniel-mar | 177 | // be treated as Color Key, inclusive |
1 | daniel-mar | 178 | dwColorSpaceHighValue: DWORD; // high boundary of color space that is |
4 | daniel-mar | 179 | // to be treated as Color Key, inclusive |
1 | daniel-mar | 180 | end; |
181 | |||
4 | daniel-mar | 182 | // Delphi 5 can't handle interface in variant records |
183 | // so we have to use pointers instead (which can be type-casted into interfaces): |
||
1 | daniel-mar | 184 | |
4 | daniel-mar | 185 | {$IFDEF VER5UP} |
186 | PDirectDrawSurface = Pointer; |
||
187 | {$ELSE} |
||
188 | PDirectDrawSurface = IDirectDrawSurface; |
||
189 | {$ENDIF} |
||
1 | daniel-mar | 190 | |
4 | daniel-mar | 191 | (* |
192 | * TDDBltFX |
||
193 | * Used to pass override information to the DIRECTDRAWSURFACE callback Blt. |
||
194 | *) |
||
1 | daniel-mar | 195 | PDDBltFX = ^TDDBltFX; |
4 | daniel-mar | 196 | TDDBltFX = packed record |
197 | dwSize : DWORD; // size of structure |
||
198 | dwDDFX : DWORD; // FX operations |
||
199 | dwROP : DWORD; // Win32 raster operations |
||
200 | dwDDROP : DWORD; // Raster operations new for DirectDraw |
||
201 | dwRotationAngle : DWORD; // Rotation angle for blt |
||
202 | dwZBufferOpCode : DWORD; // ZBuffer compares |
||
203 | dwZBufferLow : DWORD; // Low limit of Z buffer |
||
204 | dwZBufferHigh : DWORD; // High limit of Z buffer |
||
205 | dwZBufferBaseDest : DWORD; // Destination base value |
||
206 | dwZDestConstBitDepth : DWORD; // Bit depth used to specify Z constant for destination |
||
207 | case integer of |
||
1 | daniel-mar | 208 | 0: ( |
4 | daniel-mar | 209 | dwZDestConst : DWORD // Constant to use as Z buffer for dest |
210 | ); |
||
1 | daniel-mar | 211 | 1: ( |
4 | daniel-mar | 212 | lpDDSZBufferDest : PDirectDrawSurface; // Surface to use as Z buffer for dest |
213 | dwZSrcConstBitDepth : DWORD; // Bit depth used to specify Z constant for source |
||
214 | case integer of |
||
215 | 0: ( |
||
216 | dwZSrcConst : DWORD; // Constant to use as Z buffer for src |
||
217 | ); |
||
218 | 1: ( |
||
219 | lpDDSZBufferSrc : PDirectDrawSurface; // Surface to use as Z buffer for src |
||
220 | dwAlphaEdgeBlendBitDepth : DWORD; // Bit depth used to specify constant for alpha edge blend |
||
221 | dwAlphaEdgeBlend : DWORD; // Alpha for edge blending |
||
222 | dwReserved : DWORD; |
||
223 | dwAlphaDestConstBitDepth : DWORD; // Bit depth used to specify alpha constant for destination |
||
224 | case integer of |
||
225 | 0: ( |
||
226 | dwAlphaDestConst : DWORD; // Constant to use as Alpha Channel |
||
227 | ); |
||
228 | 1: ( |
||
229 | lpDDSAlphaDest : PDirectDrawSurface; // Surface to use as Alpha Channel |
||
230 | dwAlphaSrcConstBitDepth : DWORD; // Bit depth used to specify alpha constant for source |
||
231 | case integer of |
||
232 | 0: ( |
||
233 | dwAlphaSrcConst : DWORD; // Constant to use as Alpha Channel |
||
234 | ); |
||
235 | 1: ( |
||
236 | lpDDSAlphaSrc : PDirectDrawSurface; // Surface to use as Alpha Channel |
||
237 | case integer of |
||
238 | 0: ( |
||
239 | dwFillColor : DWORD; // color in RGB or Palettized |
||
240 | ); |
||
241 | 1: ( |
||
242 | dwFillDepth : DWORD; // depth value for z-buffer |
||
243 | ); |
||
244 | 2: ( |
||
245 | dwFillPixel : DWORD; // pixel value |
||
246 | ); |
||
247 | 3: ( |
||
248 | lpDDSPattern : PDirectDrawSurface; // Surface to use as pattern |
||
249 | ddckDestColorkey : TDDColorKey; // DestColorkey override |
||
250 | ddckSrcColorkey : TDDColorKey; // SrcColorkey override |
||
251 | ) |
||
252 | ) |
||
253 | ) |
||
254 | ) |
||
255 | ) |
||
1 | daniel-mar | 256 | end; |
257 | |||
4 | daniel-mar | 258 | (* |
259 | * TDDSCaps |
||
260 | *) |
||
1 | daniel-mar | 261 | PDDSCaps = ^TDDSCaps; |
4 | daniel-mar | 262 | TDDSCaps = packed record |
1 | daniel-mar | 263 | dwCaps: DWORD; // capabilities of surface wanted |
264 | end; |
||
265 | |||
4 | daniel-mar | 266 | (* |
267 | * TDDOSCaps |
||
268 | *) |
||
1 | daniel-mar | 269 | PDDOSCaps = ^TDDOSCaps; |
4 | daniel-mar | 270 | TDDOSCaps = packed record |
1 | daniel-mar | 271 | dwCaps: DWORD; // capabilities of surface wanted |
272 | end; |
||
273 | |||
4 | daniel-mar | 274 | (* |
275 | * This structure is used internally by DirectDraw. |
||
276 | *) |
||
1 | daniel-mar | 277 | PDDSCapsEx = ^TDDSCapsEx; |
4 | daniel-mar | 278 | TDDSCapsEx = packed record |
279 | dwCaps2 : DWORD; |
||
280 | dwCaps3 : DWORD; |
||
281 | dwCaps4 : DWORD; |
||
1 | daniel-mar | 282 | end; |
283 | |||
4 | daniel-mar | 284 | (* |
285 | * TDDSCaps2 |
||
286 | *) |
||
1 | daniel-mar | 287 | PDDSCaps2 = ^TDDSCaps2; |
4 | daniel-mar | 288 | TDDSCaps2 = packed record |
1 | daniel-mar | 289 | dwCaps: DWORD; // capabilities of surface wanted |
4 | daniel-mar | 290 | dwCaps2 : DWORD; |
291 | dwCaps3 : DWORD; |
||
292 | dwCaps4 : DWORD; |
||
1 | daniel-mar | 293 | end; |
294 | |||
4 | daniel-mar | 295 | (* |
296 | * TDDCaps |
||
297 | *) |
||
298 | (* |
||
299 | * This structure is the TDDCaps structure as it was in version 2 and 3 of Direct X. |
||
300 | * It is present for back compatability. |
||
301 | *) |
||
1 | daniel-mar | 302 | PDDCaps_DX3 = ^TDDCaps_DX3; |
4 | daniel-mar | 303 | TDDCaps_DX3 = packed record |
1 | daniel-mar | 304 | dwSize: DWORD; // size of the DDDRIVERCAPS structure |
305 | dwCaps: DWORD; // driver specific capabilities |
||
306 | dwCaps2: DWORD; // more driver specific capabilites |
||
307 | dwCKeyCaps: DWORD; // color key capabilities of the surface |
||
308 | dwFXCaps: DWORD; // driver specific stretching and effects capabilites |
||
309 | dwFXAlphaCaps: DWORD; // alpha driver specific capabilities |
||
310 | dwPalCaps: DWORD; // palette capabilities |
||
311 | dwSVCaps: DWORD; // stereo vision capabilities |
||
312 | dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 |
||
313 | dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 |
||
314 | dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 |
||
315 | dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 |
||
316 | dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 |
||
317 | dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 |
||
318 | dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 |
||
319 | dwVidMemTotal: DWORD; // total amount of video memory |
||
320 | dwVidMemFree: DWORD; // amount of free video memory |
||
321 | dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays |
||
322 | dwCurrVisibleOverlays: DWORD; // current number of visible overlays |
||
323 | dwNumFourCCCodes: DWORD; // number of four cc codes |
||
324 | dwAlignBoundarySrc: DWORD; // source rectangle alignment |
||
325 | dwAlignSizeSrc: DWORD; // source rectangle byte size |
||
326 | dwAlignBoundaryDest: DWORD; // dest rectangle alignment |
||
327 | dwAlignSizeDest: DWORD; // dest rectangle byte size |
||
328 | dwAlignStrideAlign: DWORD; // stride alignment |
||
4 | daniel-mar | 329 | dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported |
1 | daniel-mar | 330 | ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities |
331 | dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
332 | dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
333 | dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
334 | dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
335 | dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
336 | dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
337 | dwReserved1: DWORD; // reserved |
||
338 | dwReserved2: DWORD; // reserved |
||
339 | dwReserved3: DWORD; // reserved |
||
340 | dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts |
||
341 | dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts |
||
342 | dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts |
||
4 | daniel-mar | 343 | dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts |
1 | daniel-mar | 344 | dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts |
345 | dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts |
||
346 | dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts |
||
4 | daniel-mar | 347 | dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts |
1 | daniel-mar | 348 | dwSSBCaps: DWORD; // driver specific capabilities for System->System blts |
349 | dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts |
||
350 | dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts |
||
4 | daniel-mar | 351 | dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts |
352 | dwReserved4 : DWORD; |
||
353 | dwReserved5 : DWORD; |
||
354 | dwReserved6 : DWORD; |
||
1 | daniel-mar | 355 | end; |
356 | |||
4 | daniel-mar | 357 | (* |
358 | * This structure is the TDDCaps structure as it was in version 5 of Direct X. |
||
359 | * It is present for back compatability. |
||
360 | *) |
||
1 | daniel-mar | 361 | PDDCaps_DX5 = ^TDDCaps_DX5; |
4 | daniel-mar | 362 | TDDCaps_DX5 = packed record |
1 | daniel-mar | 363 | dwSize: DWORD; // size of the DDDRIVERCAPS structure |
364 | dwCaps: DWORD; // driver specific capabilities |
||
365 | dwCaps2: DWORD; // more driver specific capabilites |
||
366 | dwCKeyCaps: DWORD; // color key capabilities of the surface |
||
367 | dwFXCaps: DWORD; // driver specific stretching and effects capabilites |
||
368 | dwFXAlphaCaps: DWORD; // alpha driver specific capabilities |
||
369 | dwPalCaps: DWORD; // palette capabilities |
||
370 | dwSVCaps: DWORD; // stereo vision capabilities |
||
371 | dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 |
||
372 | dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 |
||
373 | dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 |
||
374 | dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 |
||
375 | dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 |
||
376 | dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 |
||
377 | dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 |
||
378 | dwVidMemTotal: DWORD; // total amount of video memory |
||
379 | dwVidMemFree: DWORD; // amount of free video memory |
||
380 | dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays |
||
381 | dwCurrVisibleOverlays: DWORD; // current number of visible overlays |
||
382 | dwNumFourCCCodes: DWORD; // number of four cc codes |
||
383 | dwAlignBoundarySrc: DWORD; // source rectangle alignment |
||
384 | dwAlignSizeSrc: DWORD; // source rectangle byte size |
||
385 | dwAlignBoundaryDest: DWORD; // dest rectangle alignment |
||
386 | dwAlignSizeDest: DWORD; // dest rectangle byte size |
||
387 | dwAlignStrideAlign: DWORD; // stride alignment |
||
4 | daniel-mar | 388 | dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported |
1 | daniel-mar | 389 | ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities |
390 | dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
391 | dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
392 | dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
393 | dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
394 | dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
395 | dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
396 | dwReserved1: DWORD; // reserved |
||
397 | dwReserved2: DWORD; // reserved |
||
398 | dwReserved3: DWORD; // reserved |
||
399 | dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts |
||
400 | dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts |
||
401 | dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts |
||
4 | daniel-mar | 402 | dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts |
1 | daniel-mar | 403 | dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts |
404 | dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts |
||
405 | dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts |
||
4 | daniel-mar | 406 | dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts |
1 | daniel-mar | 407 | dwSSBCaps: DWORD; // driver specific capabilities for System->System blts |
408 | dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts |
||
409 | dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts |
||
4 | daniel-mar | 410 | dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts |
411 | // Members added for DX5: |
||
412 | dwMaxVideoPorts: DWORD; // maximum number of usable video ports |
||
413 | dwCurrVideoPorts: DWORD; // current number of video ports used |
||
414 | dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts |
||
415 | dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts |
||
416 | dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts |
||
417 | dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts |
||
418 | dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts |
||
419 | dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts |
||
1 | daniel-mar | 420 | end; |
421 | |||
422 | PDDCaps_DX6 = ^TDDCaps_DX6; |
||
4 | daniel-mar | 423 | TDDCaps_DX6 = packed record |
1 | daniel-mar | 424 | dwSize: DWORD; // size of the DDDRIVERCAPS structure |
425 | dwCaps: DWORD; // driver specific capabilities |
||
426 | dwCaps2: DWORD; // more driver specific capabilites |
||
427 | dwCKeyCaps: DWORD; // color key capabilities of the surface |
||
428 | dwFXCaps: DWORD; // driver specific stretching and effects capabilites |
||
429 | dwFXAlphaCaps: DWORD; // alpha driver specific capabilities |
||
430 | dwPalCaps: DWORD; // palette capabilities |
||
431 | dwSVCaps: DWORD; // stereo vision capabilities |
||
432 | dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 |
||
433 | dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 |
||
434 | dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 |
||
435 | dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 |
||
436 | dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 |
||
437 | dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 |
||
438 | dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 |
||
439 | dwVidMemTotal: DWORD; // total amount of video memory |
||
440 | dwVidMemFree: DWORD; // amount of free video memory |
||
441 | dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays |
||
442 | dwCurrVisibleOverlays: DWORD; // current number of visible overlays |
||
443 | dwNumFourCCCodes: DWORD; // number of four cc codes |
||
444 | dwAlignBoundarySrc: DWORD; // source rectangle alignment |
||
445 | dwAlignSizeSrc: DWORD; // source rectangle byte size |
||
446 | dwAlignBoundaryDest: DWORD; // dest rectangle alignment |
||
447 | dwAlignSizeDest: DWORD; // dest rectangle byte size |
||
448 | dwAlignStrideAlign: DWORD; // stride alignment |
||
4 | daniel-mar | 449 | dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported |
450 | ddsOldCaps: TDDSCaps; // Was dssCaps: TDDSCaps. ddsCaps is of type TDDScaps2 for DX6 |
||
1 | daniel-mar | 451 | dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
452 | dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
453 | dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
454 | dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
455 | dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
456 | dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 |
||
457 | dwReserved1: DWORD; // reserved |
||
458 | dwReserved2: DWORD; // reserved |
||
459 | dwReserved3: DWORD; // reserved |
||
460 | dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts |
||
461 | dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts |
||
462 | dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts |
||
4 | daniel-mar | 463 | dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts |
1 | daniel-mar | 464 | dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts |
465 | dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts |
||
466 | dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts |
||
4 | daniel-mar | 467 | dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts |
1 | daniel-mar | 468 | dwSSBCaps: DWORD; // driver specific capabilities for System->System blts |
469 | dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts |
||
470 | dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts |
||
4 | daniel-mar | 471 | dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts |
472 | // Members added for DX5: |
||
473 | dwMaxVideoPorts: DWORD; // maximum number of usable video ports |
||
474 | dwCurrVideoPorts: DWORD; // current number of video ports used |
||
475 | dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts |
||
476 | dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts |
||
477 | dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts |
||
478 | dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts |
||
479 | dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts |
||
480 | dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts |
||
481 | // Members added for DX6 release |
||
482 | ddsCaps : TDDSCaps2 ; // Surface Caps |
||
1 | daniel-mar | 483 | end; |
484 | |||
4 | daniel-mar | 485 | TDDCaps_DX7 = TDDCaps_DX6; |
486 | |||
487 | PDDCaps = ^TDDCaps; |
||
488 | |||
489 | {$IFDEF DIRECTX3} |
||
1 | daniel-mar | 490 | TDDCaps = TDDCaps_DX3; |
4 | daniel-mar | 491 | {$ELSE} |
492 | {$IFDEF DIRECTX5} |
||
493 | TDDCaps = TDDCaps_DX5; |
||
494 | {$ELSE} |
||
495 | {$IFDEF DIRECTX6} |
||
496 | TDDCaps = TDDCaps_DX6; |
||
497 | {$ELSE} |
||
498 | TDDCaps = TDDCaps_DX7; |
||
499 | {$ENDIF} |
||
500 | {$ENDIF} |
||
1 | daniel-mar | 501 | {$ENDIF} |
502 | |||
503 | |||
504 | |||
4 | daniel-mar | 505 | |
506 | (* |
||
507 | * TDDPixelFormat |
||
508 | *) |
||
509 | PDDPixelFormat_DX5 = ^TDDPixelFormat_DX5; |
||
510 | TDDPixelFormat_DX5 = packed record |
||
511 | dwSize: DWORD; // size of structure |
||
512 | dwFlags: DWORD; // pixel format flags |
||
513 | dwFourCC: DWORD; // (FOURCC code) |
||
1 | daniel-mar | 514 | case Integer of |
4 | daniel-mar | 515 | 0: ( |
516 | dwZBufferBitDepth: DWORD; // how many bits for z buffers |
||
517 | ); |
||
518 | 1: ( |
||
519 | dwAlphaBitDepth: DWORD; // how many bits for alpha channels |
||
520 | ); |
||
521 | 2: ( |
||
522 | dwRGBBitCount: DWORD; // how many bits per pixel |
||
523 | dwRBitMask: DWORD; // mask for red bit |
||
524 | dwGBitMask: DWORD; // mask for green bits |
||
525 | dwBBitMask: DWORD; // mask for blue bits |
||
526 | dwRGBAlphaBitMask: DWORD; // mask for alpha channel |
||
527 | ); |
||
528 | 3: ( |
||
529 | dwYUVBitCount: DWORD; // how many bits per pixel |
||
530 | dwYBitMask: DWORD; // mask for Y bits |
||
531 | dwUBitMask: DWORD; // mask for U bits |
||
532 | dwVBitMask: DWORD; // mask for V bits |
||
533 | case Integer of |
||
1 | daniel-mar | 534 | 0: ( |
4 | daniel-mar | 535 | dwYUVAlphaBitMask: DWORD; // mask for alpha channel |
536 | ); |
||
1 | daniel-mar | 537 | 1: ( |
4 | daniel-mar | 538 | dwRGBZBitMask: DWORD; |
539 | ); |
||
1 | daniel-mar | 540 | 2: ( |
4 | daniel-mar | 541 | dwYUVZBitMask: DWORD; |
542 | ); |
||
543 | ); |
||
544 | end; |
||
545 | |||
546 | PDDPixelFormat_DX6 = ^TDDPixelFormat_DX6; |
||
547 | TDDPixelFormat_DX6 = packed record |
||
548 | dwSize: DWORD; // size of structure |
||
549 | dwFlags: DWORD; // pixel format flags |
||
550 | dwFourCC: DWORD; // (FOURCC code) |
||
551 | case Integer of |
||
552 | 1: ( |
||
553 | dwRGBBitCount : DWORD; // how many bits per pixel |
||
554 | dwRBitMask : DWORD; // mask for red bit |
||
555 | dwGBitMask : DWORD; // mask for green bits |
||
556 | dwBBitMask : DWORD; // mask for blue bits |
||
557 | dwRGBAlphaBitMask : DWORD; // mask for alpha channel |
||
558 | ); |
||
559 | 2: ( |
||
560 | dwYUVBitCount : DWORD; // how many bits per pixel |
||
561 | dwYBitMask : DWORD; // mask for Y bits |
||
562 | dwUBitMask : DWORD; // mask for U bits |
||
563 | dwVBitMask : DWORD; // mask for V bits |
||
564 | dwYUVAlphaBitMask : DWORD; // mask for alpha channel |
||
565 | ); |
||
1 | daniel-mar | 566 | 3: ( |
4 | daniel-mar | 567 | dwZBufferBitDepth : DWORD; // how many total bits/pixel in z buffer (including any stencil bits) |
568 | dwStencilBitDepth : DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits) |
||
569 | dwZBitMask : DWORD; // mask for Z bits |
||
570 | dwStencilBitMask : DWORD; // mask for stencil bits |
||
571 | dwLuminanceAlphaBitMask : DWORD;// mask for alpha channel |
||
572 | ); |
||
1 | daniel-mar | 573 | 4: ( |
4 | daniel-mar | 574 | dwAlphaBitDepth : DWORD; // how many bits for alpha channels |
575 | dwLuminanceBitMask : DWORD; // mask for luminance bits |
||
576 | dwBumpDvBitMask : DWORD; // mask for bump map V delta bits |
||
577 | dwBumpLuminanceBitMask : DWORD; // mask for luminance in bump map |
||
578 | dwRGBZBitMask : DWORD; // mask for Z channel |
||
579 | ); |
||
1 | daniel-mar | 580 | 5: ( |
4 | daniel-mar | 581 | dwLuminanceBitCount : DWORD; // how many bits per pixel |
582 | dwBumpDuBitMask : DWORD; // mask for bump map U delta bits |
||
583 | Fill1, Fill2 : DWORD; |
||
584 | dwYUVZBitMask : DWORD; // mask for Z channel |
||
585 | ); |
||
586 | 6: ( dwBumpBitCount : DWORD; // how many bits per "buxel", total |
||
587 | ); |
||
1 | daniel-mar | 588 | end; |
589 | |||
4 | daniel-mar | 590 | TDDPixelFormat_DX3 = TDDPixelFormat_DX5; |
591 | TDDPixelFormat_DX7 = TDDPixelFormat_DX6; |
||
1 | daniel-mar | 592 | |
4 | daniel-mar | 593 | PDDPixelFormat = ^TDDPixelFormat; |
594 | {$IFDEF DIRECTX3} |
||
595 | TDDPixelFormat = TDDPixelFormat_DX3; |
||
596 | {$ELSE} |
||
597 | {$IFDEF DIRECTX5} |
||
598 | TDDPixelFormat = TDDPixelFormat_DX5; |
||
599 | {$ELSE} |
||
600 | {$IFDEF DIRECTX6} |
||
601 | TDDPixelFormat = TDDPixelFormat_DX6; |
||
602 | {$ELSE} |
||
603 | TDDPixelFormat = TDDPixelFormat_DX7; |
||
604 | {$ENDIF} |
||
605 | {$ENDIF} |
||
606 | {$ENDIF} |
||
1 | daniel-mar | 607 | |
4 | daniel-mar | 608 | (* |
609 | * TDDOverlayFX |
||
610 | *) |
||
611 | PDDOverlayFX = ^TDDOverlayFX; |
||
612 | TDDOverlayFX = packed record |
||
1 | daniel-mar | 613 | dwSize: DWORD; // size of structure |
614 | dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend |
||
615 | dwAlphaEdgeBlend: DWORD; // Constant to use as alpha for edge blend |
||
616 | dwReserved: DWORD; |
||
617 | dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination |
||
618 | case Integer of |
||
619 | 0: ( |
||
4 | daniel-mar | 620 | dwAlphaDestConst: DWORD; // Constant to use as alpha channel for dest |
621 | dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source |
||
622 | dwAlphaSrcConst: DWORD; // Constant to use as alpha channel for src |
||
623 | dckDestColorkey: TDDColorKey; // DestColorkey override |
||
624 | dckSrcColorkey: TDDColorKey; // DestColorkey override |
||
625 | dwDDFX: DWORD; // Overlay FX |
||
626 | dwFlags: DWORD; // flags |
||
627 | ); |
||
1 | daniel-mar | 628 | 1: ( |
4 | daniel-mar | 629 | lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as alpha channel for dest |
630 | filler: DWORD; |
||
631 | lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as alpha channel for src |
||
632 | ); |
||
1 | daniel-mar | 633 | end; |
634 | |||
4 | daniel-mar | 635 | (* |
636 | * TDDBltBatch: BltBatch entry structure |
||
637 | *) |
||
1 | daniel-mar | 638 | PDDBltBatch = ^TDDBltBatch; |
4 | daniel-mar | 639 | TDDBltBatch = packed record |
1 | daniel-mar | 640 | lprDest: PRect; |
641 | lpDDSSrc: IDirectDrawSurface; |
||
642 | lprSrc: PRect; |
||
643 | dwFlags: DWORD; |
||
4 | daniel-mar | 644 | lpDDBltFx: TDDBltFX; |
1 | daniel-mar | 645 | end; |
646 | |||
4 | daniel-mar | 647 | (* |
648 | * TDDGammaRamp |
||
649 | *) |
||
1 | daniel-mar | 650 | PDDGammaRamp = ^TDDGammaRamp; |
4 | daniel-mar | 651 | TDDGammaRamp = packed record |
652 | red : array[0..255] of WORD; |
||
653 | green : array[0..255] of WORD; |
||
654 | blue : array[0..255] of WORD; |
||
1 | daniel-mar | 655 | end; |
656 | |||
4 | daniel-mar | 657 | (* |
658 | * This is the structure within which DirectDraw returns data about the current graphics driver and chipset |
||
659 | *) |
||
1 | daniel-mar | 660 | |
661 | PDDDeviceIdentifier = ^TDDDeviceIdentifier; |
||
4 | daniel-mar | 662 | TDDDeviceIdentifier = packed record |
1 | daniel-mar | 663 | // |
664 | // These elements are for presentation to the user only. They should not be used to identify particular |
||
665 | // drivers, since this is unreliable and many different strings may be associated with the same |
||
666 | // device, and the same driver from different vendors. |
||
667 | // |
||
668 | szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char; |
||
669 | szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char; |
||
670 | |||
671 | // |
||
672 | // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons |
||
673 | // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic |
||
674 | // drivers. It is recommended that guidDeviceIdentifier is used for this purpose. |
||
675 | // |
||
676 | // This version has the form: |
||
677 | // wProduct = HIWORD(liDriverVersion.HighPart) |
||
678 | // wVersion = LOWORD(liDriverVersion.HighPart) |
||
679 | // wSubVersion = HIWORD(liDriverVersion.LowPart) |
||
680 | // wBuild = LOWORD(liDriverVersion.LowPart) |
||
681 | // |
||
682 | liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components |
||
683 | |||
684 | // |
||
685 | // These elements can be used to identify particular chipsets. Use with extreme caution. |
||
686 | // dwVendorId Identifies the manufacturer. May be zero if unknown. |
||
687 | // dwDeviceId Identifies the type of chipset. May be zero if unknown. |
||
688 | // dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. |
||
689 | // dwRevision Identifies the revision level of the chipset. May be zero if unknown. |
||
690 | // |
||
691 | dwVendorId: DWORD; |
||
692 | dwDeviceId: DWORD; |
||
693 | dwSubSysId: DWORD; |
||
694 | dwRevision: DWORD; |
||
695 | |||
696 | // |
||
697 | // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the |
||
698 | // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to |
||
699 | // reprofile the graphics subsystem. |
||
700 | // This element can also be used to identify particular problematic drivers. |
||
701 | // |
||
702 | guidDeviceIdentifier: TGUID; |
||
703 | end; |
||
704 | |||
705 | PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2; |
||
4 | daniel-mar | 706 | TDDDeviceIdentifier2 = packed record |
1 | daniel-mar | 707 | // |
708 | // These elements are for presentation to the user only. They should not be used to identify particular |
||
709 | // drivers, since this is unreliable and many different strings may be associated with the same |
||
710 | // device, and the same driver from different vendors. |
||
711 | // |
||
712 | szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char; |
||
713 | szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char; |
||
714 | |||
715 | // |
||
716 | // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons |
||
717 | // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic |
||
718 | // drivers. It is recommended that guidDeviceIdentifier is used for this purpose. |
||
719 | // |
||
720 | // This version has the form: |
||
721 | // wProduct = HIWORD(liDriverVersion.HighPart) |
||
722 | // wVersion = LOWORD(liDriverVersion.HighPart) |
||
723 | // wSubVersion = HIWORD(liDriverVersion.LowPart) |
||
724 | // wBuild = LOWORD(liDriverVersion.LowPart) |
||
725 | // |
||
726 | liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components |
||
727 | |||
728 | // |
||
729 | // These elements can be used to identify particular chipsets. Use with extreme caution. |
||
730 | // dwVendorId Identifies the manufacturer. May be zero if unknown. |
||
731 | // dwDeviceId Identifies the type of chipset. May be zero if unknown. |
||
732 | // dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. |
||
733 | // dwRevision Identifies the revision level of the chipset. May be zero if unknown. |
||
734 | // |
||
735 | dwVendorId: DWORD; |
||
736 | dwDeviceId: DWORD; |
||
737 | dwSubSysId: DWORD; |
||
738 | dwRevision: DWORD; |
||
739 | |||
740 | // |
||
741 | // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the |
||
742 | // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to |
||
743 | // reprofile the graphics subsystem. |
||
744 | // This element can also be used to identify particular problematic drivers. |
||
745 | // |
||
746 | guidDeviceIdentifier: TGUID; |
||
747 | |||
4 | daniel-mar | 748 | (* |
749 | * This element is used to determine the Windows Hardware Quality Lab (WHQL) |
||
750 | * certification level for this driver/device pair. |
||
751 | *) |
||
1 | daniel-mar | 752 | dwWHQLLevel: DWORD; |
753 | end; |
||
754 | |||
4 | daniel-mar | 755 | (* |
756 | * callbacks |
||
757 | *) |
||
1 | daniel-mar | 758 | TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND; |
759 | Code: DWORD; lpContext: Pointer): HResult; stdcall; |
||
760 | TSurfacesStreamingCallback = function(Arg: DWORD): HResult; stdcall; |
||
761 | |||
4 | daniel-mar | 762 | (* |
763 | * TDDSurfaceDesc |
||
764 | *) |
||
765 | PDDSurfaceDesc_DX5 = ^TDDSurfaceDesc_DX5; |
||
766 | TDDSurfaceDesc_DX5 = packed record |
||
767 | dwSize: DWORD; // size of the TDDSurfaceDesc structure |
||
768 | dwFlags: DWORD; // determines what fields are valid |
||
769 | dwHeight: DWORD; // height of surface to be created |
||
770 | dwWidth: DWORD; // width of input surface |
||
771 | case Integer of |
||
772 | 0: ( |
||
773 | dwLinearSize : DWORD; // unused at the moment |
||
774 | ); |
||
775 | 1: ( |
||
776 | lPitch: LongInt; // distance to start of next line (return value only) |
||
777 | dwBackBufferCount: DWORD; // number of back buffers requested |
||
778 | case Integer of |
||
779 | 0: ( |
||
780 | dwMipMapCount: DWORD; // number of mip-map levels requested |
||
781 | dwAlphaBitDepth: DWORD; // depth of alpha buffer requested |
||
782 | dwReserved: DWORD; // reserved |
||
783 | lpSurface: Pointer; // pointer to the associated surface memory |
||
784 | ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use |
||
785 | ddckCKDestBlt: TDDColorKey; // color key for destination blt use |
||
786 | ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use |
||
787 | ddckCKSrcBlt: TDDColorKey; // color key for source blt use |
||
788 | ddpfPixelFormat: TDDPixelFormat_DX5; // pixel format description of the surface |
||
789 | ddsCaps: TDDSCaps; // direct draw surface capabilities |
||
790 | ); |
||
791 | 1: ( |
||
792 | dwZBufferBitDepth: DWORD; // depth of Z buffer requested |
||
793 | ); |
||
794 | 2: ( |
||
795 | dwRefreshRate: DWORD; // refresh rate (used when display mode is described) |
||
796 | ); |
||
797 | ); |
||
798 | end; |
||
1 | daniel-mar | 799 | |
4 | daniel-mar | 800 | PDDSurfaceDesc_DX6 = ^TDDSurfaceDesc_DX6; |
801 | TDDSurfaceDesc_DX6 = packed record |
||
802 | dwSize: DWORD; // size of the TDDSurfaceDesc structure |
||
803 | dwFlags: DWORD; // determines what fields are valid |
||
804 | dwHeight: DWORD; // height of surface to be created |
||
805 | dwWidth: DWORD; // width of input surface |
||
806 | case Integer of |
||
807 | 0: ( |
||
808 | dwLinearSize : DWORD; // unused at the moment |
||
809 | ); |
||
810 | 1: ( |
||
811 | lPitch: LongInt; // distance to start of next line (return value only) |
||
812 | dwBackBufferCount: DWORD; // number of back buffers requested |
||
813 | case Integer of |
||
814 | 0: ( |
||
815 | dwMipMapCount: DWORD; // number of mip-map levels requested |
||
816 | dwAlphaBitDepth: DWORD; // depth of alpha buffer requested |
||
817 | dwReserved: DWORD; // reserved |
||
818 | lpSurface: Pointer; // pointer to the associated surface memory |
||
819 | ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use |
||
820 | ddckCKDestBlt: TDDColorKey; // color key for destination blt use |
||
821 | ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use |
||
822 | ddckCKSrcBlt: TDDColorKey; // color key for source blt use |
||
823 | ddpfPixelFormat: TDDPixelFormat_DX6; // pixel format description of the surface |
||
824 | ddsCaps: TDDSCaps; // direct draw surface capabilities |
||
825 | ); |
||
826 | 1: ( |
||
827 | dwZBufferBitDepth: DWORD; // depth of Z buffer requested |
||
828 | ); |
||
829 | 2: ( |
||
830 | dwRefreshRate: DWORD; // refresh rate (used when display mode is described) |
||
831 | ); |
||
832 | ); |
||
833 | end; |
||
1 | daniel-mar | 834 | |
4 | daniel-mar | 835 | PDDSurfaceDesc = ^TDDSurfaceDesc; |
836 | {$IFDEF DIRECTX5} |
||
837 | TDDSurfaceDesc = TDDSurfaceDesc_DX5; |
||
838 | {$ELSE} |
||
839 | TDDSurfaceDesc = TDDSurfaceDesc_DX6; |
||
840 | {$ENDIF} |
||
1 | daniel-mar | 841 | |
842 | |||
4 | daniel-mar | 843 | (* |
844 | * TDDSurfaceDesc2 |
||
845 | *) |
||
846 | PDDSurfaceDesc2 = ^TDDSurfaceDesc2; |
||
847 | TDDSurfaceDesc2 = packed record |
||
848 | dwSize: DWORD; // size of the TDDSurfaceDesc structure |
||
849 | dwFlags: DWORD; // determines what fields are valid |
||
850 | dwHeight: DWORD; // height of surface to be created |
||
851 | dwWidth: DWORD; // width of input surface |
||
852 | case Integer of |
||
853 | 0: ( |
||
854 | lPitch : LongInt; // distance to start of next line (return value only) |
||
855 | ); |
||
856 | 1: ( |
||
857 | dwLinearSize : DWORD; // Formless late-allocated optimized surface size |
||
858 | dwBackBufferCount: DWORD; // number of back buffers requested |
||
859 | case Integer of |
||
860 | 0: ( |
||
861 | dwMipMapCount: DWORD; // number of mip-map levels requested |
||
862 | dwAlphaBitDepth: DWORD; // depth of alpha buffer requested |
||
863 | dwReserved: DWORD; // reserved |
||
864 | lpSurface: Pointer; // pointer to the associated surface memory |
||
865 | ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use |
||
866 | ddckCKDestBlt: TDDColorKey; // color key for destination blt use |
||
867 | ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use |
||
868 | ddckCKSrcBlt: TDDColorKey; // color key for source blt use |
||
869 | ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface |
||
870 | ddsCaps: TDDSCaps2; // direct draw surface capabilities |
||
871 | dwTextureStage: DWORD; // stage in multitexture cascade |
||
872 | ); |
||
873 | 1: ( |
||
874 | dwRefreshRate: DWORD; // refresh rate (used when display mode is described) |
||
875 | ); |
||
876 | ); |
||
877 | end; |
||
1 | daniel-mar | 878 | |
4 | daniel-mar | 879 | (* |
880 | * TDDOptSurfaceDesc |
||
881 | *) |
||
1 | daniel-mar | 882 | |
4 | daniel-mar | 883 | PDDOptSurfaceDesc = ^TDDOptSurfaceDesc; |
884 | TDDOptSurfaceDesc = packed record |
||
885 | dwSize : DWORD; // size of the DDOPTSURFACEDESC structure |
||
886 | dwFlags : DWORD; // determines what fields are valid |
||
887 | ddSCaps : TDDSCaps2; // Common caps like: Memory type |
||
888 | ddOSCaps : TDDOSCaps; // Common caps like: Memory type |
||
889 | guid : TGUID; // Compression technique GUID |
||
890 | dwCompressionRatio : DWORD; // Compression ratio |
||
891 | end; |
||
892 | |||
893 | (* |
||
894 | * DDCOLORCONTROL |
||
895 | *) |
||
896 | PDDColorControl = ^TDDColorControl; |
||
897 | TDDColorControl = packed record |
||
898 | dwSize: DWORD; |
||
899 | dwFlags: DWORD; |
||
900 | lBrightness: LongInt; |
||
901 | lContrast: LongInt; |
||
902 | lHue: LongInt; |
||
903 | lSaturation: LongInt; |
||
904 | lSharpness: LongInt; |
||
905 | lGamma: LongInt; |
||
906 | lColorEnable: LongInt; |
||
907 | dwReserved1: DWORD; |
||
908 | end; |
||
909 | |||
910 | (* |
||
911 | * callbacks |
||
912 | *) |
||
913 | |||
914 | {$IFNDEF WINNT} |
||
915 | TDDEnumModesCallback = function (const lpDDSurfaceDesc: TDDSurfaceDesc; |
||
916 | lpContext: Pointer) : HResult; stdcall; |
||
917 | TDDEnumModesCallback2 = function (const lpDDSurfaceDesc: TDDSurfaceDesc2; |
||
918 | lpContext: Pointer) : HResult; stdcall; |
||
919 | TDDEnumSurfacesCallback = function (lpDDSurface: IDirectDrawSurface; |
||
920 | const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer) : HResult; stdcall; |
||
921 | TDDEnumSurfacesCallback2 = function (lpDDSurface: IDirectDrawSurface4; |
||
922 | const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer) : HResult; stdcall; |
||
923 | TDDEnumSurfacesCallback7 = function (lpDDSurface: IDirectDrawSurface7; |
||
924 | const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer) : HResult; stdcall; |
||
925 | {$ENDIF} |
||
926 | |||
927 | (* |
||
928 | * INTERACES FOLLOW: |
||
929 | * IDirectDraw |
||
930 | * IDirectDrawClipper |
||
931 | * IDirectDrawPalette |
||
932 | * IDirectDrawSurface |
||
933 | *) |
||
934 | |||
935 | (* |
||
936 | * IDirectDraw |
||
937 | *) |
||
938 | |||
939 | IDirectDraw = interface (IUnknown) |
||
1 | daniel-mar | 940 | ['{6C14DB80-A733-11CE-A521-0020AF0BE560}'] |
4 | daniel-mar | 941 | (*** IDirectDraw methods ***) |
1 | daniel-mar | 942 | function Compact: HResult; stdcall; |
4 | daniel-mar | 943 | function CreateClipper (dwFlags: DWORD; |
944 | out lplpDDClipper: IDirectDrawClipper; |
||
945 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
946 | function CreatePalette (dwFlags: DWORD; lpColorTable: pointer; |
||
947 | out lplpDDPalette: IDirectDrawPalette; |
||
948 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
949 | function CreateSurface (var lpDDSurfaceDesc: TDDSurfaceDesc; |
||
950 | out lplpDDSurface: IDirectDrawSurface; |
||
951 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
952 | function DuplicateSurface (lpDDSurface: IDirectDrawSurface; |
||
953 | out lplpDupDDSurface: IDirectDrawSurface) : HResult; stdcall; |
||
954 | function EnumDisplayModes (dwFlags: DWORD; |
||
955 | lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer; |
||
956 | lpEnumModesCallback: TDDEnumModesCallback) : HResult; stdcall; |
||
957 | function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc; |
||
958 | lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) : |
||
959 | HResult; stdcall; |
||
1 | daniel-mar | 960 | function FlipToGDISurface: HResult; stdcall; |
4 | daniel-mar | 961 | function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall; |
962 | function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
963 | function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall; |
||
964 | function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface) : |
||
965 | HResult; stdcall; |
||
966 | function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall; |
||
967 | function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall; |
||
968 | function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall; |
||
969 | function Initialize (lpGUID: PGUID) : HResult; stdcall; |
||
1 | daniel-mar | 970 | function RestoreDisplayMode: HResult; stdcall; |
4 | daniel-mar | 971 | function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall; |
972 | (*** Warning! SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***) |
||
973 | function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; |
||
974 | dwBpp: DWORD) : HResult; stdcall; |
||
975 | function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) : |
||
976 | HResult; stdcall; |
||
1 | daniel-mar | 977 | end; |
978 | |||
4 | daniel-mar | 979 | IDirectDraw2 = interface (IUnknown) |
1 | daniel-mar | 980 | ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}'] |
4 | daniel-mar | 981 | (*** IDirectDraw methods ***) |
1 | daniel-mar | 982 | function Compact: HResult; stdcall; |
4 | daniel-mar | 983 | function CreateClipper (dwFlags: DWORD; |
984 | out lplpDDClipper: IDirectDrawClipper; |
||
985 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
986 | function CreatePalette (dwFlags: DWORD; lpColorTable: pointer; |
||
987 | out lplpDDPalette: IDirectDrawPalette; |
||
988 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
989 | function CreateSurface (var lpDDSurfaceDesc: TDDSurfaceDesc; |
||
990 | out lplpDDSurface: IDirectDrawSurface; |
||
991 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
992 | function DuplicateSurface (lpDDSurface: IDirectDrawSurface; |
||
993 | out lplpDupDDSurface: IDirectDrawSurface) : HResult; stdcall; |
||
994 | function EnumDisplayModes (dwFlags: DWORD; |
||
995 | lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer; |
||
996 | lpEnumModesCallback: TDDEnumModesCallback) : HResult; stdcall; |
||
997 | function EnumSurfaces (dwFlags: DWORD; var lpDDSD: TDDSurfaceDesc; |
||
998 | lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) : |
||
999 | HResult; stdcall; |
||
1 | daniel-mar | 1000 | function FlipToGDISurface: HResult; stdcall; |
4 | daniel-mar | 1001 | function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall; |
1002 | function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
1003 | function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall; |
||
1004 | function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface) : HResult; stdcall; |
||
1005 | function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall; |
||
1006 | function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall; |
||
1007 | function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall; |
||
1008 | function Initialize (lpGUID: PGUID) : HResult; stdcall; |
||
1 | daniel-mar | 1009 | function RestoreDisplayMode: HResult; stdcall; |
4 | daniel-mar | 1010 | function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall; |
1011 | (*** Warning! SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***) |
||
1012 | function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; |
||
1013 | dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall; |
||
1014 | function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) : |
||
1015 | HResult; stdcall; |
||
1016 | (*** Added in the v2 interface ***) |
||
1017 | function GetAvailableVidMem (var lpDDSCaps: TDDSCaps; |
||
1018 | out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall; |
||
1 | daniel-mar | 1019 | end; |
1020 | |||
4 | daniel-mar | 1021 | IDirectDraw4 = interface (IUnknown) |
1022 | ['{9c59509a-39bd-11d1-8c4a-00c04fd930c5}'] |
||
1023 | (*** IDirectDraw methods ***) |
||
1 | daniel-mar | 1024 | function Compact: HResult; stdcall; |
4 | daniel-mar | 1025 | function CreateClipper (dwFlags: DWORD; |
1026 | out lplpDDClipper: IDirectDrawClipper; |
||
1027 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
1028 | function CreatePalette (dwFlags: DWORD; lpColorTable: pointer; |
||
1029 | out lplpDDPalette: IDirectDrawPalette; |
||
1030 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
1031 | function CreateSurface (const lpDDSurfaceDesc: TDDSurfaceDesc2; |
||
1032 | out lplpDDSurface: IDirectDrawSurface4; |
||
1033 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
1034 | function DuplicateSurface (lpDDSurface: IDirectDrawSurface4; |
||
1035 | out lplpDupDDSurface: IDirectDrawSurface4) : HResult; stdcall; |
||
1036 | function EnumDisplayModes (dwFlags: DWORD; |
||
1037 | lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer; |
||
1038 | lpEnumModesCallback: TDDEnumModesCallback2) : HResult; stdcall; |
||
1039 | function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2; |
||
1040 | lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback2) : |
||
1041 | HResult; stdcall; |
||
1 | daniel-mar | 1042 | function FlipToGDISurface: HResult; stdcall; |
4 | daniel-mar | 1043 | function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall; |
1044 | function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall; |
||
1045 | function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall; |
||
1046 | function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface4) : |
||
1047 | HResult; stdcall; |
||
1048 | function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall; |
||
1049 | function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall; |
||
1050 | function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall; |
||
1051 | function Initialize (lpGUID: PGUID) : HResult; stdcall; |
||
1 | daniel-mar | 1052 | function RestoreDisplayMode: HResult; stdcall; |
4 | daniel-mar | 1053 | function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall; |
1054 | (*** Warning! SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***) |
||
1055 | function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; |
||
1056 | dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall; |
||
1057 | function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) : |
||
1058 | HResult; stdcall; |
||
1059 | (*** Added in the v2 interface ***) |
||
1060 | function GetAvailableVidMem (const lpDDSCaps: TDDSCaps2; |
||
1061 | out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall; |
||
1062 | (*** Added in the V4 Interface ***) |
||
1063 | function GetSurfaceFromDC (hdc : Windows.HDC; |
||
1064 | out lpDDS4: IDirectDrawSurface4) : HResult; stdcall; |
||
1065 | function RestoreAllSurfaces : HResult; stdcall; |
||
1066 | function TestCooperativeLevel : HResult; stdcall; |
||
1067 | function GetDeviceIdentifier (out lpdddi: TDDDeviceIdentifier; |
||
1068 | dwFlags: DWORD) : HResult; stdcall; |
||
1 | daniel-mar | 1069 | end; |
1070 | |||
4 | daniel-mar | 1071 | IDirectDraw7 = interface (IUnknown) |
1072 | ['{15e65ec0-3b9c-11d2-b92f-00609797ea5b}'] |
||
1073 | (*** IDirectDraw methods ***) |
||
1 | daniel-mar | 1074 | function Compact: HResult; stdcall; |
4 | daniel-mar | 1075 | function CreateClipper (dwFlags: DWORD; |
1076 | out lplpDDClipper: IDirectDrawClipper; |
||
1077 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
1078 | function CreatePalette (dwFlags: DWORD; lpColorTable: pointer; |
||
1079 | out lplpDDPalette: IDirectDrawPalette; |
||
1080 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
1081 | function CreateSurface (const lpDDSurfaceDesc: TDDSurfaceDesc2; |
||
1082 | out lplpDDSurface: IDirectDrawSurface7; |
||
1083 | pUnkOuter: IUnknown) : HResult; stdcall; |
||
1084 | function DuplicateSurface (lpDDSurface: IDirectDrawSurface7; |
||
1085 | out lplpDupDDSurface: IDirectDrawSurface7) : HResult; stdcall; |
||
1086 | function EnumDisplayModes (dwFlags: DWORD; |
||
1087 | lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer; |
||
1088 | lpEnumModesCallback: TDDEnumModesCallback2) : HResult; stdcall; |
||
1089 | function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2; |
||
1090 | lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback7) : |
||
1091 | HResult; stdcall; |
||
1 | daniel-mar | 1092 | function FlipToGDISurface: HResult; stdcall; |
4 | daniel-mar | 1093 | function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall; |
1094 | function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall; |
||
1095 | function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall; |
||
1096 | function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface7) : |
||
1097 | HResult; stdcall; |
||
1098 | function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall; |
||
1099 | function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall; |
||
1100 | function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall; |
||
1101 | function Initialize (lpGUID: PGUID) : HResult; stdcall; |
||
1 | daniel-mar | 1102 | function RestoreDisplayMode: HResult; stdcall; |
4 | daniel-mar | 1103 | function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall; |
1104 | function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; |
||
1105 | dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall; |
||
1106 | function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) : |
||
1107 | HResult; stdcall; |
||
1108 | (*** Added in the v2 interface ***) |
||
1109 | function GetAvailableVidMem (const lpDDSCaps: TDDSCaps2; |
||
1110 | out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall; |
||
1111 | (*** Added in the V4 Interface ***) |
||
1112 | function GetSurfaceFromDC (hdc : Windows.HDC; |
||
1113 | out lpDDS: IDirectDrawSurface7) : HResult; stdcall; |
||
1114 | function RestoreAllSurfaces : HResult; stdcall; |
||
1115 | function TestCooperativeLevel : HResult; stdcall; |
||
1116 | function GetDeviceIdentifier (out lpdddi: TDDDeviceIdentifier2; |
||
1117 | dwFlags: DWORD) : HResult; stdcall; |
||
1118 | function StartModeTest(const lpModesToTest; dwNumEntries, dwFlags: DWORD) : HResult; stdcall; |
||
1119 | function EvaluateMode(dwFlags: DWORD; out pSecondsUntilTimeout: DWORD) : HResult; stdcall; |
||
1 | daniel-mar | 1120 | end; |
1121 | |||
1122 | |||
4 | daniel-mar | 1123 | |
1124 | (* |
||
1125 | * IDirectDrawPalette |
||
1126 | *) |
||
1127 | |||
1128 | IDirectDrawPalette = interface (IUnknown) |
||
1 | daniel-mar | 1129 | ['{6C14DB84-A733-11CE-A521-0020AF0BE560}'] |
4 | daniel-mar | 1130 | (*** IDirectDrawPalette methods ***) |
1131 | function GetCaps (out lpdwCaps: DWORD) : HResult; stdcall; |
||
1132 | function GetEntries (dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD; |
||
1133 | lpEntries: pointer) : HResult; stdcall; |
||
1134 | function Initialize (lpDD: IDirectDraw; dwFlags: DWORD; |
||
1135 | lpDDColorTable: pointer) : HResult; stdcall; |
||
1136 | function SetEntries (dwFlags: DWORD; dwStartingEntry: DWORD; |
||
1137 | dwCount: DWORD; lpEntries: pointer) : HResult; stdcall; |
||
1 | daniel-mar | 1138 | end; |
1139 | |||
4 | daniel-mar | 1140 | (* |
1141 | * IDirectDrawClipper |
||
1142 | *) |
||
1 | daniel-mar | 1143 | |
4 | daniel-mar | 1144 | IDirectDrawClipper = interface (IUnknown) |
1 | daniel-mar | 1145 | ['{6C14DB85-A733-11CE-A521-0020AF0BE560}'] |
4 | daniel-mar | 1146 | (*** IDirectDrawClipper methods ***) |
1147 | function GetClipList (lpRect: PRect; lpClipList: PRgnData; |
||
1148 | var lpdwSize: DWORD) : HResult; stdcall; |
||
1149 | function GetHWnd (out lphWnd: HWND) : HResult; stdcall; |
||
1150 | function Initialize (lpDD: IDirectDraw; dwFlags: DWORD) : HResult; stdcall; |
||
1151 | function IsClipListChanged (out lpbChanged: BOOL) : HResult; stdcall; |
||
1152 | function SetClipList (lpClipList: PRgnData; dwFlags: DWORD) : HResult; stdcall; |
||
1153 | function SetHWnd (dwFlags: DWORD; hWnd: HWND) : HResult; stdcall; |
||
1 | daniel-mar | 1154 | end; |
1155 | |||
4 | daniel-mar | 1156 | (* |
1157 | * IDirectDrawSurface and related interfaces |
||
1158 | *) |
||
1 | daniel-mar | 1159 | |
4 | daniel-mar | 1160 | IDirectDrawSurface = interface (IUnknown) |
1 | daniel-mar | 1161 | ['{6C14DB81-A733-11CE-A521-0020AF0BE560}'] |
4 | daniel-mar | 1162 | (*** IDirectDrawSurface methods ***) |
1163 | function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface) : |
||
1164 | HResult; stdcall; |
||
1165 | function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall; |
||
1166 | function Blt (lpDestRect: PRect; |
||
1167 | lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect; |
||
1168 | dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall; |
||
1169 | function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; |
||
1170 | dwFlags: DWORD) : HResult; stdcall; |
||
1171 | function BltFast (dwX: DWORD; dwY: DWORD; |
||
1172 | lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect; |
||
1173 | dwTrans: DWORD) : HResult; stdcall; |
||
1174 | function DeleteAttachedSurface (dwFlags: DWORD; |
||
1175 | lpDDSAttachedSurface: IDirectDrawSurface) : HResult; stdcall; |
||
1176 | function EnumAttachedSurfaces (lpContext: Pointer; |
||
1177 | lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall; |
||
1178 | function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer; |
||
1179 | lpfnCallback: TDDEnumSurfacesCallback) : HResult; stdcall; |
||
1180 | function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface; |
||
1181 | dwFlags: DWORD) : HResult; stdcall; |
||
1182 | function GetAttachedSurface (var lpDDSCaps: TDDSCaps; |
||
1183 | (*out*)var lplpDDAttachedSurface: IDirectDrawSurface) : HResult; stdcall; |
||
1184 | function GetBltStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1185 | function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall; |
||
1186 | function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1187 | function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : |
||
1188 | HResult; stdcall; |
||
1189 | function GetDC (out lphDC: HDC) : HResult; stdcall; |
||
1190 | function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1191 | function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall; |
||
1192 | function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1193 | function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall; |
||
1194 | function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
1195 | function Initialize (lpDD: IDirectDraw; |
||
1196 | out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
1 | daniel-mar | 1197 | function IsLost: HResult; stdcall; |
4 | daniel-mar | 1198 | function Lock (lpDestRect: PRect; out lpDDSurfaceDesc: |
1199 | TDDSurfaceDesc; dwFlags: DWORD; hEvent: THandle) : HResult; stdcall; |
||
1200 | function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall; |
||
1201 | function _Restore: HResult; stdcall; |
||
1202 | function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1203 | function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) : |
||
1204 | HResult; stdcall; |
||
1205 | function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall; |
||
1206 | function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1207 | function Unlock (lpSurfaceData: Pointer) : HResult; stdcall; |
||
1208 | function UpdateOverlay (lpSrcRect: PRect; |
||
1209 | lpDDDestSurface: IDirectDrawSurface; lpDestRect: PRect; |
||
1210 | dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall; |
||
1211 | function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall; |
||
1212 | function UpdateOverlayZOrder (dwFlags: DWORD; |
||
1213 | lpDDSReference: IDirectDrawSurface) : HResult; stdcall; |
||
1 | daniel-mar | 1214 | end; |
1215 | |||
4 | daniel-mar | 1216 | (* |
1217 | * IDirectDrawSurface2 and related interfaces |
||
1218 | *) |
||
1 | daniel-mar | 1219 | |
4 | daniel-mar | 1220 | IDirectDrawSurface2 = interface (IUnknown) |
1221 | ['{57805885-6eec-11cf-9441-a82303c10e27}'] |
||
1222 | (*** IDirectDrawSurface methods ***) |
||
1223 | function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface2) : |
||
1224 | HResult; stdcall; |
||
1225 | function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall; |
||
1226 | function Blt (lpDestRect: PRect; |
||
1227 | lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect; |
||
1228 | dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall; |
||
1229 | function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; |
||
1230 | dwFlags: DWORD) : HResult; stdcall; |
||
1231 | function BltFast (dwX: DWORD; dwY: DWORD; |
||
1232 | lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect; |
||
1233 | dwTrans: DWORD) : HResult; stdcall; |
||
1234 | function DeleteAttachedSurface (dwFlags: DWORD; |
||
1235 | lpDDSAttachedSurface: IDirectDrawSurface2) : HResult; stdcall; |
||
1236 | function EnumAttachedSurfaces (lpContext: Pointer; |
||
1237 | lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall; |
||
1238 | function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer; |
||
1239 | lpfnCallback: TDDEnumSurfacesCallback) : HResult; stdcall; |
||
1240 | function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface2; |
||
1241 | dwFlags: DWORD) : HResult; stdcall; |
||
1242 | function GetAttachedSurface (var lpDDSCaps: TDDSCaps; |
||
1243 | out lplpDDAttachedSurface: IDirectDrawSurface2) : HResult; stdcall; |
||
1244 | function GetBltStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1245 | function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall; |
||
1246 | function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1247 | function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : |
||
1248 | HResult; stdcall; |
||
1249 | function GetDC (out lphDC: HDC) : HResult; stdcall; |
||
1250 | function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1251 | function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall; |
||
1252 | function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1253 | function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall; |
||
1254 | function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
1255 | function Initialize (lpDD: IDirectDraw; |
||
1256 | out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
1 | daniel-mar | 1257 | function IsLost: HResult; stdcall; |
4 | daniel-mar | 1258 | function Lock (lpDestRect: PRect; |
1259 | out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD; |
||
1260 | hEvent: THandle) : HResult; stdcall; |
||
1261 | function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall; |
||
1262 | function _Restore: HResult; stdcall; |
||
1263 | function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1264 | function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) : |
||
1265 | HResult; stdcall; |
||
1266 | function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall; |
||
1267 | function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1268 | function Unlock (lpSurfaceData: Pointer) : HResult; stdcall; |
||
1269 | function UpdateOverlay (lpSrcRect: PRect; |
||
1270 | lpDDDestSurface: IDirectDrawSurface2; lpDestRect: PRect; |
||
1271 | dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall; |
||
1272 | function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall; |
||
1273 | function UpdateOverlayZOrder (dwFlags: DWORD; |
||
1274 | lpDDSReference: IDirectDrawSurface2) : HResult; stdcall; |
||
1275 | (*** Added in the v2 interface ***) |
||
1276 | function GetDDInterface (var lplpDD: IDirectDraw) : HResult; stdcall; |
||
1277 | function PageLock (dwFlags: DWORD) : HResult; stdcall; |
||
1278 | function PageUnlock (dwFlags: DWORD) : HResult; stdcall; |
||
1 | daniel-mar | 1279 | end; |
1280 | |||
4 | daniel-mar | 1281 | IDirectDrawSurface3 = interface (IUnknown) |
1 | daniel-mar | 1282 | ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}'] |
4 | daniel-mar | 1283 | (*** IDirectDrawSurface methods ***) |
1284 | function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface3) : |
||
1285 | HResult; stdcall; |
||
1286 | function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall; |
||
1287 | function Blt (lpDestRect: PRect; |
||
1288 | lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect; |
||
1289 | dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall; |
||
1290 | function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; |
||
1291 | dwFlags: DWORD) : HResult; stdcall; |
||
1292 | function BltFast (dwX: DWORD; dwY: DWORD; |
||
1293 | lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect; |
||
1294 | dwTrans: DWORD) : HResult; stdcall; |
||
1295 | function DeleteAttachedSurface (dwFlags: DWORD; |
||
1296 | lpDDSAttachedSurface: IDirectDrawSurface3) : HResult; stdcall; |
||
1297 | function EnumAttachedSurfaces (lpContext: Pointer; |
||
1298 | lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall; |
||
1299 | function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer; |
||
1300 | lpfnCallback: TDDEnumSurfacesCallback) : HResult; stdcall; |
||
1301 | function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface3; |
||
1302 | dwFlags: DWORD) : HResult; stdcall; |
||
1303 | function GetAttachedSurface (var lpDDSCaps: TDDSCaps; |
||
1304 | out lplpDDAttachedSurface: IDirectDrawSurface3) : HResult; stdcall; |
||
1305 | function GetBltStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1306 | function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall; |
||
1307 | function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1308 | function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : |
||
1309 | HResult; stdcall; |
||
1310 | function GetDC (out lphDC: HDC) : HResult; stdcall; |
||
1311 | function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1312 | function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall; |
||
1313 | function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1314 | function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall; |
||
1315 | function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
1316 | function Initialize (lpDD: IDirectDraw; |
||
1317 | out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall; |
||
1 | daniel-mar | 1318 | function IsLost: HResult; stdcall; |
4 | daniel-mar | 1319 | function Lock (lpDestRect: PRect; |
1320 | out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD; |
||
1321 | hEvent: THandle) : HResult; stdcall; |
||
1322 | function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall; |
||
1323 | function _Restore: HResult; stdcall; |
||
1324 | function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1325 | function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) : |
||
1326 | HResult; stdcall; |
||
1327 | function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall; |
||
1328 | function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1329 | function Unlock (lpSurfaceData: Pointer) : HResult; stdcall; |
||
1330 | function UpdateOverlay (lpSrcRect: PRect; |
||
1331 | lpDDDestSurface: IDirectDrawSurface3; lpDestRect: PRect; |
||
1332 | dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall; |
||
1333 | function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall; |
||
1334 | function UpdateOverlayZOrder (dwFlags: DWORD; |
||
1335 | lpDDSReference: IDirectDrawSurface3) : HResult; stdcall; |
||
1336 | (*** Added in the v2 interface ***) |
||
1337 | function GetDDInterface (out lplpDD: IDirectDraw) : HResult; stdcall; |
||
1338 | function PageLock (dwFlags: DWORD) : HResult; stdcall; |
||
1339 | function PageUnlock (dwFlags: DWORD) : HResult; stdcall; |
||
1340 | (*** Added in the V3 interface ***) |
||
1341 | function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc; dwFlags: DWORD) : HResult; stdcall; |
||
1 | daniel-mar | 1342 | end; |
1343 | |||
4 | daniel-mar | 1344 | (* |
1345 | * IDirectDrawSurface4 and related interfaces |
||
1346 | *) |
||
1347 | IDirectDrawSurface4 = interface (IUnknown) |
||
1 | daniel-mar | 1348 | ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}'] |
4 | daniel-mar | 1349 | (*** IDirectDrawSurface methods ***) |
1350 | function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface4) : |
||
1351 | HResult; stdcall; |
||
1352 | function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall; |
||
1353 | function Blt (lpDestRect: PRect; |
||
1354 | lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect; |
||
1355 | dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall; |
||
1356 | function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; |
||
1357 | dwFlags: DWORD) : HResult; stdcall; |
||
1358 | function BltFast (dwX: DWORD; dwY: DWORD; |
||
1359 | lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect; |
||
1360 | dwTrans: DWORD) : HResult; stdcall; |
||
1361 | function DeleteAttachedSurface (dwFlags: DWORD; |
||
1362 | lpDDSAttachedSurface: IDirectDrawSurface4) : HResult; stdcall; |
||
1363 | function EnumAttachedSurfaces (lpContext: Pointer; |
||
1364 | lpEnumSurfacesCallback: TDDEnumSurfacesCallback2) : HResult; stdcall; |
||
1365 | function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer; |
||
1366 | lpfnCallback: TDDEnumSurfacesCallback2) : HResult; stdcall; |
||
1367 | function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface4; |
||
1368 | dwFlags: DWORD) : HResult; stdcall; |
||
1369 | function GetAttachedSurface (const lpDDSCaps: TDDSCaps2; |
||
1370 | out lplpDDAttachedSurface: IDirectDrawSurface4) : HResult; stdcall; |
||
1371 | function GetBltStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1372 | function GetCaps (out lpDDSCaps: TDDSCaps2) : HResult; stdcall; |
||
1373 | function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1374 | function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : |
||
1375 | HResult; stdcall; |
||
1376 | function GetDC (out lphDC: HDC) : HResult; stdcall; |
||
1377 | function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1378 | function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall; |
||
1379 | function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1380 | function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall; |
||
1381 | function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall; |
||
1382 | function Initialize (lpDD: IDirectDraw; |
||
1383 | out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall; |
||
1 | daniel-mar | 1384 | function IsLost: HResult; stdcall; |
4 | daniel-mar | 1385 | function Lock (lpDestRect: PRect; |
1386 | out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD; |
||
1387 | hEvent: THandle) : HResult; stdcall; |
||
1388 | function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall; |
||
1389 | function _Restore: HResult; stdcall; |
||
1390 | function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1391 | function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) : |
||
1392 | HResult; stdcall; |
||
1393 | function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall; |
||
1394 | function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1395 | function Unlock (lpRect: PRect) : HResult; stdcall; |
||
1396 | function UpdateOverlay (lpSrcRect: PRect; |
||
1397 | lpDDDestSurface: IDirectDrawSurface4; lpDestRect: PRect; |
||
1398 | dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall; |
||
1399 | function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall; |
||
1400 | function UpdateOverlayZOrder (dwFlags: DWORD; |
||
1401 | lpDDSReference: IDirectDrawSurface4) : HResult; stdcall; |
||
1402 | (*** Added in the v2 interface ***) |
||
1403 | function GetDDInterface (out lplpDD: IUnknown) : HResult; stdcall; |
||
1404 | function PageLock (dwFlags: DWORD) : HResult; stdcall; |
||
1405 | function PageUnlock (dwFlags: DWORD) : HResult; stdcall; |
||
1406 | (*** Added in the V3 interface ***) |
||
1407 | function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD) : HResult; stdcall; |
||
1408 | (*** Added in the v4 interface ***) |
||
1409 | function SetPrivateData(const guidTag: TGUID; lpData: pointer; |
||
1410 | cbSize: DWORD; dwFlags: DWORD) : HResult; stdcall; |
||
1411 | function GetPrivateData(const guidTag: TGUID; lpBuffer: pointer; |
||
1412 | var lpcbBufferSize: DWORD) : HResult; stdcall; |
||
1413 | function FreePrivateData(const guidTag: TGUID) : HResult; stdcall; |
||
1414 | function GetUniquenessValue(out lpValue: DWORD) : HResult; stdcall; |
||
1415 | function ChangeUniquenessValue : HResult; stdcall; |
||
1 | daniel-mar | 1416 | end; |
1417 | |||
4 | daniel-mar | 1418 | IDirectDrawSurface7 = interface (IUnknown) |
1419 | ['{06675a80-3b9b-11d2-b92f-00609797ea5b}'] |
||
1420 | (*** IDirectDrawSurface methods ***) |
||
1421 | function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface7) : |
||
1422 | HResult; stdcall; |
||
1423 | function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall; |
||
1424 | function Blt (lpDestRect: PRect; |
||
1425 | lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect; |
||
1426 | dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall; |
||
1427 | function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; |
||
1428 | dwFlags: DWORD) : HResult; stdcall; |
||
1429 | function BltFast (dwX: DWORD; dwY: DWORD; |
||
1430 | lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect; |
||
1431 | dwTrans: DWORD) : HResult; stdcall; |
||
1432 | function DeleteAttachedSurface (dwFlags: DWORD; |
||
1433 | lpDDSAttachedSurface: IDirectDrawSurface7) : HResult; stdcall; |
||
1434 | function EnumAttachedSurfaces (lpContext: Pointer; |
||
1435 | lpEnumSurfacesCallback: TDDEnumSurfacesCallback7) : HResult; stdcall; |
||
1436 | function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer; |
||
1437 | lpfnCallback: TDDEnumSurfacesCallback7) : HResult; stdcall; |
||
1438 | function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface7; |
||
1439 | dwFlags: DWORD) : HResult; stdcall; |
||
1440 | function GetAttachedSurface (const lpDDSCaps: TDDSCaps2; |
||
1441 | out lplpDDAttachedSurface: IDirectDrawSurface7) : HResult; stdcall; |
||
1442 | function GetBltStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1443 | function GetCaps (out lpDDSCaps: TDDSCaps2) : HResult; stdcall; |
||
1444 | function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1445 | function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : |
||
1446 | HResult; stdcall; |
||
1447 | function GetDC (out lphDC: HDC) : HResult; stdcall; |
||
1448 | function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall; |
||
1449 | function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall; |
||
1450 | function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1451 | function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall; |
||
1452 | function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall; |
||
1453 | function Initialize (lpDD: IDirectDraw; |
||
1454 | out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall; |
||
1 | daniel-mar | 1455 | function IsLost: HResult; stdcall; |
4 | daniel-mar | 1456 | function Lock (lpDestRect: PRect; |
1457 | out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD; |
||
1458 | hEvent: THandle) : HResult; stdcall; |
||
1459 | function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall; |
||
1460 | function _Restore: HResult; stdcall; |
||
1461 | function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall; |
||
1462 | function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) : |
||
1463 | HResult; stdcall; |
||
1464 | function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall; |
||
1465 | function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall; |
||
1466 | function Unlock (lpRect: PRect) : HResult; stdcall; |
||
1467 | function UpdateOverlay (lpSrcRect: PRect; |
||
1468 | lpDDDestSurface: IDirectDrawSurface7; lpDestRect: PRect; |
||
1469 | dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall; |
||
1470 | function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall; |
||
1471 | function UpdateOverlayZOrder (dwFlags: DWORD; |
||
1472 | lpDDSReference: IDirectDrawSurface7) : HResult; stdcall; |
||
1473 | (*** Added in the v2 interface ***) |
||
1474 | function GetDDInterface (out lplpDD: IUnknown) : HResult; stdcall; |
||
1475 | function PageLock (dwFlags: DWORD) : HResult; stdcall; |
||
1476 | function PageUnlock (dwFlags: DWORD) : HResult; stdcall; |
||
1477 | (*** Added in the V3 interface ***) |
||
1478 | function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD) : HResult; stdcall; |
||
1479 | (*** Added in the v4 interface ***) |
||
1480 | function SetPrivateData(const guidTag: TGUID; lpData: pointer; |
||
1481 | cbSize: DWORD; dwFlags: DWORD) : HResult; stdcall; |
||
1482 | function GetPrivateData(const guidTag: TGUID; lpBuffer: pointer; |
||
1483 | var lpcbBufferSize: DWORD) : HResult; stdcall; |
||
1484 | function FreePrivateData(const guidTag: TGUID) : HResult; stdcall; |
||
1485 | function GetUniquenessValue(out lpValue: DWORD) : HResult; stdcall; |
||
1486 | function ChangeUniquenessValue : HResult; stdcall; |
||
1487 | (*** Moved Texture7 methods here ***) |
||
1488 | function SetPriority(dwPriority: DWORD) : HResult; stdcall; |
||
1489 | function GetPriority(out lpdwPriority: DWORD) : HResult; stdcall; |
||
1490 | function SetLOD(dwMaxLOD: DWORD) : HResult; stdcall; |
||
1491 | function GetLOD(out lpdwMaxLOD: DWORD) : HResult; stdcall; |
||
1 | daniel-mar | 1492 | end; |
1493 | |||
4 | daniel-mar | 1494 | IDirectDrawColorControl = interface (IUnknown) |
1 | daniel-mar | 1495 | ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}'] |
4 | daniel-mar | 1496 | function GetColorControls(out lpColorControl: TDDColorControl) : HResult; stdcall; |
1497 | function SetColorControls(const lpColorControl: TDDColorControl) : HResult; stdcall; |
||
1 | daniel-mar | 1498 | end; |
1499 | |||
4 | daniel-mar | 1500 | (* |
1501 | * IDirectDrawGammaControl |
||
1502 | *) |
||
1503 | IDirectDrawGammaControl = interface (IUnknown) |
||
1 | daniel-mar | 1504 | ['{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}'] |
4 | daniel-mar | 1505 | function GetGammaRamp (dwFlags: DWORD; out lpRampData: TDDGammaRamp) |
1506 | : HResult; stdcall; |
||
1507 | function SetGammaRamp (dwFlags: DWORD; const lpRampData: TDDGammaRamp) |
||
1508 | : HResult; stdcall; |
||
1 | daniel-mar | 1509 | end; |
1510 | |||
4 | daniel-mar | 1511 | type |
1512 | IID_IDirectDraw = IDirectDraw; |
||
1513 | IID_IDirectDraw2 = IDirectDraw2; |
||
1514 | IID_IDirectDraw4 = IDirectDraw4; |
||
1515 | IID_IDirectDraw7 = IDirectDraw7; |
||
1516 | IID_IDirectDrawSurface = IDirectDrawSurface; |
||
1517 | IID_IDirectDrawSurface2 = IDirectDrawSurface2; |
||
1518 | IID_IDirectDrawSurface3 = IDirectDrawSurface3; |
||
1519 | IID_IDirectDrawSurface4 = IDirectDrawSurface4; |
||
1520 | IID_IDirectDrawSurface7 = IDirectDrawSurface7; |
||
1 | daniel-mar | 1521 | |
4 | daniel-mar | 1522 | IID_IDirectDrawPalette = IDirectDrawPalette; |
1523 | IID_IDirectDrawClipper = IDirectDrawClipper; |
||
1524 | IID_IDirectDrawColorControl = IDirectDrawColorControl; |
||
1525 | IID_IDirectDrawGammaControl = IDirectDrawGammaControl; |
||
1 | daniel-mar | 1526 | |
4 | daniel-mar | 1527 | const |
1528 | (* |
||
1529 | * ddsCaps field is valid. |
||
1530 | *) |
||
1 | daniel-mar | 1531 | DDSD_CAPS = $00000001; // default |
4 | daniel-mar | 1532 | |
1533 | (* |
||
1534 | * dwHeight field is valid. |
||
1535 | *) |
||
1 | daniel-mar | 1536 | DDSD_HEIGHT = $00000002; |
4 | daniel-mar | 1537 | |
1538 | (* |
||
1539 | * dwWidth field is valid. |
||
1540 | *) |
||
1 | daniel-mar | 1541 | DDSD_WIDTH = $00000004; |
4 | daniel-mar | 1542 | |
1543 | (* |
||
1544 | * lPitch is valid. |
||
1545 | *) |
||
1 | daniel-mar | 1546 | DDSD_PITCH = $00000008; |
4 | daniel-mar | 1547 | |
1548 | (* |
||
1549 | * dwBackBufferCount is valid. |
||
1550 | *) |
||
1 | daniel-mar | 1551 | DDSD_BACKBUFFERCOUNT = $00000020; |
4 | daniel-mar | 1552 | |
1553 | (* |
||
1554 | * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2) |
||
1555 | *) |
||
1 | daniel-mar | 1556 | DDSD_ZBUFFERBITDEPTH = $00000040; |
4 | daniel-mar | 1557 | |
1558 | (* |
||
1559 | * dwAlphaBitDepth is valid. |
||
1560 | *) |
||
1561 | DDSD_ALPHABITDEPTH = $00000080; |
||
1562 | |||
1563 | (* |
||
1564 | * lpSurface is valid. |
||
1565 | *) |
||
1566 | DDSD_LPSURFACE = $00000800; |
||
1567 | |||
1568 | (* |
||
1569 | * ddpfPixelFormat is valid. |
||
1570 | *) |
||
1 | daniel-mar | 1571 | DDSD_PIXELFORMAT = $00001000; |
4 | daniel-mar | 1572 | |
1573 | (* |
||
1574 | * ddckCKDestOverlay is valid. |
||
1575 | *) |
||
1 | daniel-mar | 1576 | DDSD_CKDESTOVERLAY = $00002000; |
4 | daniel-mar | 1577 | |
1578 | (* |
||
1579 | * ddckCKDestBlt is valid. |
||
1580 | *) |
||
1 | daniel-mar | 1581 | DDSD_CKDESTBLT = $00004000; |
4 | daniel-mar | 1582 | |
1583 | (* |
||
1584 | * ddckCKSrcOverlay is valid. |
||
1585 | *) |
||
1 | daniel-mar | 1586 | DDSD_CKSRCOVERLAY = $00008000; |
4 | daniel-mar | 1587 | |
1588 | (* |
||
1589 | * ddckCKSrcBlt is valid. |
||
1590 | *) |
||
1 | daniel-mar | 1591 | DDSD_CKSRCBLT = $00010000; |
4 | daniel-mar | 1592 | |
1593 | (* |
||
1594 | * dwMipMapCount is valid. |
||
1595 | *) |
||
1 | daniel-mar | 1596 | DDSD_MIPMAPCOUNT = $00020000; |
4 | daniel-mar | 1597 | |
1598 | (* |
||
1599 | * dwRefreshRate is valid |
||
1600 | *) |
||
1 | daniel-mar | 1601 | DDSD_REFRESHRATE = $00040000; |
4 | daniel-mar | 1602 | |
1603 | (* |
||
1604 | * dwLinearSize is valid |
||
1605 | *) |
||
1606 | DDSD_LINEARSIZE = $00080000; |
||
1607 | |||
1608 | (* |
||
1609 | * dwTextureStage is valid |
||
1610 | *) |
||
1 | daniel-mar | 1611 | DDSD_TEXTURESTAGE = $00100000; |
1612 | |||
4 | daniel-mar | 1613 | (* |
1614 | * All input fields are valid. |
||
1615 | *) |
||
1616 | DDSD_ALL = $001ff9ee; |
||
1 | daniel-mar | 1617 | |
1618 | |||
4 | daniel-mar | 1619 | (* |
1620 | * guid field is valid. |
||
1621 | *) |
||
1622 | DDOSD_GUID = $00000001; |
||
1 | daniel-mar | 1623 | |
4 | daniel-mar | 1624 | (* |
1625 | * dwCompressionRatio field is valid. |
||
1626 | *) |
||
1627 | DDOSD_COMPRESSION_RATIO = $00000002; |
||
1 | daniel-mar | 1628 | |
4 | daniel-mar | 1629 | (* |
1630 | * ddSCaps field is valid. |
||
1631 | *) |
||
1632 | DDOSD_SCAPS = $00000004; |
||
1 | daniel-mar | 1633 | |
4 | daniel-mar | 1634 | (* |
1635 | * ddOSCaps field is valid. |
||
1636 | *) |
||
1637 | DDOSD_OSCAPS = $00000008; |
||
1 | daniel-mar | 1638 | |
4 | daniel-mar | 1639 | (* |
1640 | * All input fields are valid. |
||
1641 | *) |
||
1642 | DDOSD_ALL = $0000000f; |
||
1 | daniel-mar | 1643 | |
4 | daniel-mar | 1644 | (* |
1645 | * The surface's optimized pixelformat is compressed |
||
1646 | *) |
||
1647 | DDOSDCAPS_OPTCOMPRESSED = $00000001; |
||
1 | daniel-mar | 1648 | |
4 | daniel-mar | 1649 | (* |
1650 | * The surface's optimized pixelformat is reordered |
||
1651 | *) |
||
1652 | DDOSDCAPS_OPTREORDERED = $00000002; |
||
1 | daniel-mar | 1653 | |
4 | daniel-mar | 1654 | (* |
1655 | * The opt surface is a monolithic mipmap |
||
1656 | *) |
||
1657 | DDOSDCAPS_MONOLITHICMIPMAP = $00000004; |
||
1 | daniel-mar | 1658 | |
4 | daniel-mar | 1659 | (* |
1660 | * The valid Surf caps: |
||
1661 | * DDSCAPS_SYSTEMMEMORY = $00000800; |
||
1662 | * DDSCAPS_VIDEOMEMORY = $00004000; |
||
1663 | * DDSCAPS_LOCALVIDMEM = $10000000; |
||
1664 | * DDSCAPS_NONLOCALVIDMEM = $20000000; |
||
1665 | *) |
||
1666 | DDOSDCAPS_VALIDSCAPS = $30004800; |
||
1 | daniel-mar | 1667 | |
4 | daniel-mar | 1668 | (* |
1669 | * The valid OptSurf caps |
||
1670 | *) |
||
1671 | DDOSDCAPS_VALIDOSCAPS = $00000007; |
||
1 | daniel-mar | 1672 | |
1673 | |||
4 | daniel-mar | 1674 | (* |
1675 | * DDCOLORCONTROL |
||
1676 | *) |
||
1 | daniel-mar | 1677 | |
4 | daniel-mar | 1678 | (* |
1679 | * lBrightness field is valid. |
||
1680 | *) |
||
1681 | DDCOLOR_BRIGHTNESS = $00000001; |
||
1 | daniel-mar | 1682 | |
4 | daniel-mar | 1683 | (* |
1684 | * lContrast field is valid. |
||
1685 | *) |
||
1686 | DDCOLOR_CONTRAST = $00000002; |
||
1687 | |||
1688 | (* |
||
1689 | * lHue field is valid. |
||
1690 | *) |
||
1691 | DDCOLOR_HUE = $00000004; |
||
1692 | |||
1693 | (* |
||
1694 | * lSaturation field is valid. |
||
1695 | *) |
||
1696 | DDCOLOR_SATURATION = $00000008; |
||
1697 | |||
1698 | (* |
||
1699 | * lSharpness field is valid. |
||
1700 | *) |
||
1701 | DDCOLOR_SHARPNESS = $00000010; |
||
1702 | |||
1703 | (* |
||
1704 | * lGamma field is valid. |
||
1705 | *) |
||
1706 | DDCOLOR_GAMMA = $00000020; |
||
1707 | |||
1708 | (* |
||
1709 | * lColorEnable field is valid. |
||
1710 | *) |
||
1711 | DDCOLOR_COLORENABLE = $00000040; |
||
1712 | |||
1713 | |||
1714 | |||
1715 | (*============================================================================ |
||
1716 | * |
||
1717 | * Direct Draw Capability Flags |
||
1718 | * |
||
1719 | * These flags are used to describe the capabilities of a given Surface. |
||
1720 | * All flags are bit flags. |
||
1721 | * |
||
1722 | *==========================================================================*) |
||
1723 | |||
1724 | (**************************************************************************** |
||
1725 | * |
||
1726 | * DIRECTDRAWSURFACE CAPABILITY FLAGS |
||
1727 | * |
||
1728 | ****************************************************************************) |
||
1729 | (* |
||
1730 | * This bit currently has no meaning. |
||
1731 | *) |
||
1732 | DDSCAPS_RESERVED1 = $00000001; |
||
1733 | |||
1734 | (* |
||
1735 | * Indicates that this surface contains alpha-only information. |
||
1736 | * (To determine if a surface is RGBA/YUVA, the pixel format must be |
||
1737 | * interrogated.) |
||
1738 | *) |
||
1739 | DDSCAPS_ALPHA = $00000002; |
||
1740 | |||
1741 | (* |
||
1742 | * Indicates that this surface is a backbuffer. It is generally |
||
1743 | * set by CreateSurface when the DDSCAPS_FLIP capability bit is set. |
||
1744 | * It indicates that this surface is THE back buffer of a surface |
||
1745 | * flipping structure. DirectDraw supports N surfaces in a |
||
1746 | * surface flipping structure. Only the surface that immediately |
||
1747 | * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set. |
||
1748 | * The other surfaces are identified as back buffers by the presence |
||
1749 | * of the DDSCAPS_FLIP capability, their attachment order, and the |
||
1750 | * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER |
||
1751 | * capabilities. The bit is sent to CreateSurface when a standalone |
||
1752 | * back buffer is being created. This surface could be attached to |
||
1753 | * a front buffer and/or back buffers to form a flipping surface |
||
1754 | * structure after the CreateSurface call. See AddAttachments for |
||
1755 | * a detailed description of the behaviors in this case. |
||
1756 | *) |
||
1757 | DDSCAPS_BACKBUFFER = $00000004; |
||
1758 | |||
1759 | (* |
||
1760 | * Indicates a complex surface structure is being described. A |
||
1761 | * complex surface structure results in the creation of more than |
||
1762 | * one surface. The additional surfaces are attached to the root |
||
1763 | * surface. The complex structure can only be destroyed by |
||
1764 | * destroying the root. |
||
1765 | *) |
||
1766 | DDSCAPS_COMPLEX = $00000008; |
||
1767 | |||
1768 | (* |
||
1769 | * Indicates that this surface is a part of a surface flipping structure. |
||
1770 | * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and |
||
1771 | * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface |
||
1772 | * on the resulting creations. The dwBackBufferCount field in the |
||
1773 | * TDDSurfaceDesc structure must be set to at least 1 in order for |
||
1774 | * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability |
||
1775 | * must always be set with creating multiple surfaces through CreateSurface. |
||
1776 | *) |
||
1777 | DDSCAPS_FLIP = $00000010; |
||
1778 | |||
1779 | (* |
||
1780 | * Indicates that this surface is THE front buffer of a surface flipping |
||
1781 | * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP |
||
1782 | * capability bit is set. |
||
1783 | * If this capability is sent to CreateSurface then a standalonw front buffer |
||
1784 | * is created. This surface will not have the DDSCAPS_FLIP capability. |
||
1785 | * It can be attached to other back buffers to form a flipping structure. |
||
1786 | * See AddAttachments for a detailed description of the behaviors in this |
||
1787 | * case. |
||
1788 | *) |
||
1789 | DDSCAPS_FRONTBUFFER = $00000020; |
||
1790 | |||
1791 | (* |
||
1792 | * Indicates that this surface is any offscreen surface that is not an overlay, |
||
1793 | * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used |
||
1794 | * to identify plain vanilla surfaces. |
||
1795 | *) |
||
1796 | DDSCAPS_OFFSCREENPLAIN = $00000040; |
||
1797 | |||
1798 | (* |
||
1799 | * Indicates that this surface is an overlay. It may or may not be directly visible |
||
1800 | * depending on whether or not it is currently being overlayed onto the primary |
||
1801 | * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being |
||
1802 | * overlayed at the moment. |
||
1803 | *) |
||
1804 | DDSCAPS_OVERLAY = $00000080; |
||
1805 | |||
1806 | (* |
||
1807 | * Indicates that unique DirectDrawPalette objects can be created and |
||
1808 | * attached to this surface. |
||
1809 | *) |
||
1810 | DDSCAPS_PALETTE = $00000100; |
||
1811 | |||
1812 | (* |
||
1813 | * Indicates that this surface is the primary surface. The primary |
||
1814 | * surface represents what the user is seeing at the moment. |
||
1815 | *) |
||
1816 | DDSCAPS_PRIMARYSURFACE = $00000200; |
||
1817 | |||
1818 | (* |
||
1819 | * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now |
||
1820 | * obsolete. |
||
1821 | *) |
||
1822 | DDSCAPS_RESERVED3 = $00000400; |
||
1823 | (* |
||
1824 | * Indicates that this surface is the primary surface for the left eye. |
||
1825 | * The primary surface for the left eye represents what the user is seeing |
||
1826 | * at the moment with the users left eye. When this surface is created the |
||
1827 | * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users |
||
1828 | * right eye. |
||
1829 | *) |
||
1830 | DDSCAPS_PRIMARYSURFACELEFT = DDSCAPS_RESERVED3; |
||
1831 | |||
1832 | (* |
||
1833 | * Indicates that this surface memory was allocated in system memory |
||
1834 | *) |
||
1835 | DDSCAPS_SYSTEMMEMORY = $00000800; |
||
1836 | |||
1837 | (* |
||
1838 | * Indicates that this surface can be used as a 3D texture. It does not |
||
1839 | * indicate whether or not the surface is being used for that purpose. |
||
1840 | *) |
||
1841 | DDSCAPS_TEXTURE = $00001000; |
||
1842 | |||
1843 | (* |
||
1844 | * Indicates that a surface may be a destination for 3D rendering. This |
||
1845 | * bit must be set in order to query for a Direct3D Device Interface |
||
1846 | * from this surface. |
||
1847 | *) |
||
1848 | DDSCAPS_3DDEVICE = $00002000; |
||
1849 | |||
1850 | (* |
||
1851 | * Indicates that this surface exists in video memory. |
||
1852 | *) |
||
1853 | DDSCAPS_VIDEOMEMORY = $00004000; |
||
1854 | |||
1855 | (* |
||
1856 | * Indicates that changes made to this surface are immediately visible. |
||
1857 | * It is always set for the primary surface and is set for overlays while |
||
1858 | * they are being overlayed and texture maps while they are being textured. |
||
1859 | *) |
||
1860 | DDSCAPS_VISIBLE = $00008000; |
||
1861 | |||
1862 | (* |
||
1863 | * Indicates that only writes are permitted to the surface. Read accesses |
||
1864 | * from the surface may or may not generate a protection fault, but the |
||
1865 | * results of a read from this surface will not be meaningful. READ ONLY. |
||
1866 | *) |
||
1867 | DDSCAPS_WRITEONLY = $00010000; |
||
1868 | |||
1869 | (* |
||
1870 | * Indicates that this surface is a z buffer. A z buffer does not contain |
||
1871 | * displayable information. Instead it contains bit depth information that is |
||
1872 | * used to determine which pixels are visible and which are obscured. |
||
1873 | *) |
||
1874 | DDSCAPS_ZBUFFER = $00020000; |
||
1875 | |||
1876 | (* |
||
1877 | * Indicates surface will have a DC associated long term |
||
1878 | *) |
||
1879 | DDSCAPS_OWNDC = $00040000; |
||
1880 | |||
1881 | (* |
||
1882 | * Indicates surface should be able to receive live video |
||
1883 | *) |
||
1884 | DDSCAPS_LIVEVIDEO = $00080000; |
||
1885 | |||
1886 | (* |
||
1887 | * Indicates surface should be able to have a stream decompressed |
||
1888 | * to it by the hardware. |
||
1889 | *) |
||
1890 | DDSCAPS_HWCODEC = $00100000; |
||
1891 | |||
1892 | (* |
||
1893 | * Surface is a ModeX surface. |
||
1894 | * |
||
1895 | *) |
||
1896 | DDSCAPS_MODEX = $00200000; |
||
1897 | |||
1898 | (* |
||
1899 | * Indicates surface is one level of a mip-map. This surface will |
||
1900 | * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map. |
||
1901 | * This can be done explicitly, by creating a number of surfaces and |
||
1902 | * attaching them with AddAttachedSurface or by implicitly by CreateSurface. |
||
1903 | * If this bit is set then DDSCAPS_TEXTURE must also be set. |
||
1904 | *) |
||
1905 | DDSCAPS_MIPMAP = $00400000; |
||
1906 | |||
1907 | (* |
||
1908 | * This bit is reserved. It should not be specified. |
||
1909 | *) |
||
1910 | DDSCAPS_RESERVED2 = $00800000; |
||
1911 | |||
1912 | (* |
||
1913 | * Indicates that memory for the surface is not allocated until the surface |
||
1914 | * is loaded (via the Direct3D texture Load() function). |
||
1915 | *) |
||
1916 | DDSCAPS_ALLOCONLOAD = $04000000; |
||
1917 | |||
1918 | (* |
||
1919 | * Indicates that the surface will recieve data from a video port. |
||
1920 | *) |
||
1921 | DDSCAPS_VIDEOPORT = $08000000; |
||
1922 | |||
1923 | (* |
||
1924 | * Indicates that a video memory surface is resident in true, local video |
||
1925 | * memory rather than non-local video memory. If this flag is specified then |
||
1926 | * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with |
||
1927 | * DDSCAPS_NONLOCALVIDMEM. |
||
1928 | *) |
||
1929 | DDSCAPS_LOCALVIDMEM = $10000000; |
||
1930 | |||
1931 | (* |
||
1932 | * Indicates that a video memory surface is resident in non-local video |
||
1933 | * memory rather than true, local video memory. If this flag is specified |
||
1934 | * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with |
||
1935 | * DDSCAPS_LOCALVIDMEM. |
||
1936 | *) |
||
1937 | DDSCAPS_NONLOCALVIDMEM = $20000000; |
||
1938 | |||
1939 | (* |
||
1940 | * Indicates that this surface is a standard VGA mode surface, and not a |
||
1941 | * ModeX surface. (This flag will never be set in combination with the |
||
1942 | * DDSCAPS_MODEX flag). |
||
1943 | *) |
||
1944 | DDSCAPS_STANDARDVGAMODE = $40000000; |
||
1945 | |||
1946 | (* |
||
1947 | * Indicates that this surface will be an optimized surface. This flag is |
||
1948 | * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface |
||
1949 | * will be created without any underlying video memory until loaded. |
||
1950 | *) |
||
1951 | DDSCAPS_OPTIMIZED = $80000000; |
||
1952 | |||
1953 | |||
1954 | |||
1955 | (* |
||
1956 | * Indicates that this surface will receive data from a video port using |
||
1957 | * the de-interlacing hardware. This allows the driver to allocate memory |
||
1958 | * for any extra buffers that may be required. The DDSCAPS_VIDEOPORT and |
||
1959 | * DDSCAPS_OVERLAY flags must also be set. |
||
1960 | *) |
||
1961 | DDSCAPS2_HARDWAREDEINTERLACE = $00000002; |
||
1962 | |||
1963 | (* |
||
1964 | * Indicates to the driver that this surface will be locked very frequently |
||
1965 | * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap |
||
1966 | * set must also have DDSCAPS_TEXTURE. This cap cannot be used with |
||
1967 | * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE. |
||
1968 | *) |
||
1969 | DDSCAPS2_HINTDYNAMIC = $00000004; |
||
1970 | |||
1971 | (* |
||
1972 | * Indicates to the driver that this surface can be re-ordered/retiled on |
||
1973 | * load. This operation will not change the size of the texture. It is |
||
1974 | * relatively fast and symmetrical, since the application may lock these |
||
1975 | * bits (although it will take a performance hit when doing so). Surfaces |
||
1976 | * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be |
||
1977 | * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE. |
||
1978 | *) |
||
1979 | DDSCAPS2_HINTSTATIC = $00000008; |
||
1980 | |||
1981 | (* |
||
1982 | * Indicates that the client would like this texture surface to be managed by the |
||
1983 | * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have |
||
1984 | * DDSCAPS_TEXTURE and DDSCAPS_SYSTEMMEMORY. |
||
1985 | *) |
||
1986 | DDSCAPS2_TEXTUREMANAGE = $00000010; |
||
1987 | |||
1988 | (* |
||
1989 | * These bits are reserved for internal use *) |
||
1990 | DDSCAPS2_RESERVED1 = $00000020; |
||
1991 | DDSCAPS2_RESERVED2 = $00000040; |
||
1992 | |||
1993 | (* |
||
1994 | * Indicates to the driver that this surface will never be locked again. |
||
1995 | * The driver is free to optimize this surface via retiling and actual compression. |
||
1996 | * All calls to Lock() or Blts from this surface will fail. Surfaces with this |
||
1997 | * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with |
||
1998 | * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC. |
||
1999 | *) |
||
2000 | DDSCAPS2_OPAQUE = $00000080; |
||
2001 | |||
2002 | (* |
||
2003 | * Applications should set this bit at CreateSurface time to indicate that they |
||
2004 | * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set. |
||
2005 | *) |
||
2006 | DDSCAPS2_HINTANTIALIASING = $00000100; |
||
2007 | |||
2008 | (* |
||
2009 | * This flag is used at CreateSurface time to indicate that this set of |
||
2010 | * surfaces is a cubic environment map |
||
2011 | *) |
||
2012 | DDSCAPS2_CUBEMAP = $00000200; |
||
2013 | |||
2014 | (* |
||
2015 | * These flags preform two functions: |
||
2016 | * - At CreateSurface time, they define which of the six cube faces are |
||
2017 | * required by the application. |
||
2018 | * - After creation, each face in the cubemap will have exactly one of these |
||
2019 | * bits set. |
||
2020 | *) |
||
2021 | DDSCAPS2_CUBEMAP_POSITIVEX = $00000400; |
||
2022 | DDSCAPS2_CUBEMAP_NEGATIVEX = $00000800; |
||
2023 | DDSCAPS2_CUBEMAP_POSITIVEY = $00001000; |
||
2024 | DDSCAPS2_CUBEMAP_NEGATIVEY = $00002000; |
||
2025 | DDSCAPS2_CUBEMAP_POSITIVEZ = $00004000; |
||
2026 | DDSCAPS2_CUBEMAP_NEGATIVEZ = $00008000; |
||
2027 | |||
2028 | (* |
||
2029 | * This macro may be used to specify all faces of a cube map at CreateSurface time |
||
2030 | *) |
||
2031 | DDSCAPS2_CUBEMAP_ALLFACES = ( DDSCAPS2_CUBEMAP_POSITIVEX or |
||
2032 | DDSCAPS2_CUBEMAP_NEGATIVEX or |
||
2033 | DDSCAPS2_CUBEMAP_POSITIVEY or |
||
2034 | DDSCAPS2_CUBEMAP_NEGATIVEY or |
||
2035 | DDSCAPS2_CUBEMAP_POSITIVEZ or |
||
2036 | DDSCAPS2_CUBEMAP_NEGATIVEZ ); |
||
2037 | |||
2038 | |||
2039 | (* |
||
2040 | * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards |
||
2041 | * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface |
||
2042 | * constructs such as Cube Maps, wherein there are more than one mipmap surface attached |
||
2043 | * to the root surface. |
||
2044 | * This caps bit is ignored by CreateSurface |
||
2045 | *) |
||
2046 | DDSCAPS2_MIPMAPSUBLEVEL = $00010000; |
||
2047 | |||
2048 | (* This flag indicates that the texture should be managed by D3D only *) |
||
2049 | DDSCAPS2_D3DTEXTUREMANAGE = $00020000; |
||
2050 | |||
2051 | (* This flag indicates that the managed surface can be safely lost *) |
||
2052 | DDSCAPS2_DONOTPERSIST = $00040000; |
||
2053 | |||
2054 | (* indicates that this surface is part of a stereo flipping chain *) |
||
2055 | DDSCAPS2_STEREOSURFACELEFT = $00080000; |
||
2056 | |||
2057 | |||
2058 | |||
2059 | (**************************************************************************** |
||
2060 | * |
||
2061 | * DIRECTDRAW DRIVER CAPABILITY FLAGS |
||
2062 | * |
||
2063 | ****************************************************************************) |
||
2064 | |||
2065 | (* |
||
2066 | * Display hardware has 3D acceleration. |
||
2067 | *) |
||
2068 | DDCAPS_3D = $00000001; |
||
2069 | |||
2070 | (* |
||
2071 | * Indicates that DirectDraw will support only dest rectangles that are aligned |
||
2072 | * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively. |
||
2073 | * READ ONLY. |
||
2074 | *) |
||
2075 | DDCAPS_ALIGNBOUNDARYDEST = $00000002; |
||
2076 | |||
2077 | (* |
||
2078 | * Indicates that DirectDraw will support only source rectangles whose sizes in |
||
2079 | * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY. |
||
2080 | *) |
||
2081 | DDCAPS_ALIGNSIZEDEST = $00000004; |
||
2082 | (* |
||
2083 | * Indicates that DirectDraw will support only source rectangles that are aligned |
||
2084 | * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively. |
||
2085 | * READ ONLY. |
||
2086 | *) |
||
2087 | DDCAPS_ALIGNBOUNDARYSRC = $00000008; |
||
2088 | |||
2089 | (* |
||
2090 | * Indicates that DirectDraw will support only source rectangles whose sizes in |
||
2091 | * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY. |
||
2092 | *) |
||
2093 | DDCAPS_ALIGNSIZESRC = $00000010; |
||
2094 | |||
2095 | (* |
||
2096 | * Indicates that DirectDraw will create video memory surfaces that have a stride |
||
2097 | * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY. |
||
2098 | *) |
||
2099 | DDCAPS_ALIGNSTRIDE = $00000020; |
||
2100 | |||
2101 | (* |
||
2102 | * Display hardware is capable of blt operations. |
||
2103 | *) |
||
2104 | DDCAPS_BLT = $00000040; |
||
2105 | |||
2106 | (* |
||
2107 | * Display hardware is capable of asynchronous blt operations. |
||
2108 | *) |
||
2109 | DDCAPS_BLTQUEUE = $00000080; |
||
2110 | |||
2111 | (* |
||
2112 | * Display hardware is capable of color space conversions during the blt operation. |
||
2113 | *) |
||
2114 | DDCAPS_BLTFOURCC = $00000100; |
||
2115 | |||
2116 | (* |
||
2117 | * Display hardware is capable of stretching during blt operations. |
||
2118 | *) |
||
2119 | DDCAPS_BLTSTRETCH = $00000200; |
||
2120 | |||
2121 | (* |
||
2122 | * Display hardware is shared with GDI. |
||
2123 | *) |
||
2124 | DDCAPS_GDI = $00000400; |
||
2125 | |||
2126 | (* |
||
2127 | * Display hardware can overlay. |
||
2128 | *) |
||
2129 | DDCAPS_OVERLAY = $00000800; |
||
2130 | |||
2131 | (* |
||
2132 | * Set if display hardware supports overlays but can not clip them. |
||
2133 | *) |
||
2134 | DDCAPS_OVERLAYCANTCLIP = $00001000; |
||
2135 | |||
2136 | (* |
||
2137 | * Indicates that overlay hardware is capable of color space conversions during |
||
2138 | * the overlay operation. |
||
2139 | *) |
||
2140 | DDCAPS_OVERLAYFOURCC = $00002000; |
||
2141 | |||
2142 | (* |
||
2143 | * Indicates that stretching can be done by the overlay hardware. |
||
2144 | *) |
||
2145 | DDCAPS_OVERLAYSTRETCH = $00004000; |
||
2146 | |||
2147 | (* |
||
2148 | * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces |
||
2149 | * other than the primary surface. |
||
2150 | *) |
||
2151 | DDCAPS_PALETTE = $00008000; |
||
2152 | |||
2153 | (* |
||
2154 | * Indicates that palette changes can be syncd with the veritcal refresh. |
||
2155 | *) |
||
2156 | DDCAPS_PALETTEVSYNC = $00010000; |
||
2157 | |||
2158 | (* |
||
2159 | * Display hardware can return the current scan line. |
||
2160 | *) |
||
2161 | DDCAPS_READSCANLINE = $00020000; |
||
2162 | |||
2163 | (* |
||
2164 | * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT |
||
2165 | * can be created. |
||
2166 | *) |
||
2167 | DDCAPS_STEREOVIEW = $00040000; |
||
2168 | |||
2169 | (* |
||
2170 | * Display hardware is capable of generating a vertical blank interrupt. |
||
2171 | *) |
||
2172 | DDCAPS_VBI = $00080000; |
||
2173 | |||
2174 | (* |
||
2175 | * Supports the use of z buffers with blt operations. |
||
2176 | *) |
||
2177 | DDCAPS_ZBLTS = $00100000; |
||
2178 | |||
2179 | (* |
||
2180 | * Supports Z Ordering of overlays. |
||
2181 | *) |
||
2182 | DDCAPS_ZOVERLAYS = $00200000; |
||
2183 | |||
2184 | (* |
||
2185 | * Supports color key |
||
2186 | *) |
||
2187 | DDCAPS_COLORKEY = $00400000; |
||
2188 | |||
2189 | (* |
||
2190 | * Supports alpha surfaces |
||
2191 | *) |
||
2192 | DDCAPS_ALPHA = $00800000; |
||
2193 | |||
2194 | (* |
||
2195 | * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set) |
||
2196 | *) |
||
2197 | DDCAPS_COLORKEYHWASSIST = $01000000; |
||
2198 | |||
2199 | (* |
||
2200 | * no hardware support at all |
||
2201 | *) |
||
2202 | DDCAPS_NOHARDWARE = $02000000; |
||
2203 | |||
2204 | (* |
||
2205 | * Display hardware is capable of color fill with bltter |
||
2206 | *) |
||
2207 | DDCAPS_BLTCOLORFILL = $04000000; |
||
2208 | |||
2209 | (* |
||
2210 | * Display hardware is bank switched, and potentially very slow at |
||
2211 | * random access to VRAM. |
||
2212 | *) |
||
2213 | DDCAPS_BANKSWITCHED = $08000000; |
||
2214 | |||
2215 | (* |
||
2216 | * Display hardware is capable of depth filling Z-buffers with bltter |
||
2217 | *) |
||
2218 | DDCAPS_BLTDEPTHFILL = $10000000; |
||
2219 | |||
2220 | (* |
||
2221 | * Display hardware is capable of clipping while bltting. |
||
2222 | *) |
||
2223 | DDCAPS_CANCLIP = $20000000; |
||
2224 | |||
2225 | (* |
||
2226 | * Display hardware is capable of clipping while stretch bltting. |
||
2227 | *) |
||
2228 | DDCAPS_CANCLIPSTRETCHED = $40000000; |
||
2229 | |||
2230 | (* |
||
2231 | * Display hardware is capable of bltting to or from system memory |
||
2232 | *) |
||
2233 | DDCAPS_CANBLTSYSMEM = $80000000; |
||
2234 | |||
2235 | |||
2236 | (**************************************************************************** |
||
2237 | * |
||
2238 | * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2) |
||
2239 | * |
||
2240 | ****************************************************************************) |
||
2241 | |||
2242 | (* |
||
2243 | * Display hardware is certified |
||
2244 | *) |
||
2245 | DDCAPS2_CERTIFIED = $00000001; |
||
2246 | |||
2247 | (* |
||
2248 | * Driver cannot interleave 2D operations (lock and blt) to surfaces with |
||
2249 | * Direct3D rendering operations between calls to BeginScene() and EndScene() |
||
2250 | *) |
||
2251 | DDCAPS2_NO2DDURING3DSCENE = $00000002; |
||
2252 | |||
2253 | (* |
||
2254 | * Display hardware contains a video port |
||
2255 | *) |
||
2256 | DDCAPS2_VIDEOPORT = $00000004; |
||
2257 | |||
2258 | (* |
||
2259 | * The overlay can be automatically flipped according to the video port |
||
2260 | * VSYNCs, providing automatic doubled buffered display of video port |
||
2261 | * data using an overlay |
||
2262 | *) |
||
2263 | DDCAPS2_AUTOFLIPOVERLAY = $00000008; |
||
2264 | |||
2265 | (* |
||
2266 | * Overlay can display each field of interlaced data individually while |
||
2267 | * it is interleaved in memory without causing jittery artifacts. |
||
2268 | *) |
||
2269 | DDCAPS2_CANBOBINTERLEAVED = $00000010; |
||
2270 | |||
2271 | (* |
||
2272 | * Overlay can display each field of interlaced data individually while |
||
2273 | * it is not interleaved in memory without causing jittery artifacts. |
||
2274 | *) |
||
2275 | DDCAPS2_CANBOBNONINTERLEAVED = $00000020; |
||
2276 | |||
2277 | (* |
||
2278 | * The overlay surface contains color controls (brightness, sharpness, etc.) |
||
2279 | *) |
||
2280 | DDCAPS2_COLORCONTROLOVERLAY = $00000040; |
||
2281 | |||
2282 | (* |
||
2283 | * The primary surface contains color controls (gamma, etc.) |
||
2284 | *) |
||
2285 | DDCAPS2_COLORCONTROLPRIMARY = $00000080; |
||
2286 | |||
2287 | (* |
||
2288 | * RGBZ -> RGB supported for 16:16 RGB:Z |
||
2289 | *) |
||
2290 | DDCAPS2_CANDROPZ16BIT = $00000100; |
||
2291 | |||
2292 | (* |
||
2293 | * Driver supports non-local video memory. |
||
2294 | *) |
||
2295 | DDCAPS2_NONLOCALVIDMEM = $00000200; |
||
2296 | |||
2297 | (* |
||
2298 | * Dirver supports non-local video memory but has different capabilities for |
||
2299 | * non-local video memory surfaces. If this bit is set then so must |
||
2300 | * DDCAPS2_NONLOCALVIDMEM. |
||
2301 | *) |
||
2302 | DDCAPS2_NONLOCALVIDMEMCAPS = $00000400; |
||
2303 | |||
2304 | (* |
||
2305 | * Driver neither requires nor prefers surfaces to be pagelocked when performing |
||
2306 | * blts involving system memory surfaces |
||
2307 | *) |
||
2308 | DDCAPS2_NOPAGELOCKREQUIRED = $00000800; |
||
2309 | |||
2310 | (* |
||
2311 | * Driver can create surfaces which are wider than the primary surface |
||
2312 | *) |
||
2313 | DDCAPS2_WIDESURFACES = $00001000; |
||
2314 | |||
2315 | (* |
||
2316 | * Driver supports bob without using a video port by handling the |
||
2317 | * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip. |
||
2318 | *) |
||
2319 | DDCAPS2_CANFLIPODDEVEN = $00002000; |
||
2320 | |||
2321 | (* |
||
2322 | * Driver supports bob using hardware |
||
2323 | *) |
||
2324 | DDCAPS2_CANBOBHARDWARE = $00004000; |
||
2325 | |||
2326 | (* |
||
2327 | * Driver supports bltting any FOURCC surface to another surface of the same FOURCC |
||
2328 | *) |
||
2329 | DDCAPS2_COPYFOURCC = $00008000; |
||
2330 | |||
2331 | |||
2332 | (* |
||
2333 | * Driver supports loadable gamma ramps for the primary surface |
||
2334 | *) |
||
2335 | DDCAPS2_PRIMARYGAMMA = $00020000; |
||
2336 | |||
2337 | (* |
||
2338 | * Driver can render in windowed mode. |
||
2339 | *) |
||
2340 | DDCAPS2_CANRENDERWINDOWED = $00080000; |
||
2341 | |||
2342 | (* |
||
2343 | * A calibrator is available to adjust the gamma ramp according to the |
||
2344 | * physical display properties so that the result will be identical on |
||
2345 | * all calibrated systems. |
||
2346 | *) |
||
2347 | DDCAPS2_CANCALIBRATEGAMMA = $00100000; |
||
2348 | |||
2349 | (* |
||
2350 | * Indicates that the driver will respond to DDFLIP_INTERVALn flags |
||
2351 | *) |
||
2352 | DDCAPS2_FLIPINTERVAL = $00200000; |
||
2353 | |||
2354 | (* |
||
2355 | * Indicates that the driver will respond to DDFLIP_NOVSYNC |
||
2356 | *) |
||
2357 | DDCAPS2_FLIPNOVSYNC = $00400000; |
||
2358 | |||
2359 | (* |
||
2360 | * Driver supports management of video memory, if this flag is ON, |
||
2361 | * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on |
||
2362 | * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on |
||
2363 | *) |
||
2364 | DDCAPS2_CANMANAGETEXTURE = $00800000; |
||
2365 | |||
2366 | (* |
||
2367 | * The Direct3D texture manager uses this cap to decide whether to put managed |
||
2368 | * surfaces in non-local video memory. If the cap is set, the texture manager will |
||
2369 | * put managed surfaces in non-local vidmem. Drivers that cannot texture from |
||
2370 | * local vidmem SHOULD NOT set this cap. |
||
2371 | *) |
||
2372 | DDCAPS2_TEXMANINNONLOCALVIDMEM = $01000000; |
||
2373 | |||
2374 | (* |
||
2375 | * Indicates that the driver supports DX7 type of stereo in at least one mode (which may |
||
2376 | * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher) |
||
2377 | * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of |
||
2378 | * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application |
||
2379 | * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode. |
||
2380 | *) |
||
2381 | DDCAPS2_STEREO = $02000000; |
||
2382 | |||
2383 | (* |
||
2384 | * This caps bit is intended for internal DirectDraw use. |
||
2385 | * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set. |
||
2386 | * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and |
||
2387 | * all the assoicated system memory blt caps must be correct). |
||
2388 | * -It implies that the system->video blt caps in DDCAPS also apply to system to |
||
2389 | * nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops |
||
2390 | * members of DDCAPS (DDCORECAPS) are filled in correctly. |
||
2391 | * -Any blt from system to nonlocal memory that matches these caps bits will |
||
2392 | * be passed to the driver. |
||
2393 | * |
||
2394 | * NOTE: This is intended to enable the driver itself to do efficient reordering |
||
2395 | * of textures. This is NOT meant to imply that hardware can write into AGP memory. |
||
2396 | * This operation is not currently supported. |
||
2397 | *) |
||
2398 | DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL = $04000000; |
||
2399 | |||
2400 | (**************************************************************************** |
||
2401 | * |
||
2402 | * DIRECTDRAW FX ALPHA CAPABILITY FLAGS |
||
2403 | * |
||
2404 | ****************************************************************************) |
||
2405 | |||
2406 | (* |
||
2407 | * Supports alpha blending around the edge of a source color keyed surface. |
||
2408 | * For Blt. |
||
2409 | *) |
||
1 | daniel-mar | 2410 | DDFXALPHACAPS_BLTALPHAEDGEBLEND = $00000001; |
4 | daniel-mar | 2411 | |
2412 | (* |
||
2413 | * Supports alpha information in the pixel format. The bit depth of alpha |
||
2414 | * information in the pixel format can be 1,2,4, or 8. The alpha value becomes |
||
2415 | * more opaque as the alpha value increases. (0 is transparent.) |
||
2416 | * For Blt. |
||
2417 | *) |
||
1 | daniel-mar | 2418 | DDFXALPHACAPS_BLTALPHAPIXELS = $00000002; |
4 | daniel-mar | 2419 | |
2420 | (* |
||
2421 | * Supports alpha information in the pixel format. The bit depth of alpha |
||
2422 | * information in the pixel format can be 1,2,4, or 8. The alpha value |
||
2423 | * becomes more transparent as the alpha value increases. (0 is opaque.) |
||
2424 | * This flag can only be set if DDCAPS_ALPHA is set. |
||
2425 | * For Blt. |
||
2426 | *) |
||
1 | daniel-mar | 2427 | DDFXALPHACAPS_BLTALPHAPIXELSNEG = $00000004; |
4 | daniel-mar | 2428 | |
2429 | (* |
||
2430 | * Supports alpha only surfaces. The bit depth of an alpha only surface can be |
||
2431 | * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. |
||
2432 | * (0 is transparent.) |
||
2433 | * For Blt. |
||
2434 | *) |
||
1 | daniel-mar | 2435 | DDFXALPHACAPS_BLTALPHASURFACES = $00000008; |
4 | daniel-mar | 2436 | |
2437 | (* |
||
2438 | * The depth of the alpha channel data can range can be 1,2,4, or 8. |
||
2439 | * The NEG suffix indicates that this alpha channel becomes more transparent |
||
2440 | * as the alpha value increases. (0 is opaque.) This flag can only be set if |
||
2441 | * DDCAPS_ALPHA is set. |
||
2442 | * For Blt. |
||
2443 | *) |
||
1 | daniel-mar | 2444 | DDFXALPHACAPS_BLTALPHASURFACESNEG = $00000010; |
4 | daniel-mar | 2445 | |
2446 | (* |
||
2447 | * Supports alpha blending around the edge of a source color keyed surface. |
||
2448 | * For Overlays. |
||
2449 | *) |
||
1 | daniel-mar | 2450 | DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND = $00000020; |
4 | daniel-mar | 2451 | |
2452 | (* |
||
2453 | * Supports alpha information in the pixel format. The bit depth of alpha |
||
2454 | * information in the pixel format can be 1,2,4, or 8. The alpha value becomes |
||
2455 | * more opaque as the alpha value increases. (0 is transparent.) |
||
2456 | * For Overlays. |
||
2457 | *) |
||
1 | daniel-mar | 2458 | DDFXALPHACAPS_OVERLAYALPHAPIXELS = $00000040; |
4 | daniel-mar | 2459 | |
2460 | (* |
||
2461 | * Supports alpha information in the pixel format. The bit depth of alpha |
||
2462 | * information in the pixel format can be 1,2,4, or 8. The alpha value |
||
2463 | * becomes more transparent as the alpha value increases. (0 is opaque.) |
||
2464 | * This flag can only be set if DDCAPS_ALPHA is set. |
||
2465 | * For Overlays. |
||
2466 | *) |
||
1 | daniel-mar | 2467 | DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG = $00000080; |
4 | daniel-mar | 2468 | |
2469 | (* |
||
2470 | * Supports alpha only surfaces. The bit depth of an alpha only surface can be |
||
2471 | * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. |
||
2472 | * (0 is transparent.) |
||
2473 | * For Overlays. |
||
2474 | *) |
||
1 | daniel-mar | 2475 | DDFXALPHACAPS_OVERLAYALPHASURFACES = $00000100; |
4 | daniel-mar | 2476 | |
2477 | (* |
||
2478 | * The depth of the alpha channel data can range can be 1,2,4, or 8. |
||
2479 | * The NEG suffix indicates that this alpha channel becomes more transparent |
||
2480 | * as the alpha value increases. (0 is opaque.) This flag can only be set if |
||
2481 | * DDCAPS_ALPHA is set. |
||
2482 | * For Overlays. |
||
2483 | *) |
||
1 | daniel-mar | 2484 | DDFXALPHACAPS_OVERLAYALPHASURFACESNEG = $00000200; |
2485 | |||
4 | daniel-mar | 2486 | (**************************************************************************** |
2487 | * |
||
2488 | * DIRECTDRAW FX CAPABILITY FLAGS |
||
2489 | * |
||
2490 | ****************************************************************************) |
||
1 | daniel-mar | 2491 | |
4 | daniel-mar | 2492 | (* |
2493 | * Uses arithmetic operations to stretch and shrink surfaces during blt |
||
2494 | * rather than pixel doubling techniques. Along the Y axis. |
||
2495 | *) |
||
1 | daniel-mar | 2496 | DDFXCAPS_BLTARITHSTRETCHY = $00000020; |
4 | daniel-mar | 2497 | |
2498 | (* |
||
2499 | * Uses arithmetic operations to stretch during blt |
||
2500 | * rather than pixel doubling techniques. Along the Y axis. Only |
||
2501 | * works for x1, x2, etc. |
||
2502 | *) |
||
1 | daniel-mar | 2503 | DDFXCAPS_BLTARITHSTRETCHYN = $00000010; |
4 | daniel-mar | 2504 | |
2505 | (* |
||
2506 | * Supports mirroring left to right in blt. |
||
2507 | *) |
||
1 | daniel-mar | 2508 | DDFXCAPS_BLTMIRRORLEFTRIGHT = $00000040; |
4 | daniel-mar | 2509 | |
2510 | (* |
||
2511 | * Supports mirroring top to bottom in blt. |
||
2512 | *) |
||
1 | daniel-mar | 2513 | DDFXCAPS_BLTMIRRORUPDOWN = $00000080; |
4 | daniel-mar | 2514 | |
2515 | (* |
||
2516 | * Supports arbitrary rotation for blts. |
||
2517 | *) |
||
1 | daniel-mar | 2518 | DDFXCAPS_BLTROTATION = $00000100; |
4 | daniel-mar | 2519 | |
2520 | (* |
||
2521 | * Supports 90 degree rotations for blts. |
||
2522 | *) |
||
2523 | DDFXCAPS_BLTROTATION90 = $00000200; |
||
2524 | |||
2525 | (* |
||
2526 | * DirectDraw supports arbitrary shrinking of a surface along the |
||
2527 | * x axis (horizontal direction) for blts. |
||
2528 | *) |
||
1 | daniel-mar | 2529 | DDFXCAPS_BLTSHRINKX = $00000400; |
4 | daniel-mar | 2530 | |
2531 | (* |
||
2532 | * DirectDraw supports integer shrinking (1x,2x,) of a surface |
||
2533 | * along the x axis (horizontal direction) for blts. |
||
2534 | *) |
||
1 | daniel-mar | 2535 | DDFXCAPS_BLTSHRINKXN = $00000800; |
4 | daniel-mar | 2536 | |
2537 | (* |
||
2538 | * DirectDraw supports arbitrary shrinking of a surface along the |
||
2539 | * y axis (horizontal direction) for blts. |
||
2540 | *) |
||
1 | daniel-mar | 2541 | DDFXCAPS_BLTSHRINKY = $00001000; |
4 | daniel-mar | 2542 | |
2543 | (* |
||
2544 | * DirectDraw supports integer shrinking (1x,2x,) of a surface |
||
2545 | * along the y axis (vertical direction) for blts. |
||
2546 | *) |
||
1 | daniel-mar | 2547 | DDFXCAPS_BLTSHRINKYN = $00002000; |
4 | daniel-mar | 2548 | |
2549 | (* |
||
2550 | * DirectDraw supports arbitrary stretching of a surface along the |
||
2551 | * x axis (horizontal direction) for blts. |
||
2552 | *) |
||
1 | daniel-mar | 2553 | DDFXCAPS_BLTSTRETCHX = $00004000; |
4 | daniel-mar | 2554 | |
2555 | (* |
||
2556 | * DirectDraw supports integer stretching (1x,2x,) of a surface |
||
2557 | * along the x axis (horizontal direction) for blts. |
||
2558 | *) |
||
1 | daniel-mar | 2559 | DDFXCAPS_BLTSTRETCHXN = $00008000; |
4 | daniel-mar | 2560 | |
2561 | (* |
||
2562 | * DirectDraw supports arbitrary stretching of a surface along the |
||
2563 | * y axis (horizontal direction) for blts. |
||
2564 | *) |
||
1 | daniel-mar | 2565 | DDFXCAPS_BLTSTRETCHY = $00010000; |
4 | daniel-mar | 2566 | |
2567 | (* |
||
2568 | * DirectDraw supports integer stretching (1x,2x,) of a surface |
||
2569 | * along the y axis (vertical direction) for blts. |
||
2570 | *) |
||
1 | daniel-mar | 2571 | DDFXCAPS_BLTSTRETCHYN = $00020000; |
4 | daniel-mar | 2572 | |
2573 | (* |
||
2574 | * Uses arithmetic operations to stretch and shrink surfaces during |
||
2575 | * overlay rather than pixel doubling techniques. Along the Y axis |
||
2576 | * for overlays. |
||
2577 | *) |
||
1 | daniel-mar | 2578 | DDFXCAPS_OVERLAYARITHSTRETCHY = $00040000; |
4 | daniel-mar | 2579 | |
2580 | (* |
||
2581 | * Uses arithmetic operations to stretch surfaces during |
||
2582 | * overlay rather than pixel doubling techniques. Along the Y axis |
||
2583 | * for overlays. Only works for x1, x2, etc. |
||
2584 | *) |
||
1 | daniel-mar | 2585 | DDFXCAPS_OVERLAYARITHSTRETCHYN = $00000008; |
4 | daniel-mar | 2586 | |
2587 | (* |
||
2588 | * DirectDraw supports arbitrary shrinking of a surface along the |
||
2589 | * x axis (horizontal direction) for overlays. |
||
2590 | *) |
||
1 | daniel-mar | 2591 | DDFXCAPS_OVERLAYSHRINKX = $00080000; |
4 | daniel-mar | 2592 | |
2593 | (* |
||
2594 | * DirectDraw supports integer shrinking (1x,2x,) of a surface |
||
2595 | * along the x axis (horizontal direction) for overlays. |
||
2596 | *) |
||
1 | daniel-mar | 2597 | DDFXCAPS_OVERLAYSHRINKXN = $00100000; |
4 | daniel-mar | 2598 | |
2599 | (* |
||
2600 | * DirectDraw supports arbitrary shrinking of a surface along the |
||
2601 | * y axis (horizontal direction) for overlays. |
||
2602 | *) |
||
1 | daniel-mar | 2603 | DDFXCAPS_OVERLAYSHRINKY = $00200000; |
4 | daniel-mar | 2604 | |
2605 | (* |
||
2606 | * DirectDraw supports integer shrinking (1x,2x,) of a surface |
||
2607 | * along the y axis (vertical direction) for overlays. |
||
2608 | *) |
||
1 | daniel-mar | 2609 | DDFXCAPS_OVERLAYSHRINKYN = $00400000; |
4 | daniel-mar | 2610 | |
2611 | (* |
||
2612 | * DirectDraw supports arbitrary stretching of a surface along the |
||
2613 | * x axis (horizontal direction) for overlays. |
||
2614 | *) |
||
1 | daniel-mar | 2615 | DDFXCAPS_OVERLAYSTRETCHX = $00800000; |
4 | daniel-mar | 2616 | |
2617 | (* |
||
2618 | * DirectDraw supports integer stretching (1x,2x,) of a surface |
||
2619 | * along the x axis (horizontal direction) for overlays. |
||
2620 | *) |
||
1 | daniel-mar | 2621 | DDFXCAPS_OVERLAYSTRETCHXN = $01000000; |
4 | daniel-mar | 2622 | |
2623 | (* |
||
2624 | * DirectDraw supports arbitrary stretching of a surface along the |
||
2625 | * y axis (horizontal direction) for overlays. |
||
2626 | *) |
||
1 | daniel-mar | 2627 | DDFXCAPS_OVERLAYSTRETCHY = $02000000; |
4 | daniel-mar | 2628 | |
2629 | (* |
||
2630 | * DirectDraw supports integer stretching (1x,2x,) of a surface |
||
2631 | * along the y axis (vertical direction) for overlays. |
||
2632 | *) |
||
1 | daniel-mar | 2633 | DDFXCAPS_OVERLAYSTRETCHYN = $04000000; |
4 | daniel-mar | 2634 | |
2635 | (* |
||
2636 | * DirectDraw supports mirroring of overlays across the vertical axis |
||
2637 | *) |
||
1 | daniel-mar | 2638 | DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000; |
4 | daniel-mar | 2639 | |
2640 | (* |
||
2641 | * DirectDraw supports mirroring of overlays across the horizontal axis |
||
2642 | *) |
||
1 | daniel-mar | 2643 | DDFXCAPS_OVERLAYMIRRORUPDOWN = $10000000; |
2644 | |||
4 | daniel-mar | 2645 | (* |
2646 | * Driver can do alpha blending for blits. |
||
2647 | *) |
||
2648 | DDFXCAPS_BLTALPHA = $00000001; |
||
1 | daniel-mar | 2649 | |
4 | daniel-mar | 2650 | (* |
2651 | * Driver can do geometric transformations (or warps) for blits. |
||
2652 | *) |
||
2653 | DDFXCAPS_BLTTRANSFORM = $00000002; |
||
2654 | |||
2655 | (* |
||
2656 | * Driver can do surface-reconstruction filtering for warped blits. |
||
2657 | *) |
||
2658 | DDFXCAPS_BLTFILTER = DDFXCAPS_BLTARITHSTRETCHY; |
||
2659 | |||
2660 | (* |
||
2661 | * Driver can do alpha blending for overlays. |
||
2662 | *) |
||
2663 | DDFXCAPS_OVERLAYALPHA = $00000004; |
||
2664 | |||
2665 | (* |
||
2666 | * Driver can do geometric transformations (or warps) for overlays. |
||
2667 | *) |
||
2668 | DDFXCAPS_OVERLAYTRANSFORM = $20000000; |
||
2669 | |||
2670 | (* |
||
2671 | * Driver can do surface-reconstruction filtering for warped overlays. |
||
2672 | *) |
||
2673 | DDFXCAPS_OVERLAYFILTER = DDFXCAPS_OVERLAYARITHSTRETCHY; |
||
2674 | |||
2675 | (**************************************************************************** |
||
2676 | * |
||
2677 | * DIRECTDRAW STEREO VIEW CAPABILITIES |
||
2678 | * |
||
2679 | ****************************************************************************) |
||
2680 | |||
2681 | (* |
||
2682 | * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete |
||
2683 | * The stereo view is accomplished via enigma encoding. |
||
2684 | *) |
||
2685 | DDSVCAPS_RESERVED1 = $00000001; |
||
2686 | DDSVCAPS_ENIGMA = DDSVCAPS_RESERVED1; |
||
2687 | |||
2688 | (* |
||
2689 | * This flag used to be DDSVCAPS_FLICKER, which is now obsolete |
||
2690 | * The stereo view is accomplished via high frequency flickering. |
||
2691 | *) |
||
2692 | DDSVCAPS_RESERVED2 = $00000002; |
||
2693 | DDSVCAPS_FLICKER = DDSVCAPS_RESERVED2; |
||
2694 | |||
2695 | (* |
||
2696 | * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete |
||
2697 | * The stereo view is accomplished via red and blue filters applied |
||
2698 | * to the left and right eyes. All images must adapt their colorspaces |
||
2699 | * for this process. |
||
2700 | *) |
||
2701 | DDSVCAPS_RESERVED3 = $00000004; |
||
2702 | DDSVCAPS_REDBLUE = DDSVCAPS_RESERVED3; |
||
2703 | |||
2704 | (* |
||
2705 | * This flag used to be DDSVCAPS_SPLIT, which is now obsolete |