/packages/ptc/src/win32/directx/p_ddraw.pp
Puppet | 5259 lines | 4867 code | 361 blank | 31 comment | 275 complexity | 8d08739756d3642ddbd99cc70dfc0c85 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
Large files files are truncated, but you can click here to view the full file
1(*==========================================================================; 2 * 3 * Copyright (C) Microsoft Corporation. All Rights Reserved. 4 * 5 * File: ddraw.h 6 * Content: DirectDraw include file 7 * 8 ***************************************************************************) 9 10unit p_ddraw; 11 12{$MODE objfpc}{$H+} 13{$MACRO on} 14{$PACKRECORDS c} 15 16{$MODESWITCH NESTEDCOMMENTS-} 17 18{$DEFINE DIRECTDRAW_DYNAMIC_LINK} 19 20interface 21 22uses 23 windows; 24 25{#ifndef __DDRAW_INCLUDED__ 26#define __DDRAW_INCLUDED__ 27 28//Disable the nameless union warning when building internally 29#undef ENABLE_NAMELESS_UNION_PRAGMA 30#ifdef DIRECTX_REDIST 31#define ENABLE_NAMELESS_UNION_PRAGMA 32#endif 33 34#ifdef ENABLE_NAMELESS_UNION_PRAGMA 35#pragma warning(disable:4201) 36#endif} 37 38(* 39 * If you wish an application built against the newest version of DirectDraw 40 * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION 41 * to be the earlies version of DirectDraw you wish to run against. For, 42 * example if you wish an application to run against a DX 3 runtime define 43 * DIRECTDRAW_VERSION to be 0x0300. 44 *) 45{$IFNDEF DIRECTDRAW_VERSION} 46{$DEFINE DIRECTDRAW_VERSION:=$0700} 47{$ENDIF} //#endif /* DIRECTDRAW_VERSION */ 48 49{#if defined( _WIN32 ) && !defined( _NO_COM ) 50#define COM_NO_WINDOWS_H 51#include <objbase.h> 52#else 53#define IUnknown void 54#if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT) 55 #define CO_E_NOTINITIALIZED 0x800401F0L 56#endif 57#endif} 58 59const 60 _FACDD = $876; 61//#define _FACDD 0x876 62//#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) 63 64//#ifdef __cplusplus 65//extern "C" { 66//#endif 67 68// 69// For compilers that don't support nameless unions, do a 70// 71// #define NONAMELESSUNION 72// 73// before #include <ddraw.h> 74// 75{#ifndef DUMMYUNIONNAMEN 76#if defined(__cplusplus) || !defined(NONAMELESSUNION) 77#define DUMMYUNIONNAMEN(n) 78#else 79#define DUMMYUNIONNAMEN(n) u##n 80#endif 81#endif} 82 83{#ifndef MAKEFOURCC 84 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ 85 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ 86 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) 87#endif //defined(MAKEFOURCC)} 88 89(* 90 * FOURCC codes for DX compressed-texture pixel formats 91 *) 92const 93 FOURCC_DXT1 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('1') shl 24); 94 FOURCC_DXT2 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('2') shl 24); 95 FOURCC_DXT3 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('3') shl 24); 96 FOURCC_DXT4 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('4') shl 24); 97 FOURCC_DXT5 = Ord('D') or (Ord('X') shl 8) or (Ord('T') shl 16) or (Ord('5') shl 24); 98 99(* 100 * GUIDS used by DirectDraw objects 101 *) 102//#if defined( _WIN32 ) && !defined( _NO_COM ) 103const 104 CLSID_DirectDraw: TGuid = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}'; 105 CLSID_DirectDraw7: TGuid = '{3c305196-50db-11d3-9cfe-00c04fd930c5}'; 106 CLSID_DirectDrawClipper: TGuid = '{593817A0-7DB3-11CF-A2DE-00AA00b93356}'; 107 IID_IDirectDraw: TGuid = '{6C14DB80-A733-11CE-A521-0020AF0BE560}'; 108 IID_IDirectDraw2: TGuid = '{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}'; 109 IID_IDirectDraw4: TGuid = '{9c59509a-39bd-11d1-8c4a-00c04fd930c5}'; 110 IID_IDirectDraw7: TGuid = '{15e65ec0-3b9c-11d2-b92f-00609797ea5b}'; 111 IID_IDirectDrawSurface: TGuid = '{6C14DB81-A733-11CE-A521-0020AF0BE560}'; 112 IID_IDirectDrawSurface2: TGuid = '{57805885-6eec-11cf-9441-a82303c10e27}'; 113 IID_IDirectDrawSurface3: TGuid = '{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}'; 114 IID_IDirectDrawSurface4: TGuid = '{0B2B8630-AD35-11D0-8EA6-00609797EA5B}'; 115 IID_IDirectDrawSurface7: TGuid = '{06675a80-3b9b-11d2-b92f-00609797ea5b}'; 116 IID_IDirectDrawPalette: TGuid = '{6C14DB84-A733-11CE-A521-0020AF0BE560}'; 117 IID_IDirectDrawClipper: TGuid = '{6C14DB85-A733-11CE-A521-0020AF0BE560}'; 118 IID_IDirectDrawColorControl: TGuid = '{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}'; 119 IID_IDirectDrawGammaControl: TGuid = '{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}'; 120 121//#endif 122 123(*============================================================================ 124 * 125 * DirectDraw Structures 126 * 127 * Various structures used to invoke DirectDraw. 128 * 129 *==========================================================================*) 130 131{struct IDirectDraw; 132struct IDirectDrawSurface; 133struct IDirectDrawPalette; 134struct IDirectDrawClipper;} 135 136{typedef struct IDirectDraw FAR *LPDIRECTDRAW; 137typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2; 138typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4; 139typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7; 140typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE; 141typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2; 142typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3; 143typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4; 144typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7; 145typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE; 146typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER; 147typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL; 148typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL;} 149type 150 IDirectDraw = interface; 151 IDirectDraw2 = interface; 152 IDirectDraw4 = interface; 153 IDirectDraw7 = interface; 154 IDirectDrawSurface = interface; 155 IDirectDrawSurface2 = interface; 156 IDirectDrawSurface3 = interface; 157 IDirectDrawSurface4 = interface; 158 IDirectDrawSurface7 = interface; 159 IDirectDrawPalette = interface; 160 IDirectDrawClipper = interface; 161 IDirectDrawColorControl = interface; 162 IDirectDrawGammaControl = interface; 163 164{typedef struct _DDFXROP FAR *LPDDFXROP; 165typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC; 166typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2; 167typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;} 168 169(* 170 * API's 171 *) 172 173//#if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM ) 174//#if defined( _WIN32 ) && !defined( _NO_ENUM ) 175// typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID); 176 LPDDENUMCALLBACKA = function(lpGUID: PGUID; lpDriverDescription: LPSTR; lpDriverName: LPSTR; lpContext: LPVOID): BOOL; stdcall; 177 178// typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID); 179 LPDDENUMCALLBACKW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR; lpDriverName: LPWSTR; lpContext: LPVOID): BOOL; stdcall; 180 181type 182{ /* 183 * Protect against old SDKs 184 */ 185 #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) 186 #define HMONITOR_DECLARED 187 DECLARE_HANDLE(HMONITOR); 188 #endif} 189 {$WARNING HMONITOR should go to the windows unit} 190 HMONITOR = HANDLE; 191// typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR); 192 LPDDENUMCALLBACKEXA = function(lpGUID: PGUID; lpDriverDescription: LPSTR; lpDriverName: LPSTR; lpContext: LPVOID; hm: HMONITOR): BOOL; stdcall; 193 194// typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR); 195 LPDDENUMCALLBACKEXW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR; lpDriverName: LPWSTR; lpContext: LPVOID; hm: HMONITOR): BOOL; stdcall; 196 197type 198// typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); 199 LPDIRECTDRAWENUMERATEEXA = function(lpCallback: LPDDENUMCALLBACKEXA; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall; 200 201// typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); 202 LPDIRECTDRAWENUMERATEEXW = function(lpCallback: LPDDENUMCALLBACKEXW; lpContext: LPVOID; dwFlags: DWORD): HRESULT; stdcall; 203 204{ #ifdef UNICODE 205 typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK; 206 #define DirectDrawEnumerate DirectDrawEnumerateW 207 typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX; 208 typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX; 209 #define DirectDrawEnumerateEx DirectDrawEnumerateExW 210 #else 211 typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK; 212 #define DirectDrawEnumerate DirectDrawEnumerateA 213 typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX; 214 typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX; 215 #define DirectDrawEnumerateEx DirectDrawEnumerateExA 216 #endif} 217//#endif} 218 219(* 220 * Flags for DirectDrawEnumerateEx 221 * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to 222 * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx. 223 * By default, only the primary display device is enumerated. 224 * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES) 225 *) 226 227(* 228 * This flag causes enumeration of any GDI display devices which are part of 229 * the Windows Desktop 230 *) 231const 232 DDENUM_ATTACHEDSECONDARYDEVICES = $00000001; 233 234(* 235 * This flag causes enumeration of any GDI display devices which are not 236 * part of the Windows Desktop 237 *) 238 DDENUM_DETACHEDSECONDARYDEVICES = $00000002; 239 240(* 241 * This flag causes enumeration of non-display devices 242 *) 243 DDENUM_NONDISPLAYDEVICES = $00000004; 244 245 246 REGSTR_KEY_DDHW_DESCRIPTION = 'Description'; 247 REGSTR_KEY_DDHW_DRIVERNAME = 'DriverName'; 248 REGSTR_PATH_DDHW = 'Hardware\DirectDrawDrivers'; 249 250 DDCREATE_HARDWAREONLY = $00000001; 251 DDCREATE_EMULATIONONLY = $00000002; 252 253{#if defined(WINNT) || !defined(WIN32) 254#ifndef _HRESULT_DEFINED 255#define _HRESULT_DEFINED 256typedef __success(return >= 0) long HRESULT; 257#endif // !_HRESULT_DEFINED 258#endif} 259 260(* 261 * Generic pixel format with 8-bit RGB and alpha components 262 *) 263type 264 PDDARGB = ^TDDARGB; 265 TDDARGB = record 266 blue: BYTE; 267 green: BYTE; 268 red: BYTE; 269 alpha: BYTE; 270 end; 271 272(* 273 * This version of the structure remains for backwards source compatibility. 274 * The DDARGB structure is the one that should be used for all DirectDraw APIs. 275 *) 276 PDDRGBA = ^TDDRGBA; 277 TDDRGBA = record 278 red: BYTE; 279 green: BYTE; 280 blue: BYTE; 281 alpha: BYTE; 282 end; 283 284 285(* 286 * DDCOLORKEY 287 *) 288 PDDCOLORKEY = ^TDDCOLORKEY; 289 TDDCOLORKEY = record 290 dwColorSpaceLowValue: DWORD; // low boundary of color space that is to 291 // be treated as Color Key, inclusive 292 dwColorSpaceHighValue: DWORD; // high boundary of color space that is 293 // to be treated as Color Key, inclusive 294 end; 295 296 PDirectDrawSurface = Pointer; 297(* 298 * DDBLTFX 299 * Used to pass override information to the DIRECTDRAWSURFACE callback Blt. 300 *) 301 PDDBLTFX = ^TDDBLTFX; 302 TDDBLTFX = record 303 dwSize: DWORD; // size of structure 304 dwDDFX: DWORD; // FX operations 305 dwROP: DWORD; // Win32 raster operations 306 dwDDROP: DWORD; // Raster operations new for DirectDraw 307 dwRotationAngle: DWORD; // Rotation angle for blt 308 dwZBufferOpCode: DWORD; // ZBuffer compares 309 dwZBufferLow: DWORD; // Low limit of Z buffer 310 dwZBufferHigh: DWORD; // High limit of Z buffer 311 dwZBufferBaseDest: DWORD; // Destination base value 312 dwZDestConstBitDepth: DWORD; // Bit depth used to specify Z constant for destination 313 case Integer of 314 0: ( 315 dwZDestConst: DWORD; // Constant to use as Z buffer for dest 316 ); 317 1: ( 318 lpDDSZBufferDest: PDirectDrawSurface; // Surface to use as Z buffer for dest 319 320 dwZSrcConstBitDepth: DWORD; // Bit depth used to specify Z constant for source 321 case Integer of 322 0: ( 323 dwZSrcConst: DWORD; // Constant to use as Z buffer for src 324 ); 325 1: ( 326 lpDDSZBufferSrc: PDirectDrawSurface; // Surface to use as Z buffer for src 327 328 dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend 329 dwAlphaEdgeBlend: DWORD; // Alpha for edge blending 330 dwReserved: DWORD; 331 dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination 332 case Integer of 333 0: ( 334 dwAlphaDestConst: DWORD; // Constant to use as Alpha Channel 335 ); 336 1: ( 337 lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as Alpha Channel 338 339 dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source 340 case Integer of 341 0: ( 342 dwAlphaSrcConst: DWORD; // Constant to use as Alpha Channel 343 ); 344 1: ( 345 lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as Alpha Channel 346 347 case Integer of 348 0: ( 349 dwFillColor: DWORD; // color in RGB or Palettized 350 ); 351 1: ( 352 dwFillDepth: DWORD; // depth value for z-buffer 353 ); 354 2: ( 355 dwFillPixel: DWORD; // pixel value for RGBA or RGBZ 356 ); 357 3: ( 358 lpDDSPattern: PDirectDrawSurface; // Surface to use as pattern 359 360 ddckDestColorkey: TDDCOLORKEY; // DestColorkey override 361 ddckSrcColorkey: TDDCOLORKEY; // SrcColorkey override 362 ); 363 ); 364 ); 365 ); 366 ); 367 end; 368 369 370(* 371 * DDSCAPS 372 *) 373 PDDSCAPS = ^TDDSCAPS; 374 TDDSCAPS = record 375 dwCaps: DWORD; // capabilities of surface wanted 376 end; 377 378 379(* 380 * DDOSCAPS 381 *) 382 PDDOSCAPS = ^TDDOSCAPS; 383 TDDOSCAPS = record 384 dwCaps: DWORD; // capabilities of surface wanted 385 end; 386 387(* 388 * This structure is used internally by DirectDraw. 389 *) 390 PDDSCAPSEX = ^TDDSCAPSEX; 391 TDDSCAPSEX = record 392 dwCaps2: DWORD; 393 dwCaps3: DWORD; 394 case Integer of 395 0: ( 396 dwCaps4: DWORD; 397 ); 398 1: ( 399 dwVolumeDepth: DWORD; 400 ); 401 end; 402 403(* 404 * DDSCAPS2 405 *) 406 PDDSCAPS2 = ^TDDSCAPS2; 407 TDDSCAPS2 = record 408 dwCaps: DWORD; // capabilities of surface wanted 409 dwCaps2: DWORD; 410 dwCaps3: DWORD; 411 case Integer of 412 0: ( 413 dwCaps4: DWORD; 414 ); 415 1: ( 416 dwVolumeDepth: DWORD; 417 ); 418 end; 419 420(* 421 * DDCAPS 422 *) 423const 424 DD_ROP_SPACE = 256 div 32; // space required to store ROP array 425(* 426 * NOTE: Our choosen structure number scheme is to append a single digit to 427 * the end of the structure giving the version that structure is associated 428 * with. 429 *) 430 431(* 432 * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally 433 * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0. 434 * New applications should use the DDCAPS structure defined below. 435 *) 436type 437 PDDCAPS_DX1 = ^TDDCAPS_DX1; 438 TDDCAPS_DX1 = record 439 dwSize: DWORD; // size of the DDDRIVERCAPS structure 440 dwCaps: DWORD; // driver specific capabilities 441 dwCaps2: DWORD; // more driver specific capabilites 442 dwCKeyCaps: DWORD; // color key capabilities of the surface 443 dwFXCaps: DWORD; // driver specific stretching and effects capabilites 444 dwFXAlphaCaps: DWORD; // alpha driver specific capabilities 445 dwPalCaps: DWORD; // palette capabilities 446 dwSVCaps: DWORD; // stereo vision capabilities 447 dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 448 dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 449 dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 450 dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 451 dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 452 dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 453 dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 454 dwVidMemTotal: DWORD; // total amount of video memory 455 dwVidMemFree: DWORD; // amount of free video memory 456 dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays 457 dwCurrVisibleOverlays: DWORD; // current number of visible overlays 458 dwNumFourCCCodes: DWORD; // number of four cc codes 459 dwAlignBoundarySrc: DWORD; // source rectangle alignment 460 dwAlignSizeSrc: DWORD; // source rectangle byte size 461 dwAlignBoundaryDest: DWORD; // dest rectangle alignment 462 dwAlignSizeDest: DWORD; // dest rectangle byte size 463 dwAlignStrideAlign: DWORD; // stride alignment 464 dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported 465 ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities 466 dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 467 dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 468 dwMinLiveVideoStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only 469 dwMaxLiveVideoStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only 470 dwMinHwCodecStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only 471 dwMaxHwCodecStretch: DWORD; // OBSOLETE! This field remains for compatability reasons only 472 dwReserved1: DWORD; // reserved 473 dwReserved2: DWORD; // reserved 474 dwReserved3: DWORD; // reserved 475 end; 476 477(* 478 * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X. 479 * It is present for back compatability. 480 *) 481 PDDCAPS_DX3 = ^TDDCAPS_DX3; 482 TDDCAPS_DX3 = record 483 dwSize: DWORD; // size of the DDDRIVERCAPS structure 484 dwCaps: DWORD; // driver specific capabilities 485 dwCaps2: DWORD; // more driver specific capabilites 486 dwCKeyCaps: DWORD; // color key capabilities of the surface 487 dwFXCaps: DWORD; // driver specific stretching and effects capabilites 488 dwFXAlphaCaps: DWORD; // alpha driver specific capabilities 489 dwPalCaps: DWORD; // palette capabilities 490 dwSVCaps: DWORD; // stereo vision capabilities 491 dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 492 dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 493 dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 494 dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 495 dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 496 dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 497 dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 498 dwVidMemTotal: DWORD; // total amount of video memory 499 dwVidMemFree: DWORD; // amount of free video memory 500 dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays 501 dwCurrVisibleOverlays: DWORD; // current number of visible overlays 502 dwNumFourCCCodes: DWORD; // number of four cc codes 503 dwAlignBoundarySrc: DWORD; // source rectangle alignment 504 dwAlignSizeSrc: DWORD; // source rectangle byte size 505 dwAlignBoundaryDest: DWORD; // dest rectangle alignment 506 dwAlignSizeDest: DWORD; // dest rectangle byte size 507 dwAlignStrideAlign: DWORD; // stride alignment 508 509 dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported 510 ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities 511 dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 512 dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 513 dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 514 dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 515 dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 516 dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 517 dwReserved1: DWORD; // reserved 518 dwReserved2: DWORD; // reserved 519 dwReserved3: DWORD; // reserved 520 dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts 521 dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts 522 dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts 523 dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts 524 dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts 525 dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts 526 dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts 527 dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts 528 dwSSBCaps: DWORD; // driver specific capabilities for System->System blts 529 dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts 530 dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts 531 dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts 532 dwReserved4: DWORD; // reserved 533 dwReserved5: DWORD; // reserved 534 dwReserved6: DWORD; // reserved 535 end; 536 537(* 538 * This structure is the DDCAPS structure as it was in version 5 of Direct X. 539 * It is present for back compatability. 540 *) 541 PDDCAPS_DX5 = ^TDDCAPS_DX5; 542 TDDCAPS_DX5 = record 543(* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure 544(* 4*) dwCaps: DWORD; // driver specific capabilities 545(* 8*) dwCaps2: DWORD; // more driver specific capabilites 546(* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface 547(* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites 548(* 14*) dwFXAlphaCaps: DWORD; // alpha driver specific capabilities 549(* 18*) dwPalCaps: DWORD; // palette capabilities 550(* 1c*) dwSVCaps: DWORD; // stereo vision capabilities 551(* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 552(* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 553(* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 554(* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 555(* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 556(* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 557(* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 558(* 3c*) dwVidMemTotal: DWORD; // total amount of video memory 559(* 40*) dwVidMemFree: DWORD; // amount of free video memory 560(* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays 561(* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays 562(* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes 563(* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment 564(* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size 565(* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment 566(* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size 567(* 60*) dwAlignStrideAlign: DWORD; // stride alignment 568(* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported 569(* 84*) ddsCaps: TDDSCAPS; // DDSCAPS structure has all the general capabilities 570(* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 571(* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 572(* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 573(* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 574(* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 575(* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 576(* a0*) dwReserved1: DWORD; // reserved 577(* a4*) dwReserved2: DWORD; // reserved 578(* a8*) dwReserved3: DWORD; // reserved 579(* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts 580(* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts 581(* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts 582(* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts 583(* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts 584(* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts 585(* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts 586(* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts 587(*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts 588(*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts 589(*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts 590(*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts 591// Members added for DX5: 592(*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports 593(*134*) dwCurrVideoPorts: DWORD; // current number of video ports used 594(*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts 595(*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts 596(*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts 597(*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts 598(*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts 599(*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts 600 end; 601 602 PDDCAPS_DX6 = ^TDDCAPS_DX6; 603 TDDCAPS_DX6 = record 604(* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure 605(* 4*) dwCaps: DWORD; // driver specific capabilities 606(* 8*) dwCaps2: DWORD; // more driver specific capabilites 607(* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface 608(* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites 609(* 14*) dwFXAlphaCaps: DWORD; // alpha caps 610(* 18*) dwPalCaps: DWORD; // palette capabilities 611(* 1c*) dwSVCaps: DWORD; // stereo vision capabilities 612(* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 613(* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 614(* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 615(* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 616(* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 617(* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 618(* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 619(* 3c*) dwVidMemTotal: DWORD; // total amount of video memory 620(* 40*) dwVidMemFree: DWORD; // amount of free video memory 621(* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays 622(* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays 623(* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes 624(* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment 625(* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size 626(* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment 627(* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size 628(* 60*) dwAlignStrideAlign: DWORD; // stride alignment 629(* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported 630(* 84*) ddsOldCaps: TDDSCAPS; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6 631(* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 632(* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 633(* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 634(* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 635(* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 636(* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 637(* a0*) dwReserved1: DWORD; // reserved 638(* a4*) dwReserved2: DWORD; // reserved 639(* a8*) dwReserved3: DWORD; // reserved 640(* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts 641(* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts 642(* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts 643(* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts 644(* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts 645(* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts 646(* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts 647(* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts 648(*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts 649(*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts 650(*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts 651(*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts 652(*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports 653(*134*) dwCurrVideoPorts: DWORD; // current number of video ports used 654(*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts 655(*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts 656(*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts 657(*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts 658(*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts 659(*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts 660// Members added for DX6 release 661(*16c*) ddsCaps: TDDSCAPS2; // Surface Caps 662 end; 663 664 PDDCAPS_DX7 = ^TDDCAPS_DX7; 665 TDDCAPS_DX7 = record 666(* 0*) dwSize: DWORD; // size of the DDDRIVERCAPS structure 667(* 4*) dwCaps: DWORD; // driver specific capabilities 668(* 8*) dwCaps2: DWORD; // more driver specific capabilites 669(* c*) dwCKeyCaps: DWORD; // color key capabilities of the surface 670(* 10*) dwFXCaps: DWORD; // driver specific stretching and effects capabilites 671(* 14*) dwFXAlphaCaps: DWORD; // alpha driver specific capabilities 672(* 18*) dwPalCaps: DWORD; // palette capabilities 673(* 1c*) dwSVCaps: DWORD; // stereo vision capabilities 674(* 20*) dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 675(* 24*) dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 676(* 28*) dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 677(* 2c*) dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 678(* 30*) dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 679(* 34*) dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 680(* 38*) dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 681(* 3c*) dwVidMemTotal: DWORD; // total amount of video memory 682(* 40*) dwVidMemFree: DWORD; // amount of free video memory 683(* 44*) dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays 684(* 48*) dwCurrVisibleOverlays: DWORD; // current number of visible overlays 685(* 4c*) dwNumFourCCCodes: DWORD; // number of four cc codes 686(* 50*) dwAlignBoundarySrc: DWORD; // source rectangle alignment 687(* 54*) dwAlignSizeSrc: DWORD; // source rectangle byte size 688(* 58*) dwAlignBoundaryDest: DWORD; // dest rectangle alignment 689(* 5c*) dwAlignSizeDest: DWORD; // dest rectangle byte size 690(* 60*) dwAlignStrideAlign: DWORD; // stride alignment 691(* 64*) dwRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported 692(* 84*) ddsOldCaps: TDDSCAPS; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6 693(* 88*) dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 694(* 8c*) dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 695(* 90*) dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 696(* 94*) dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 697(* 98*) dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 698(* 9c*) dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 699(* a0*) dwReserved1: DWORD; // reserved 700(* a4*) dwReserved2: DWORD; // reserved 701(* a8*) dwReserved3: DWORD; // reserved 702(* ac*) dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts 703(* b0*) dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts 704(* b4*) dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts 705(* b8*) dwSVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->Vmem blts 706(* d8*) dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts 707(* dc*) dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts 708(* e0*) dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts 709(* e4*) dwVSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for Vmem->System blts 710(*104*) dwSSBCaps: DWORD; // driver specific capabilities for System->System blts 711(*108*) dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts 712(*10c*) dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts 713(*110*) dwSSBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for System->System blts 714(*130*) dwMaxVideoPorts: DWORD; // maximum number of usable video ports 715(*134*) dwCurrVideoPorts: DWORD; // current number of video ports used 716(*138*) dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts 717(*13c*) dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts 718(*140*) dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts 719(*144*) dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts 720(*148*) dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts 721(*14c*) dwNLVBRops: array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts 722// Members added for DX6 release 723(*16c*) ddsCaps: TDDSCAPS2; // Surface Caps 724 end; 725 726 727{$IF DIRECTDRAW_VERSION <= $300} 728 TDDCAPS = TDDCAPS_DX3; 729{$ELSEIF DIRECTDRAW_VERSION <= $500} 730 TDDCAPS = TDDCAPS_DX5; 731{$ELSEIF DIRECTDRAW_VERSION <= $600} 732 TDDCAPS = TDDCAPS_DX6; 733{$ELSE} 734 TDDCAPS = TDDCAPS_DX7; 735{$ENDIF} 736 737 PDDCAPS = TDDCAPS; 738 739 740 741(* 742 * DDPIXELFORMAT 743 *) 744 PDDPIXELFORMAT = ^TDDPIXELFORMAT; 745 TDDPIXELFORMAT = record 746 dwSize: DWORD; // size of structure 747 dwFlags: DWORD; // pixel format flags 748 dwFourCC: DWORD; // (FOURCC code) 749 case Integer of 750 0: ( 751 dwRGBBitCount: DWORD; // how many bits per pixel 752 ); 753 1: ( 754 dwYUVBitCount: DWORD; // how many bits per pixel 755 ); 756 2: ( 757 dwZBufferBitDepth: DWORD; // how many total bits/pixel in z buffer (including any stencil bits) 758 ); 759 3: ( 760 dwAlphaBitDepth: DWORD; // how many bits for alpha channels 761 ); 762 4: ( 763 dwLuminanceBitCount: DWORD; // how many bits per pixel 764 ); 765 5: ( 766 dwBumpBitCount: DWORD; // how many bits per "buxel", total 767 ); 768 6: ( 769 dwPrivateFormatBitCount: DWORD; // Bits per pixel of private driver formats. Only valid in texture 770 // format list and if DDPF_D3DFORMAT is set 771 772 case Integer of 773 0: ( 774 dwRBitMask: DWORD; // mask for red bit 775 ); 776 1: ( 777 dwYBitMask: DWORD; // mask for Y bits 778 ); 779 2: ( 780 dwStencilBitDepth: DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits) 781 ); 782 3: ( 783 dwLuminanceBitMask: DWORD; // mask for luminance bits 784 ); 785 4: ( 786 dwBumpDuBitMask: DWORD; // mask for bump map U delta bits 787 ); 788 5: ( 789 dwOperations: DWORD; // DDPF_D3DFORMAT Operations 790 791 case Integer of 792 0: ( 793 dwGBitMask: DWORD; // mask for green bits 794 ); 795 1: ( 796 dwUBitMask: DWORD; // mask for U bits 797 ); 798 2: ( 799 dwZBitMask: DWORD; // mask for Z bits 800 ); 801 3: ( 802 dwBumpDvBitMask: DWORD; // mask for bump map V delta bits 803 ); 804 4: ( 805 MultiSampleCaps: record 806 wFlipMSTypes: WORD; // Multisample methods supported via flip for this D3DFORMAT 807 wBltMSTypes: WORD; // Multisample methods supported via blt for this D3DFORMAT 808 end; 809 810 case Integer of 811 0: ( 812 dwBBitMask: DWORD; // mask for blue bits 813 ); 814 1: ( 815 dwVBitMask: DWORD; // mask for V bits 816 ); 817 2: ( 818 dwStencilBitMask: DWORD; // mask for stencil bits 819 ); 820 3: ( 821 dwBumpLuminanceBitMask: DWORD; // mask for luminance in bump map 822 823 case Integer of 824 0: ( 825 dwRGBAlphaBitMask: DWORD; // mask for alpha channel 826 ); 827 1: ( 828 dwYUVAlphaBitMask: DWORD; // mask for alpha channel 829 ); 830 2: ( 831 dwLuminanceAlphaBitMask: DWORD; // mask for alpha channel 832 ); 833 3: ( 834 dwRGBZBitMask: DWORD; // mask for Z channel 835 ); 836 4: ( 837 dwYUVZBitMask: DWORD; // mask for Z channel 838 ); 839 ); 840 ); 841 ); 842 ); 843 end; 844 845(* 846 * DDOVERLAYFX 847 *) 848 PDDOVERLAYFX = ^TDDOVERLAYFX; 849 TDDOVERLAYFX = record 850 dwSize: DWORD; // size of structure 851 dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend 852 dwAlphaEdgeBlend: DWORD; // Constant to use as alpha for edge blend 853 dwReserved: DWORD; 854 dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination 855 case Integer of 856 0: ( 857 dwAlphaDestConst: DWORD; // Constant to use as alpha channel for dest 858 ); 859 1: ( 860 lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as alpha channel for dest 861 862 dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source 863 case Integer of 864 0: ( 865 dwAlphaSrcConst: DWORD; // Constant to use as alpha channel for src 866 ); 867 1: ( 868 lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as alpha channel for src 869 870 dckDestColorkey: TDDCOLORKEY; // DestColorkey override 871 dckSrcColorkey: TDDCOLORKEY; // DestColorkey override 872 dwDDFX: DWORD; // Overlay FX 873 dwFlags: DWORD; // flags 874 ); 875 ); 876 end; 877 878 879(* 880 * DDBLTBATCH: BltBatch entry structure 881 *) 882 PDDBLTBATCH = ^TDDBLTBATCH; 883 TDDBLTBATCH = record 884 lprDest: PRECT; 885 lpDDSSrc: IDirectDrawSurface; 886 lprSrc: PRECT; 887 dwFlags: DWORD; 888 lpDDBltFx: PDDBLTFX; 889 end; 890 891 892(* 893 * DDGAMMARAMP 894 *) 895 PDDGAMMARAMP = ^TDDGAMMARAMP; 896 TDDGAMMARAMP = record 897 red: array [0..255] of WORD; 898 green: array [0..255] of WORD; 899 blue: array [0..255] of WORD; 900 end; 901 902(* 903 * This is the structure within which DirectDraw returns data about the current graphics driver and chipset 904 *) 905 906const 907 MAX_DDDEVICEID_STRING = 512; 908 909type 910 PDDDEVICEIDENTIFIER = ^TDDDEVICEIDENTIFIER; 911 TDDDEVICEIDENTIFIER = record 912 (* 913 * These elements are for presentation to the user only. They should not be used to identify particular 914 * drivers, since this is unreliable and many different strings may be associated with the same 915 * device, and the same driver from different vendors. 916 *) 917 szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char; 918 szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char; 919 920 (* 921 * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons 922 * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic 923 * drivers. It is recommended that guidDeviceIdentifier is used for this purpose. 924 * 925 * This version has the form: 926 * wProduct = HIWORD(liDriverVersion.HighPart) 927 * wVersion = LOWORD(liDriverVersion.HighPart) 928 * wSubVersion = HIWORD(liDriverVersion.LowPart) 929 * wBuild = LOWORD(liDriverVersion.LowPart) 930 *) 931//#ifdef _WIN32 932 liDriverVersion: LARGE_INTEGER; { Defined for applications and other 32 bit components } 933//#else 934// DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */ 935// DWORD dwDriverVersionHighPart; 936//#endif 937 938 939 (* 940 * These elements can be used to identify particular chipsets. Use with extreme caution. 941 * dwVendorId Identifies the manufacturer. May be zero if unknown. 942 * dwDeviceId Identifies the type of chipset. May be zero if unknown. 943 * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. 944 * dwRevision Identifies the revision level of the chipset. May be zero if unknown. 945 *) 946 dwVendorId: DWORD; 947 dwDeviceId: DWORD; 948 dwSubSysId: DWORD; 949 dwRevision: DWORD; 950 951 (* 952 * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the 953 * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to 954 * reprofile the graphics subsystem. 955 * This element can also be used to identify particular problematic drivers. 956 *) 957 guidDeviceIdentifier: TGuid; 958 end; 959 960 PDDDEVICEIDENTIFIER2 = ^TDDDEVICEIDENTIFIER2; 961 TDDDEVICEIDENTIFIER2 = record 962 (* 963 * These elements are for presentation to the user only. They should not be used to identify particular 964 * drivers, since this is unreliable and many different strings may be associated with the same 965 * device, and the same driver from different vendors. 966 *) 967 szDriver: array [0..MAX_DDDEVICEID_STRING-1] of char; 968 szDescription: array [0..MAX_DDDEVICEID_STRING-1] of char; 969 970 (* 971 * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons 972 * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic 973 * drivers. It is recommended that guidDeviceIdentifier is used for this purpose. 974 * 975 * This version has the form: 976 * wProduct = HIWORD(liDriverVersion.HighPart) 977 * wVersion = LOWORD(liDriverVersion.HighPart) 978 * wSubVersion = HIWORD(liDriverVersion.LowPart) 979 * wBuild = LOWORD(liDriverVersion.LowPart) 980 *) 981//#ifdef _WIN32 982 liDriverVersion: LARGE_INTEGER; { Defined for applications and other 32 bit components } 983//#else 984// DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */ 985// DWORD dwDriverVersionHighPart; 986//#endif 987 988 989 (* 990 * These elements can be used to identify particular chipsets. Use with extreme caution. 991 * dwVendorId Identifies the manufacturer. May be zero if unknown. 992 * dwDeviceId Identifies the type of chipset. May be zero if unknown. 993 * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. 994 * dwRevision Identifies the revision level of the chipset. May be zero if unknown. 995 *) 996 dwVendorId: DWORD; 997 dwDeviceId: DWORD; 998 dwSubSysId: DWORD; 999 dwRevision: DWORD; 1000 1001 (* 1002 * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the 1003 * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to 1004 * reprofile the graphics subsystem. 1005 * This element can also be used to identify particular problematic drivers. 1006 *) 1007 guidDeviceIdentifier: TGuid; 1008 1009 (* 1010 * This element is used to determine the Windows Hardware Quality Lab (WHQL) 1011 * certification level for this driver/device pair. 1012 *) 1013 dwWHQLLevel: DWORD; 1014 1015end; 1016 1017(* 1018 * Flags for the IDirectDraw4::GetDeviceIdentifier method 1019 *) 1020 1021(* 1022 * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped 1023 * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the 1024 * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is 1025 * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities 1026 * of the DirectDraw object involved. 1027 *) 1028const 1029 DDGDI_GETHOSTIDENTIFIER = $00000001; 1030 1031 1032(* 1033 * callbacks 1034 *) 1035{typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext ); 1036#ifdef STREAMING 1037typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD); 1038#endif} 1039 1040type 1041(* 1042 * DDSURFACEDESC 1043 *) 1044 PDDSURFACEDESC = ^TDDSURFACEDESC; 1045 TDDSURFACEDESC = record 1046 dwSize: DWORD; // size of the DDSURFACEDESC structure 1047 dwFlags: DWORD; // determines what fields are valid 1048 dwHeight: DWORD; // height of surface to be created 1049 dwWidth: DWORD; // width of input surface 1050 case Integer of 1051 0: ( 1052 lPitch: LONG; // distance to start of next line (return value only) 1053 ); 1054 1: ( 1055 dwLinearSize: DWORD; // Formless late-allocated optimized surface size 1056 1057 dwBackBufferCount: DWORD; // number of back buffers requested 1058 case Integer of 1059 0: ( 1060 dwMipMapCount: DWORD; // number of mip-map levels requested 1061 ); 1062 1: ( 1063 dwZBufferBitDepth: DWORD; // depth of Z buffer requested 1064 ); 1065 2: ( 1066 dwRefreshRate: DWORD; // refresh rate (used when display mode is described) 1067 1068 dwAlphaBitDepth: DWORD; // depth of alpha buffer requested 1069 dwReserved: DWORD; // reserved 1070 lpSurface: LPVOID; // pointer to the associated surface memory 1071 ddckCKDestOverlay: TDDCOLORKEY; // color key for destination overlay use 1072 ddckCKDestBlt: TDDCOLORKEY; // color key for destination blt use 1073 ddckCKSrcOverlay: TDDCOLORKEY; // color key for source overlay use 1074 ddckCKSrcBlt: TDDCOLORKEY; // color key for source blt use 1075 ddpfPixelFormat: TDDPIXELFORMAT; // pixel format description of the surface 1076 ddsCaps: TDDSCAPS; // direct draw surface capabilities 1077 ); 1078 ); 1079 end; 1080 1081(* 1082 * DDSURFACEDESC2 1083 *) 1084 PDDSURFACEDESC2 = ^TDDSURFACEDESC2; 1085 TDDSURFACEDESC2 = record 1086 dwSize: DWORD; // size of the DDSURFACEDESC structure 1087 dwFlags: DWORD; // determines what …
Large files files are truncated, but you can click here to view the full file