DirectDraw.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:262k
- {******************************************************************************}
- {* *}
- {* Copyright (C) Microsoft Corporation. All Rights Reserved. *}
- {* *}
- {* Files: ddraw.h dvp.h *}
- {* Content: DirectDraw and DirectDrawVideoPort include files *}
- {* *}
- {* DirectX 9.0 Delphi adaptation by Alexey Barkovoy *}
- {* E-Mail: clootie@reactor.ru *}
- {* *}
- {* Modified: 26-Jan-2003 *}
- {* *}
- {* Based upon : *}
- {* DirectX 7.0 Object Pascal adaptation by *}
- {* Erik Unger, e-Mail: DelphiDirectX@next-reality.com *}
- {* *}
- {* Latest version can be downloaded from: *}
- {* http://clootie.narod.ru/delphi/ *}
- {* *}
- {******************************************************************************}
- { }
- { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); you may not use this file except }
- { in compliance with the License. You may obtain a copy of the License at }
- { http://www.mozilla.org/MPL/MPL-1.1.html }
- { }
- { Software distributed under the License is distributed on an "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- ///////////////////////////////////////////////////////////////////////////////
- // Notes:
- //----------------------------------------------------------------------------
- // Possible input defines for this file, mapped to original C values:
- // DIRECTDRAW_VERSION_7 : DIRECTDRAW_VERSION = 0x0700,
- // DIRECTDRAW_VERSION_6 : DIRECTDRAW_VERSION = 0x0600,
- // DIRECTDRAW_VERSION_5 : DIRECTDRAW_VERSION = 0x0500,
- // DIRECTDRAW_VERSION_3 : DIRECTDRAW_VERSION = 0x0300,
- // DIRECTDRAW_VERSION_LESS_3 : DIRECTDRAW_VERSION < 0x0300,
- //
- // By default DIRECTDRAW_VERSION_7 (DIRECTDRAW_VERSION = 0x0700) is assumed
- //
- // Also you can use generic DIRECTXx defines, so:
- // DIRECTX7 equal to DIRECTDRAW_VERSION_7;
- // DIRECTX6 equal to DIRECTDRAW_VERSION_6;
- // DIRECTX5 equal to DIRECTDRAW_VERSION_5;
- // DIRECTX3 equal to DIRECTDRAW_VERSION_3
- ///////////////////////////////////////////////////////////////////////////////
- unit DirectDraw;
- interface
- {$I DirectX.inc}
- ////////////////////////////////////////////////////////////////////////
- // Global level dynamic loading support
- {$IFDEF DYNAMIC_LINK_ALL}
- {$DEFINE DIRECTDRAW_DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK_EXPLICIT_ALL}
- {$DEFINE DIRECTDRAW_DYNAMIC_LINK_EXPLICIT}
- {$ENDIF}
- // Remove "dots" below to force some kind of dynamic linking
- {.$DEFINE DIRECTDRAW_DYNAMIC_LINK}
- {.$DEFINE DIRECTDRAW_DYNAMIC_LINK_EXPLICIT}
- ////////////////////////////////////////////////////////////////////////
- // Assume for what DirectDraw version we will compile headers
- {$IFDEF DIRECTX7}
- {$DEFINE DIRECTDRAW_VERSION_7}
- {$ENDIF}
- {$IFDEF DIRECTX6}
- {$DEFINE DIRECTDRAW_VERSION_6}
- {$ENDIF}
- {$IFDEF DIRECTX5}
- {$DEFINE DIRECTDRAW_VERSION_5}
- {$ENDIF}
- {$IFDEF DIRECTX3}
- {$DEFINE DIRECTDRAW_VERSION_3}
- {$ENDIF}
- {$IFNDEF DIRECTDRAW_VERSION_7}
- {$IFNDEF DIRECTDRAW_VERSION_6}
- {$IFNDEF DIRECTDRAW_VERSION_5}
- {$IFNDEF DIRECTDRAW_VERSION_3}
- {$IFNDEF DIRECTDRAW_VERSION_LESS_3}
- {$DEFINE DIRECTDRAW_VERSION_7} // Compiling for DirectDraw7 by default
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- ////////////////////////////////////////////////////////////////////////
- // Emit conditionals to C++Builder compiler
- {$IFDEF DIRECTDRAW_VERSION_LESS_3}
- {$HPPEMIT '#define DIRECTDRAW_VERSION 0x0100'}
- {$ENDIF}
- {$IFDEF DIRECTDRAW_VERSION_3}
- {$HPPEMIT '#define DIRECTDRAW_VERSION 0x0300'}
- {$ENDIF}
- {$IFDEF DIRECTDRAW_VERSION_5}
- {$HPPEMIT '#define DIRECTDRAW_VERSION 0x0500'}
- {$ENDIF}
- {$IFDEF DIRECTDRAW_VERSION_6}
- {$HPPEMIT '#define DIRECTDRAW_VERSION 0x0600'}
- {$ENDIF}
- {$IFDEF DIRECTDRAW_VERSION_7}
- {$HPPEMIT '#define DIRECTDRAW_VERSION 0x0700'}
- {$ENDIF}
- ////////////////////////////////////////////////////////////////////////
- // Define symbols for '<=' comparision
- {$IFDEF DIRECTDRAW_VERSION_7}
- {$DEFINE DIRECTDRAW_VERSION_6}
- {$ENDIF}
- {$IFDEF DIRECTDRAW_VERSION_6}
- {$DEFINE DIRECTDRAW_VERSION_5}
- {$ENDIF}
- {$IFDEF DIRECTDRAW_VERSION_5}
- {$DEFINE DIRECTDRAW_VERSION_3}
- {$ENDIF}
- {$IFDEF DIRECTDRAW_VERSION_3}
- {$DEFINE DIRECTDRAW_VERSION_LESS_3}
- {$ENDIF}
- (*$HPPEMIT '#include "ddraw.h"' *)
- (*$HPPEMIT '#include "dvp.h"' *)
- uses
- Windows;
-
- (*==========================================================================;
- *
- * Copyright (C) Microsoft Corporation. All Rights Reserved.
- *
- * File: ddraw.h
- * Content: DirectDraw include file
- *
- ***************************************************************************)
- function MAKEFOURCC(ch0, ch1, ch2, ch3: Char): DWORD;
- {$EXTERNALSYM MAKEFOURCC}
- (*
- * FOURCC codes for DX compressed-texture pixel formats
- *)
- const
- //#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
- FOURCC_DXT1 = DWORD(Byte('D') or (Byte('X') shl 8) or (Byte('T') shl 16) or (Byte('1') shl 24));
- {$EXTERNALSYM FOURCC_DXT1}
- //#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
- FOURCC_DXT2 = DWORD(Byte('D') or (Byte('X') shl 8) or (Byte('T') shl 16) or (Byte('2') shl 24));
- {$EXTERNALSYM FOURCC_DXT2}
- //#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
- FOURCC_DXT3 = DWORD(Byte('D') or (Byte('X') shl 8) or (Byte('T') shl 16) or (Byte('3') shl 24));
- {$EXTERNALSYM FOURCC_DXT3}
- //#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
- FOURCC_DXT4 = DWORD(Byte('D') or (Byte('X') shl 8) or (Byte('T') shl 16) or (Byte('4') shl 24));
- {$EXTERNALSYM FOURCC_DXT4}
- //#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
- FOURCC_DXT5 = DWORD(Byte('D') or (Byte('X') shl 8) or (Byte('T') shl 16) or (Byte('5') shl 24));
- {$EXTERNALSYM FOURCC_DXT5}
- (*
- * GUIDS used by DirectDraw objects
- *)
- const
- CLSID_DirectDraw: TGUID = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}';
- {$EXTERNALSYM CLSID_DirectDraw}
- CLSID_DirectDraw7: TGUID = '{3c305196-50db-11d3-9cfe-00c04fd930c5}';
- {$EXTERNALSYM CLSID_DirectDraw7}
- CLSID_DirectDrawClipper: TGUID = '{593817A0-7DB3-11CF-A2DE-00AA00b93356}';
- {$EXTERNALSYM CLSID_DirectDrawClipper}
- (* These GUID's defined later by typedefing to Delphi interfaces
- DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
- DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
- DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
- DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
- DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
- DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
- DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
- DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
- DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
- DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
- DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
- DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
- DEFINE_GUID( IID_IDirectDrawGammaControl, 0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
- *)
- const
- DD_ROP_SPACE = (256 div 32); // space required to store ROP array
- {$EXTERNALSYM DD_ROP_SPACE}
- MAX_DDDEVICEID_STRING = 512;
- {$EXTERNALSYM MAX_DDDEVICEID_STRING}
- (*============================================================================
- *
- * DirectDraw Structures
- *
- * Various structures used to invoke DirectDraw.
- *
- *==========================================================================*)
- var
- NilGUID : TGUID = '{00000000-0000-0000-0000-000000000000}';
- type
- //Clootie: This was originally in Erik Unger headers - don't know why, so leave it alone
- TRefGUID = packed record
- case Integer of
- 1: (guid : PGUID);
- 2: (dwFlags : DWORD);
- end;
- REFGUID = PGUID;
- {$EXTERNALSYM REFGUID}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDraw);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDraw2);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDraw4);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDraw7);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawSurface);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawSurface2);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawSurface3);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawSurface4);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawSurface7);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawPalette);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawClipper);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawColorControl);'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectDrawGammaControl);'}
-
- IDirectDraw = interface;
- {$EXTERNALSYM IDirectDraw}
- IDirectDraw2 = interface;
- {$EXTERNALSYM IDirectDraw2}
- IDirectDraw4 = interface;
- {$EXTERNALSYM IDirectDraw4}
- IDirectDraw7 = interface;
- {$EXTERNALSYM IDirectDraw7}
- IDirectDrawSurface = interface;
- {$EXTERNALSYM IDirectDrawSurface}
- IDirectDrawSurface2 = interface;
- {$EXTERNALSYM IDirectDrawSurface2}
- IDirectDrawSurface3 = interface;
- {$EXTERNALSYM IDirectDrawSurface3}
- IDirectDrawSurface4 = interface;
- {$EXTERNALSYM IDirectDrawSurface4}
- IDirectDrawSurface7 = interface;
- {$EXTERNALSYM IDirectDrawSurface7}
- IDirectDrawPalette = interface;
- {$EXTERNALSYM IDirectDrawPalette}
- IDirectDrawClipper = interface;
- {$EXTERNALSYM IDirectDrawClipper}
- IDirectDrawColorControl = interface;
- {$EXTERNALSYM IDirectDrawColorControl}
- IDirectDrawGammaControl = interface;
- {$EXTERNALSYM IDirectDrawGammaControl}
- (*
- * Generic pixel format with 8-bit RGB and alpha components
- *)
- PDDARGB = ^TDDARGB;
- _DDARGB = packed record
- blue: Byte;
- green: Byte;
- red: Byte;
- alpha: Byte;
- end;
- {$EXTERNALSYM _DDARGB}
- DDARGB = _DDARGB;
- {$EXTERNALSYM DDARGB}
- TDDARGB = _DDARGB;
- (*
- * This version of the structure remains for backwards source compatibility.
- * The DDARGB structure is the one that should be used for all DirectDraw APIs.
- *)
- PDDRGBA = ^TDDRGBA;
- _DDRGBA = packed record
- red : Byte;
- green : Byte;
- blue : Byte;
- alpha : Byte;
- end;
- {$EXTERNALSYM _DDRGBA}
- DDRGBA = _DDRGBA;
- {$EXTERNALSYM DDRGBA}
- TDDRGBA = _DDRGBA;
- (*
- * TDDColorKey
- *)
- PDDColorKey = ^TDDColorKey;
- _DDCOLORKEY = packed record
- dwColorSpaceLowValue: DWORD; // low boundary of color space that is to
- // be treated as Color Key, inclusive
- dwColorSpaceHighValue: DWORD; // high boundary of color space that is
- // to be treated as Color Key, inclusive
- end;
- {$EXTERNALSYM _DDCOLORKEY}
- DDCOLORKEY = _DDCOLORKEY;
- {$EXTERNALSYM DDCOLORKEY}
- TDDColorKey = _DDCOLORKEY;
- // Delphi 5 and up don't allow interfaces in variant records
- // so we have to use pointers instead (which can be type-casted into interfaces):
- {$IFDEF COMPILER5_UP}
- PDirectDrawSurface = Pointer;
- {$ELSE}
- PDirectDrawSurface = IDirectDrawSurface;
- {$ENDIF}
- (*
- * TDDBltFX
- * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
- *)
- PDDBltFX = ^TDDBltFX;
- _DDBLTFX = packed record
- dwSize : DWORD; // size of structure
- dwDDFX : DWORD; // FX operations
- dwROP : DWORD; // Win32 raster operations
- dwDDROP : DWORD; // Raster operations new for DirectDraw
- dwRotationAngle : DWORD; // Rotation angle for blt
- dwZBufferOpCode : DWORD; // ZBuffer compares
- dwZBufferLow : DWORD; // Low limit of Z buffer
- dwZBufferHigh : DWORD; // High limit of Z buffer
- dwZBufferBaseDest : DWORD; // Destination base value
- dwZDestConstBitDepth : DWORD; // Bit depth used to specify Z constant for destination
- case Integer of
- 0: (
- dwZDestConst : DWORD // Constant to use as Z buffer for dest
- );
- 1: (
- lpDDSZBufferDest : PDirectDrawSurface; // Surface to use as Z buffer for dest
- dwZSrcConstBitDepth : DWORD; // Bit depth used to specify Z constant for source
- case integer of
- 0: (
- dwZSrcConst : DWORD; // Constant to use as Z buffer for src
- );
- 1: (
- lpDDSZBufferSrc : PDirectDrawSurface; // Surface to use as Z buffer for src
- dwAlphaEdgeBlendBitDepth : DWORD; // Bit depth used to specify constant for alpha edge blend
- dwAlphaEdgeBlend : DWORD; // Alpha for edge blending
- dwReserved : DWORD;
- dwAlphaDestConstBitDepth : DWORD; // Bit depth used to specify alpha constant for destination
- case integer of
- 0: (
- dwAlphaDestConst : DWORD; // Constant to use as Alpha Channel
- );
- 1: (
- lpDDSAlphaDest : PDirectDrawSurface; // Surface to use as Alpha Channel
- dwAlphaSrcConstBitDepth : DWORD; // Bit depth used to specify alpha constant for source
- case integer of
- 0: (
- dwAlphaSrcConst : DWORD; // Constant to use as Alpha Channel
- );
- 1: (
- lpDDSAlphaSrc : PDirectDrawSurface; // Surface to use as Alpha Channel
- case integer of
- 0: (
- dwFillColor : DWORD; // color in RGB or Palettized
- );
- 1: (
- dwFillDepth : DWORD; // depth value for z-buffer
- );
- 2: (
- dwFillPixel : DWORD; // pixel value
- );
- 3: (
- lpDDSPattern : PDirectDrawSurface; // Surface to use as pattern
- ddckDestColorkey : TDDColorKey; // DestColorkey override
- ddckSrcColorkey : TDDColorKey; // SrcColorkey override
- )
- )
- )
- )
- )
- end;
- {$EXTERNALSYM _DDBLTFX}
- DDBLTFX = _DDBLTFX;
- {$EXTERNALSYM DDBLTFX}
- TDDBltFX = _DDBLTFX;
- (*
- * TDDSCaps
- *)
- PDDSCaps = ^TDDSCaps;
- _DDSCAPS = packed record
- dwCaps: DWORD; // capabilities of surface wanted
- end;
- {$EXTERNALSYM _DDSCAPS}
- DDSCAPS = _DDSCAPS;
- {$EXTERNALSYM DDSCAPS}
- TDDSCaps = _DDSCAPS;
- (*
- * TDDOSCaps
- *)
- PDDOSCaps = ^TDDOSCaps;
- _DDOSCAPS = packed record
- dwCaps: DWORD; // capabilities of surface wanted
- end;
- {$EXTERNALSYM _DDOSCAPS}
- DDOSCAPS = _DDOSCAPS;
- {$EXTERNALSYM DDOSCAPS}
- TDDOSCaps = _DDOSCAPS;
- (*
- * This structure is used internally by DirectDraw.
- *)
- PDDSCapsEx = ^TDDSCapsEx;
- _DDSCAPSEX = packed record
- dwCaps2 : DWORD;
- dwCaps3 : DWORD;
- dwCaps4 : DWORD;
- end;
- {$EXTERNALSYM _DDSCAPSEX}
- DDSCAPSEX = _DDSCAPSEX;
- {$EXTERNALSYM DDSCAPSEX}
- TDDSCapsEx = _DDSCAPSEX;
- (*
- * TDDSCaps2
- *)
- PDDSCaps2 = ^TDDSCaps2;
- _DDSCAPS2 = packed record
- dwCaps: DWORD; // capabilities of surface wanted
- dwCaps2 : DWORD;
- dwCaps3 : DWORD;
- dwCaps4 : DWORD;
- end;
- {$EXTERNALSYM _DDSCAPS2}
- DDSCAPS2 = _DDSCAPS2;
- {$EXTERNALSYM DDSCAPS2}
- TDDSCaps2 = _DDSCAPS2;
- (*
- * NOTE: Our choosen structure number scheme is to append a single digit to
- * the end of the structure giving the version that structure is associated
- * with.
- *)
- (*
- * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally
- * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0.
- * New applications should use the DDCAPS structure defined below.
- *)
- PDDCaps_DX1 = ^TDDCaps_DX1;
- _DDCAPS_DX1 = packed record
- dwSize: DWORD; // size of the DDDRIVERCAPS structure
- dwCaps: DWORD; // driver specific capabilities
- dwCaps2: DWORD; // more driver specific capabilites
- dwCKeyCaps: DWORD; // color key capabilities of the surface
- dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- dwPalCaps: DWORD; // palette capabilities
- dwSVCaps: DWORD; // stereo vision capabilities
- dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- dwVidMemTotal: DWORD; // total amount of video memory
- dwVidMemFree: DWORD; // amount of free video memory
- dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- dwNumFourCCCodes: DWORD; // number of four cc codes
- dwAlignBoundarySrc: DWORD; // source rectangle alignment
- dwAlignSizeSrc: DWORD; // source rectangle byte size
- dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- dwAlignSizeDest: DWORD; // dest rectangle byte size
- dwAlignStrideAlign: DWORD; // stride alignment
- dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities
- dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwReserved1: DWORD; // reserved
- dwReserved2: DWORD; // reserved
- dwReserved3: DWORD; // reserved
- end;
- {$EXTERNALSYM _DDCAPS_DX1}
- DDCAPS_DX1 = _DDCAPS_DX1;
- {$EXTERNALSYM DDCAPS_DX1}
- TDDCaps_DX1 = _DDCAPS_DX1;
- (*
- * This structure is the TDDCaps structure as it was in version 2 and 3 of Direct X.
- * It is present for back compatability.
- *)
- PDDCaps_DX3 = ^TDDCaps_DX3;
- _DDCAPS_DX3 = packed record
- dwSize: DWORD; // size of the DDDRIVERCAPS structure
- dwCaps: DWORD; // driver specific capabilities
- dwCaps2: DWORD; // more driver specific capabilites
- dwCKeyCaps: DWORD; // color key capabilities of the surface
- dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- dwPalCaps: DWORD; // palette capabilities
- dwSVCaps: DWORD; // stereo vision capabilities
- dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- dwVidMemTotal: DWORD; // total amount of video memory
- dwVidMemFree: DWORD; // amount of free video memory
- dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- dwNumFourCCCodes: DWORD; // number of four cc codes
- dwAlignBoundarySrc: DWORD; // source rectangle alignment
- dwAlignSizeSrc: DWORD; // source rectangle byte size
- dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- dwAlignSizeDest: DWORD; // dest rectangle byte size
- dwAlignStrideAlign: DWORD; // stride alignment
- dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities
- dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwReserved1: DWORD; // reserved
- dwReserved2: DWORD; // reserved
- dwReserved3: DWORD; // reserved
- dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
- dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
- dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
- dwReserved4 : DWORD;
- dwReserved5 : DWORD;
- dwReserved6 : DWORD;
- end;
- {$EXTERNALSYM _DDCAPS_DX3}
- DDCAPS_DX3 = _DDCAPS_DX3;
- {$EXTERNALSYM DDCAPS_DX3}
- TDDCaps_DX3 = _DDCAPS_DX3;
- (*
- * This structure is the TDDCaps structure as it was in version 5 of Direct X.
- * It is present for back compatability.
- *)
- PDDCaps_DX5 = ^TDDCaps_DX5;
- _DDCAPS_DX5 = packed record
- dwSize: DWORD; // size of the DDDRIVERCAPS structure
- dwCaps: DWORD; // driver specific capabilities
- dwCaps2: DWORD; // more driver specific capabilites
- dwCKeyCaps: DWORD; // color key capabilities of the surface
- dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- dwPalCaps: DWORD; // palette capabilities
- dwSVCaps: DWORD; // stereo vision capabilities
- dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- dwVidMemTotal: DWORD; // total amount of video memory
- dwVidMemFree: DWORD; // amount of free video memory
- dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- dwNumFourCCCodes: DWORD; // number of four cc codes
- dwAlignBoundarySrc: DWORD; // source rectangle alignment
- dwAlignSizeSrc: DWORD; // source rectangle byte size
- dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- dwAlignSizeDest: DWORD; // dest rectangle byte size
- dwAlignStrideAlign: DWORD; // stride alignment
- dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities
- dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwReserved1: DWORD; // reserved
- dwReserved2: DWORD; // reserved
- dwReserved3: DWORD; // reserved
- dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
- dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
- dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
- // Members added for DX5:
- dwMaxVideoPorts: DWORD; // maximum number of usable video ports
- dwCurrVideoPorts: DWORD; // current number of video ports used
- dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
- dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
- dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
- dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
- dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
- dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
- end;
- {$EXTERNALSYM _DDCAPS_DX5}
- DDCAPS_DX5 = _DDCAPS_DX5;
- {$EXTERNALSYM DDCAPS_DX5}
- TDDCaps_DX5 = _DDCAPS_DX5;
- PDDCaps_DX6 = ^TDDCaps_DX6;
- _DDCAPS_DX6 = packed record
- dwSize: DWORD; // size of the DDDRIVERCAPS structure
- dwCaps: DWORD; // driver specific capabilities
- dwCaps2: DWORD; // more driver specific capabilites
- dwCKeyCaps: DWORD; // color key capabilities of the surface
- dwFXCaps: DWORD; // driver specific stretching and effects capabilites
- dwFXAlphaCaps: DWORD; // alpha driver specific capabilities
- dwPalCaps: DWORD; // palette capabilities
- dwSVCaps: DWORD; // stereo vision capabilities
- dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8
- dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8
- dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
- dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32
- dwVidMemTotal: DWORD; // total amount of video memory
- dwVidMemFree: DWORD; // amount of free video memory
- dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays
- dwCurrVisibleOverlays: DWORD; // current number of visible overlays
- dwNumFourCCCodes: DWORD; // number of four cc codes
- dwAlignBoundarySrc: DWORD; // source rectangle alignment
- dwAlignSizeSrc: DWORD; // source rectangle byte size
- dwAlignBoundaryDest: DWORD; // dest rectangle alignment
- dwAlignSizeDest: DWORD; // dest rectangle byte size
- dwAlignStrideAlign: DWORD; // stride alignment
- dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported
- ddsOldCaps: TDDSCaps; // Was dssCaps: TDDSCaps. ddsCaps is of type TDDScaps2 for DX6
- dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
- dwReserved1: DWORD; // reserved
- dwReserved2: DWORD; // reserved
- dwReserved3: DWORD; // reserved
- dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts
- dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts
- dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts
- dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
- dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts
- dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts
- dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts
- dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
- dwSSBCaps: DWORD; // driver specific capabilities for System->System blts
- dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts
- dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts
- dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
- // Members added for DX5:
- dwMaxVideoPorts: DWORD; // maximum number of usable video ports
- dwCurrVideoPorts: DWORD; // current number of video ports used
- dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts
- dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts
- dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts
- dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts
- dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts
- dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
- // Members added for DX6 release
- ddsCaps : TDDSCaps2 ; // Surface Caps
- end;
- {$EXTERNALSYM _DDCAPS_DX6}
- DDCAPS_DX6 = _DDCAPS_DX6;
- {$EXTERNALSYM DDCAPS_DX6}
- TDDCaps_DX6 = _DDCAPS_DX6;
- _DDCAPS_DX7 = TDDCaps_DX6;
- {$EXTERNALSYM _DDCAPS_DX7}
- DDCAPS_DX7 = _DDCAPS_DX7;
- {$EXTERNALSYM DDCAPS_DX7}
- PDDCaps_DX7 = ^TDDCaps_DX7;
- TDDCaps_DX7 = TDDCaps_DX6;
- {$IFDEF DIRECTDRAW_VERSION_7}
- PDDCaps = PDDCaps_DX7;
- TDDCaps = TDDCaps_DX7;
- {$ELSE}
- {$IFDEF DIRECTDRAW_VERSION_6}
- PDDCaps = PDDCaps_DX6;
- TDDCaps = TDDCaps_DX6;
- {$ELSE}
- {$IFDEF DIRECTDRAW_VERSION_5}
- PDDCaps = PDDCaps_DX5;
- TDDCaps = TDDCaps_DX5;
- {$ELSE}
- {$IFDEF DIRECTDRAW_VERSION_3}
- PDDCaps = PDDCaps_DX3;
- TDDCaps = TDDCaps_DX3;
- {$ELSE}
- PDDCaps = PDDCaps_DX1;
- TDDCaps = TDDCaps_DX1;
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- (*
- * TDDPixelFormat
- *)
- PDDPixelFormat = ^TDDPixelFormat;
- _DDPIXELFORMAT = packed record
- dwSize: DWORD; // size of structure
- dwFlags: DWORD; // pixel format flags
- dwFourCC: DWORD; // (FOURCC code)
- case Integer of
- 1: (
- dwRGBBitCount : DWORD; // how many bits per pixel
- dwRBitMask : DWORD; // mask for red bit
- dwGBitMask : DWORD; // mask for green bits
- dwBBitMask : DWORD; // mask for blue bits
- dwRGBAlphaBitMask : DWORD; // mask for alpha channel
- );
- 2: (
- dwYUVBitCount : DWORD; // how many bits per pixel
- dwYBitMask : DWORD; // mask for Y bits
- dwUBitMask : DWORD; // mask for U bits
- dwVBitMask : DWORD; // mask for V bits
- dwYUVAlphaBitMask : DWORD; // mask for alpha channel
- );
- 3: (
- dwZBufferBitDepth : DWORD; // how many total bits/pixel in z buffer (including any stencil bits)
- dwStencilBitDepth : DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
- dwZBitMask : DWORD; // mask for Z bits
- dwStencilBitMask : DWORD; // mask for stencil bits
- dwLuminanceAlphaBitMask : DWORD; // mask for alpha channel
- );
- 4: (
- dwAlphaBitDepth : DWORD; // how many bits for alpha channels
- dwLuminanceBitMask : DWORD; // mask for luminance bits
- dwBumpDvBitMask : DWORD; // mask for bump map V delta bits
- dwBumpLuminanceBitMask : DWORD; // mask for luminance in bump map
- dwRGBZBitMask : DWORD; // mask for Z channel
- );
- 5: (
- dwLuminanceBitCount : DWORD; // how many bits per pixel
- dwBumpDuBitMask : DWORD; // mask for bump map U delta bits
- Fill1, Fill2 : DWORD;
- dwYUVZBitMask : DWORD; // mask for Z channel
- );
- 6: ( dwBumpBitCount : DWORD; // how many bits per "buxel", total
- );
- end;
- {$EXTERNALSYM _DDPIXELFORMAT}
- DDPIXELFORMAT = _DDPIXELFORMAT;
- {$EXTERNALSYM DDPIXELFORMAT}
- TDDPixelFormat = _DDPIXELFORMAT;
- // These definitions are for compatibility with Erik Unger original conversion
- PDDPixelFormat_DX3 = PDDPixelFormat;
- TDDPixelFormat_DX3 = TDDPixelFormat;
- PDDPixelFormat_DX5 = PDDPixelFormat;
- TDDPixelFormat_DX5 = TDDPixelFormat;
- PDDPixelFormat_DX6 = PDDPixelFormat;
- TDDPixelFormat_DX6 = TDDPixelFormat;
- PDDPixelFormat_DX7 = PDDPixelFormat;
- TDDPixelFormat_DX7 = TDDPixelFormat;
- (*
- * TDDOverlayFX
- *)
- PDDOverlayFX = ^TDDOverlayFX;
- _DDOVERLAYFX = packed record
- dwSize: DWORD; // size of structure
- dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend
- dwAlphaEdgeBlend: DWORD; // Constant to use as alpha for edge blend
- dwReserved: DWORD;
- dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination
- case Integer of
- 0: (
- dwAlphaDestConst: DWORD; // Constant to use as alpha channel for dest
- dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source
- dwAlphaSrcConst: DWORD; // Constant to use as alpha channel for src
- dckDestColorkey: TDDColorKey; // DestColorkey override
- dckSrcColorkey: TDDColorKey; // DestColorkey override
- dwDDFX: DWORD; // Overlay FX
- dwFlags: DWORD; // flags
- );
- 1: (
- lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as alpha channel for dest
- filler: DWORD;
- lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as alpha channel for src
- );
- end;
- {$EXTERNALSYM _DDOVERLAYFX}
- DDOVERLAYFX = _DDOVERLAYFX;
- {$EXTERNALSYM DDOVERLAYFX}
- TDDOverlayFX = _DDOVERLAYFX;
- (*
- * TDDBltBatch: BltBatch entry structure
- *)
- PDDBltBatch = ^TDDBltBatch;
- _DDBLTBATCH = packed record
- lprDest: PRect;
- lpDDSSrc: IDirectDrawSurface;
- lprSrc: PRect;
- dwFlags: DWORD;
- lpDDBltFx: TDDBltFX;
- end;
- {$EXTERNALSYM _DDBLTBATCH}
- DDBLTBATCH = _DDBLTBATCH;
- {$EXTERNALSYM DDBLTBATCH}
- TDDBltBatch = _DDBLTBATCH;
- (*
- * TDDGammaRamp
- *)
- PDDGammaRamp = ^TDDGammaRamp;
- _DDGAMMARAMP = packed record
- red : array[0..255] of WORD;
- green : array[0..255] of WORD;
- blue : array[0..255] of WORD;
- end;
- {$EXTERNALSYM _DDGAMMARAMP}
- DDGAMMARAMP = _DDGAMMARAMP;
- {$EXTERNALSYM DDGAMMARAMP}
- TDDGammaRamp = _DDGAMMARAMP;
- (*
- * This is the structure within which DirectDraw returns data about the current graphics driver and chipset
- *)
- PDDDeviceIdentifier = ^TDDDeviceIdentifier;
- tagDDDEVICEIDENTIFIER = packed record
- //
- // These elements are for presentation to the user only. They should not be used to identify particular
- // drivers, since this is unreliable and many different strings may be associated with the same
- // device, and the same driver from different vendors.
- //
- szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
- szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
- //
- // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
- // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
- // drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
- //
- // This version has the form:
- // wProduct = HIWORD(liDriverVersion.HighPart)
- // wVersion = LOWORD(liDriverVersion.HighPart)
- // wSubVersion = HIWORD(liDriverVersion.LowPart)
- // wBuild = LOWORD(liDriverVersion.LowPart)
- //
- liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components
- //
- // These elements can be used to identify particular chipsets. Use with extreme caution.
- // dwVendorId Identifies the manufacturer. May be zero if unknown.
- // dwDeviceId Identifies the type of chipset. May be zero if unknown.
- // dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
- // dwRevision Identifies the revision level of the chipset. May be zero if unknown.
- //
- dwVendorId: DWORD;
- dwDeviceId: DWORD;
- dwSubSysId: DWORD;
- dwRevision: DWORD;
- //
- // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
- // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
- // reprofile the graphics subsystem.
- // This element can also be used to identify particular problematic drivers.
- //
- guidDeviceIdentifier: TGUID;
- end;
- {$EXTERNALSYM tagDDDEVICEIDENTIFIER}
- DDDEVICEIDENTIFIER = tagDDDEVICEIDENTIFIER;
- {$EXTERNALSYM DDDEVICEIDENTIFIER}
- TDDDeviceIdentifier = tagDDDEVICEIDENTIFIER;
- PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2;
- tagDDDEVICEIDENTIFIER2 = packed record
- //
- // These elements are for presentation to the user only. They should not be used to identify particular
- // drivers, since this is unreliable and many different strings may be associated with the same
- // device, and the same driver from different vendors.
- //
- szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
- szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
- //
- // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
- // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
- // drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
- //
- // This version has the form:
- // wProduct = HIWORD(liDriverVersion.HighPart)
- // wVersion = LOWORD(liDriverVersion.HighPart)
- // wSubVersion = HIWORD(liDriverVersion.LowPart)
- // wBuild = LOWORD(liDriverVersion.LowPart)
- //
- liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components
- //
- // These elements can be used to identify particular chipsets. Use with extreme caution.
- // dwVendorId Identifies the manufacturer. May be zero if unknown.
- // dwDeviceId Identifies the type of chipset. May be zero if unknown.
- // dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
- // dwRevision Identifies the revision level of the chipset. May be zero if unknown.
- //
- dwVendorId: DWORD;
- dwDeviceId: DWORD;
- dwSubSysId: DWORD;
- dwRevision: DWORD;
- //
- // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
- // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
- // reprofile the graphics subsystem.
- // This element can also be used to identify particular problematic drivers.
- //
- guidDeviceIdentifier: TGUID;
- (*
- * This element is used to determine the Windows Hardware Quality Lab (WHQL)
- * certification level for this driver/device pair.
- *)
- dwWHQLLevel: DWORD;
- end;
- {$EXTERNALSYM tagDDDEVICEIDENTIFIER2}
- DDDEVICEIDENTIFIER2 = tagDDDEVICEIDENTIFIER2;
- {$EXTERNALSYM DDDEVICEIDENTIFIER2}
- TDDDeviceIdentifier2 = tagDDDEVICEIDENTIFIER2;
- (*
- * callbacks
- *)
- TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND;
- Code: DWORD; lpContext: Pointer): HResult; stdcall;
- {$NODEFINE TClipperCallback}
- {$HPPEMIT 'typedef LPCLIPPERCALLBACK TClipperCallback;'}
- TSurfacesStreamingCallback = function(arg: DWORD): HResult; stdcall;
- {$NODEFINE TSurfacesStreamingCallback}
- (*
- * TDDSurfaceDesc
- *)
- PDDSurfaceDesc = ^TDDSurfaceDesc;
- _DDSURFACEDESC = packed record
- dwSize: DWORD; // size of the TDDSurfaceDesc structure
- dwFlags: DWORD; // determines what fields are valid
- dwHeight: DWORD; // height of surface to be created
- dwWidth: DWORD; // width of input surface
- case Integer of
- 0: (
- dwLinearSize: DWORD; // unused at the moment
- );
- 1: (
- lPitch: Longint; // distance to start of next line (return value only)
- dwBackBufferCount: DWORD; // number of back buffers requested
- case Integer of
- 0: (
- dwMipMapCount: DWORD; // number of mip-map levels requested
- dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
- dwReserved: DWORD; // reserved
- lpSurface: Pointer; // pointer to the associated surface memory
- ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use
- ddckCKDestBlt: TDDColorKey; // color key for destination blt use
- ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
- ddckCKSrcBlt: TDDColorKey; // color key for source blt use
- ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface
- ddsCaps: TDDSCaps; // direct draw surface capabilities
- );
- 1: (
- dwZBufferBitDepth: DWORD; // depth of Z buffer requested
- );
- 2: (
- dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
- );
- );
- end;
- {$EXTERNALSYM _DDSURFACEDESC}
- DDSURFACEDESC = _DDSURFACEDESC;
- {$EXTERNALSYM DDSURFACEDESC}
- TDDSurfaceDesc = _DDSURFACEDESC;
- // These definitions are for compatibility with Erik Unger original conversion
- PDDSurfaceDesc_DX5 = PDDSurfaceDesc;
- TDDSurfaceDesc_DX5 = TDDSurfaceDesc;
- PDDSurfaceDesc_DX6 = PDDSurfaceDesc;
- TDDSurfaceDesc_DX6 = TDDSurfaceDesc;
- (*
- * TDDSurfaceDesc2
- *)
- PDDSurfaceDesc2 = ^TDDSurfaceDesc2;
- _DDSURFACEDESC2 = packed record
- dwSize: DWORD; // size of the TDDSurfaceDesc structure
- dwFlags: DWORD; // determines what fields are valid
- dwHeight: DWORD; // height of surface to be created
- dwWidth: DWORD; // width of input surface
- case Integer of
- 0: (
- lPitch : Longint; // distance to start of next line (return value only)
- );
- 1: (
- dwLinearSize : DWORD; // Formless late-allocated optimized surface size
- dwBackBufferCount: DWORD; // number of back buffers requested
- case Integer of
- 0: (
- dwMipMapCount: DWORD; // number of mip-map levels requested
- dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
- dwReserved: DWORD; // reserved
- lpSurface: Pointer; // pointer to the associated surface memory
- ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use
- ddckCKDestBlt: TDDColorKey; // color key for destination blt use
- ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
- ddckCKSrcBlt: TDDColorKey; // color key for source blt use
- ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface
- ddsCaps: TDDSCaps2; // direct draw surface capabilities
- dwTextureStage: DWORD; // stage in multitexture cascade
- );
- 1: (
- dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
- );
- );
- end;
- {$EXTERNALSYM _DDSURFACEDESC2}
- DDSURFACEDESC2 = _DDSURFACEDESC2;
- {$EXTERNALSYM DDSURFACEDESC2}
- TDDSurfaceDesc2 = _DDSURFACEDESC2;
- (*
- * TDDOptSurfaceDesc
- *)
- PDDOptSurfaceDesc = ^TDDOptSurfaceDesc;
- _DDOPTSURFACEDESC = packed record
- dwSize : DWORD; // size of the DDOPTSURFACEDESC structure
- dwFlags : DWORD; // determines what fields are valid
- ddSCaps : TDDSCaps2; // Common caps like: Memory type
- ddOSCaps : TDDOSCaps; // Common caps like: Memory type
- guid : TGUID; // Compression technique GUID
- dwCompressionRatio : DWORD; // Compression ratio
- end;
- {$EXTERNALSYM _DDOPTSURFACEDESC}
- DDOPTSURFACEDESC = _DDOPTSURFACEDESC;
- {$EXTERNALSYM DDOPTSURFACEDESC}
- TDDOptSurfaceDesc = _DDOPTSURFACEDESC;
- (*
- * DDCOLORCONTROL
- *)
- PDDColorControl = ^TDDColorControl;
- _DDCOLORCONTROL = packed record
- dwSize: DWORD;
- dwFlags: DWORD;
- lBrightness: Longint;
- lContrast: Longint;
- lHue: Longint;
- lSaturation: Longint;
- lSharpness: Longint;
- lGamma: Longint;
- lColorEnable: Longint;
- dwReserved1: DWORD;
- end;
- {$EXTERNALSYM _DDCOLORCONTROL}
- DDCOLORCONTROL = _DDCOLORCONTROL;
- {$EXTERNALSYM DDCOLORCONTROL}
- TDDColorControl = _DDCOLORCONTROL;
- (*
- * callbacks
- *)
- //{$IFNDEF WINNT}
- TDDEnumModesCallback = function (const lpDDSurfaceDesc: TDDSurfaceDesc;
- lpContext: Pointer): HResult; stdcall;
- {$NODEFINE TDDEnumModesCallback}
- {$HPPEMIT 'typedef LPCLIPPERCALLBACK TDDEnumModesCallback;'}
- TDDEnumModesCallback2 = function (const lpDDSurfaceDesc: TDDSurfaceDesc2;
- lpContext: Pointer): HResult; stdcall;
- {$NODEFINE TDDEnumModesCallback2}
- {$HPPEMIT 'typedef LPDDENUMMODESCALLBACK2 TDDEnumModesCallback2;'}
- TDDEnumSurfacesCallback = function (lpDDSurface: IDirectDrawSurface;
- const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer): HResult; stdcall;
- {$NODEFINE TDDEnumSurfacesCallback}
- {$HPPEMIT 'typedef LPDDENUMSURFACESCALLBACK TDDEnumSurfacesCallback;'}
- TDDEnumSurfacesCallback2 = function (lpDDSurface: IDirectDrawSurface4;
- const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall;
- {$NODEFINE TDDEnumSurfacesCallback2}
- {$HPPEMIT 'typedef LPDDENUMSURFACESCALLBACK2 TDDEnumSurfacesCallback2;'}
- TDDEnumSurfacesCallback7 = function (lpDDSurface: IDirectDrawSurface7;
- const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall;
- {$NODEFINE TDDEnumSurfacesCallback7}
- {$HPPEMIT 'typedef LPDDENUMSURFACESCALLBACK7 TDDEnumSurfacesCallback7;'}
- //{$ENDIF}
- (*
- * INTERACES FOLLOW:
- * IDirectDraw
- * IDirectDrawClipper
- * IDirectDrawPalette
- * IDirectDrawSurface
- *)
- (*
- * IDirectDraw
- *)
- IDirectDraw = interface(IUnknown)
- ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
- (*** IDirectDraw methods ***)
- function Compact: HResult; stdcall;
- function CreateClipper(dwFlags: DWORD;
- out lplpDDClipper: IDirectDrawClipper;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer;
- out lplpDDPalette: IDirectDrawPalette;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreateSurface(var lpDDSurfaceDesc: TDDSurfaceDesc;
- out lplpDDSurface: IDirectDrawSurface;
- pUnkOuter: IUnknown): HResult; stdcall;
- function DuplicateSurface(lpDDSurface: IDirectDrawSurface;
- out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall;
- function EnumDisplayModes(dwFlags: DWORD;
- lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer;
- lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall;
- function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc;
- lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) :
- HResult; stdcall;
- function FlipToGDISurface: HResult; stdcall;
- function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall;
- function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall;
- function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall;
- function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall;
- function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall;
- function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall;
- function Initialize(lpGUID: PGUID): HResult; stdcall;
- function RestoreDisplayMode: HResult; stdcall;
- function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
- (*** Warning! SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
- function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD;
- dwBpp: DWORD): HResult; stdcall;
- function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
- end;
- IDirectDraw2 = interface(IUnknown)
- ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
- (*** IDirectDraw methods ***)
- function Compact: HResult; stdcall;
- function CreateClipper(dwFlags: DWORD;
- out lplpDDClipper: IDirectDrawClipper;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer;
- out lplpDDPalette: IDirectDrawPalette;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreateSurface(var lpDDSurfaceDesc: TDDSurfaceDesc;
- out lplpDDSurface: IDirectDrawSurface;
- pUnkOuter: IUnknown): HResult; stdcall;
- function DuplicateSurface(lpDDSurface: IDirectDrawSurface;
- out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall;
- function EnumDisplayModes(dwFlags: DWORD;
- lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer;
- lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall;
- function EnumSurfaces(dwFlags: DWORD; var lpDDSD: TDDSurfaceDesc;
- lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback): HResult; stdcall;
- function FlipToGDISurface: HResult; stdcall;
- function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall;
- function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall;
- function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall;
- function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall;
- function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall;
- function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall;
- function Initialize(lpGUID: PGUID): HResult; stdcall;
- function RestoreDisplayMode: HResult; stdcall;
- function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
- function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
- dwRefreshRate: DWORD; dwFlags: DWORD): HResult; stdcall;
- function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
- (*** Added in the v2 interface ***)
- function GetAvailableVidMem(var lpDDSCaps: TDDSCaps;
- out lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
- end;
- IDirectDraw4 = interface(IUnknown)
- ['{9c59509a-39bd-11d1-8c4a-00c04fd930c5}']
- (*** IDirectDraw methods ***)
- function Compact: HResult; stdcall;
- function CreateClipper(dwFlags: DWORD;
- out lplpDDClipper: IDirectDrawClipper;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer;
- out lplpDDPalette: IDirectDrawPalette;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2;
- out lplpDDSurface: IDirectDrawSurface4;
- pUnkOuter: IUnknown): HResult; stdcall;
- function DuplicateSurface(lpDDSurface: IDirectDrawSurface4;
- out lplpDupDDSurface: IDirectDrawSurface4): HResult; stdcall;
- function EnumDisplayModes(dwFlags: DWORD;
- lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer;
- lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall;
- function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
- lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback2):
- HResult; stdcall;
- function FlipToGDISurface: HResult; stdcall;
- function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall;
- function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
- function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall;
- function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface4): HResult; stdcall;
- function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall;
- function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall;
- function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall;
- function Initialize(lpGUID: PGUID): HResult; stdcall;
- function RestoreDisplayMode: HResult; stdcall;
- function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
- function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
- dwRefreshRate: DWORD; dwFlags: DWORD): HResult; stdcall;
- function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
- (*** Added in the v2 interface ***)
- function GetAvailableVidMem(const lpDDSCaps: TDDSCaps2;
- out lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
- (*** Added in the V4 Interface ***)
- function GetSurfaceFromDC(hdc: Windows.HDC;
- out lpDDS4: IDirectDrawSurface4): HResult; stdcall;
- function RestoreAllSurfaces: HResult; stdcall;
- function TestCooperativeLevel: HResult; stdcall;
- function GetDeviceIdentifier(out lpdddi: TDDDeviceIdentifier;
- dwFlags: DWORD): HResult; stdcall;
- end;
- IDirectDraw7 = interface(IUnknown)
- ['{15e65ec0-3b9c-11d2-b92f-00609797ea5b}']
- (*** IDirectDraw methods ***)
- function Compact: HResult; stdcall;
- function CreateClipper(dwFlags: DWORD;
- out lplpDDClipper: IDirectDrawClipper;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer;
- out lplpDDPalette: IDirectDrawPalette;
- pUnkOuter: IUnknown): HResult; stdcall;
- function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2;
- out lplpDDSurface: IDirectDrawSurface7;
- pUnkOuter: IUnknown): HResult; stdcall;
- function DuplicateSurface(lpDDSurface: IDirectDrawSurface7;
- out lplpDupDDSurface: IDirectDrawSurface7): HResult; stdcall;
- function EnumDisplayModes(dwFlags: DWORD;
- lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer;
- lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall;
- function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
- lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback7) :
- HResult; stdcall;
- function FlipToGDISurface: HResult; stdcall;
- function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall;
- function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
- function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall;
- function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface7) :
- HResult; stdcall;
- function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall;
- function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall;
- function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall;
- function Initialize(lpGUID: PGUID): HResult; stdcall;
- function RestoreDisplayMode: HResult; stdcall;
- function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
- function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
- dwRefreshRate: DWORD; dwFlags: DWORD): HResult; stdcall;
- function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle) :
- HResult; stdcall;
- (*** Added in the v2 interface ***)
- function GetAvailableVidMem(const lpDDSCaps: TDDSCaps2;
- out lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
- (*** Added in the V4 Interface ***)
- function GetSurfaceFromDC(hdc: Windows.HDC;
- out lpDDS: IDirectDrawSurface7): HResult; stdcall;
- function RestoreAllSurfaces: HResult; stdcall;
- function TestCooperativeLevel: HResult; stdcall;
- function GetDeviceIdentifier(out lpdddi: TDDDeviceIdentifier2;
- dwFlags: DWORD): HResult; stdcall;
- function StartModeTest(const lpModesToTest; dwNumEntries, dwFlags: DWORD): HResult; stdcall;
- function EvaluateMode(dwFlags: DWORD; out pSecondsUntilTimeout: DWORD): HResult; stdcall;
- end;
- (*
- * IDirectDrawPalette
- *)
- IDirectDrawPalette = interface(IUnknown)
- ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
- (*** IDirectDrawPalette methods ***)
- function GetCaps(out lpdwCaps: DWORD): HResult; stdcall;
- function GetEntries(dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD;
- lpEntries: Pointer): HResult; stdcall;
- function Initialize(lpDD: IDirectDraw; dwFlags: DWORD;
- lpDDColorTable: Pointer): HResult; stdcall;
- function SetEntries(dwFlags: DWORD; dwStartingEntry: DWORD;
- dwCount: DWORD; lpEntries: Pointer): HResult; stdcall;
- end;
- (*
- * IDirectDrawClipper
- *)
- IDirectDrawClipper = interface(IUnknown)
- ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
- (*** IDirectDrawClipper methods ***)
- function GetClipList(lpRect: PRect; lpClipList: PRgnData;
- var lpdwSize: DWORD): HResult; stdcall;
- function GetHWnd(out lphWnd: HWND): HResult; stdcall;
- function Initialize(lpDD: IDirectDraw; dwFlags: DWORD): HResult; stdcall;
- function IsClipListChanged(out lpbChanged: BOOL): HResult; stdcall;
- function SetClipList(lpClipList: PRgnData; dwFlags: DWORD): HResult; stdcall;
- function SetHWnd(dwFlags: DWORD; hWnd: HWND): HResult; stdcall;
- end;
- (*
- * IDirectDrawSurface and related interfaces
- *)
- IDirectDrawSurface = interface(IUnknown)
- ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
- (*** IDirectDrawSurface methods ***)
- function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface) :
- HResult; stdcall;
- function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
- function Blt(lpDestRect: PRect;
- lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect;
- dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall;
- function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function BltFast(dwX: DWORD; dwY: DWORD;
- lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect;
- dwTrans: DWORD): HResult; stdcall;
- function DeleteAttachedSurface(dwFlags: DWORD;
- lpDDSAttachedSurface: IDirectDrawSurface): HResult; stdcall;
- function EnumAttachedSurfaces(lpContext: Pointer;
- lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
- function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
- lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall;
- function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface;
- dwFlags: DWORD): HResult; stdcall;
- function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
- (*out*)var lplpDDAttachedSurface: IDirectDrawSurface): HResult; stdcall;
- function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
- function GetCaps(out lpDDSCaps: TDDSCaps): HResult; stdcall;
- function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
- HResult; stdcall;
- function GetDC(out lphDC: HDC): HResult; stdcall;
- function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
- function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall;
- function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
- function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function Initialize(lpDD: IDirectDraw;
- out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function IsLost: HResult; stdcall;
- function Lock(lpDestRect: PRect; out lpDDSurfaceDesc:
- TDDSurfaceDesc; dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
- function ReleaseDC(hDC: Windows.HDC): HResult; stdcall;
- function _Restore: HResult; stdcall;
- function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
- HResult; stdcall;
- function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
- function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
- function UpdateOverlay(lpSrcRect: PRect;
- lpDDDestSurface: IDirectDrawSurface; lpDestRect: PRect;
- dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall;
- function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
- function UpdateOverlayZOrder(dwFlags: DWORD;
- lpDDSReference: IDirectDrawSurface): HResult; stdcall;
- end;
- (*
- * IDirectDrawSurface2 and related interfaces
- *)
- IDirectDrawSurface2 = interface(IUnknown)
- ['{57805885-6eec-11cf-9441-a82303c10e27}']
- (*** IDirectDrawSurface methods ***)
- function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface2) :
- HResult; stdcall;
- function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
- function Blt(lpDestRect: PRect;
- lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect;
- dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall;
- function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function BltFast(dwX: DWORD; dwY: DWORD;
- lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect;
- dwTrans: DWORD): HResult; stdcall;
- function DeleteAttachedSurface(dwFlags: DWORD;
- lpDDSAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
- function EnumAttachedSurfaces(lpContext: Pointer;
- lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
- function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
- lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall;
- function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface2;
- dwFlags: DWORD): HResult; stdcall;
- function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
- out lplpDDAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
- function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
- function GetCaps(out lpDDSCaps: TDDSCaps): HResult; stdcall;
- function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
- HResult; stdcall;
- function GetDC(out lphDC: HDC): HResult; stdcall;
- function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
- function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall;
- function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
- function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function Initialize(lpDD: IDirectDraw;
- out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function IsLost: HResult; stdcall;
- function Lock(lpDestRect: PRect;
- out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD;
- hEvent: THandle): HResult; stdcall;
- function ReleaseDC(hDC: Windows.HDC): HResult; stdcall;
- function _Restore: HResult; stdcall;
- function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
- HResult; stdcall;
- function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
- function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
- function UpdateOverlay(lpSrcRect: PRect;
- lpDDDestSurface: IDirectDrawSurface2; lpDestRect: PRect;
- dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall;
- function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
- function UpdateOverlayZOrder(dwFlags: DWORD;
- lpDDSReference: IDirectDrawSurface2): HResult; stdcall;
- (*** Added in the v2 interface ***)
- function GetDDInterface(var lplpDD: IDirectDraw): HResult; stdcall;
- function PageLock(dwFlags: DWORD): HResult; stdcall;
- function PageUnlock(dwFlags: DWORD): HResult; stdcall;
- end;
- IDirectDrawSurface3 = interface(IUnknown)
- ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}']
- (*** IDirectDrawSurface methods ***)
- function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface3) :
- HResult; stdcall;
- function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
- function Blt(lpDestRect: PRect;
- lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect;
- dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall;
- function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function BltFast(dwX: DWORD; dwY: DWORD;
- lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect;
- dwTrans: DWORD): HResult; stdcall;
- function DeleteAttachedSurface(dwFlags: DWORD;
- lpDDSAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
- function EnumAttachedSurfaces(lpContext: Pointer;
- lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
- function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
- lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall;
- function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface3;
- dwFlags: DWORD): HResult; stdcall;
- function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
- out lplpDDAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
- function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
- function GetCaps(out lpDDSCaps: TDDSCaps): HResult; stdcall;
- function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
- HResult; stdcall;
- function GetDC(out lphDC: HDC): HResult; stdcall;
- function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
- function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall;
- function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
- function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function Initialize(lpDD: IDirectDraw;
- out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
- function IsLost: HResult; stdcall;
- function Lock(lpDestRect: PRect;
- out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD;
- hEvent: THandle): HResult; stdcall;
- function ReleaseDC(hDC: Windows.HDC): HResult; stdcall;
- function _Restore: HResult; stdcall;
- function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
- HResult; stdcall;
- function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
- function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
- function UpdateOverlay(lpSrcRect: PRect;
- lpDDDestSurface: IDirectDrawSurface3; lpDestRect: PRect;
- dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall;
- function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
- function UpdateOverlayZOrder(dwFlags: DWORD;
- lpDDSReference: IDirectDrawSurface3): HResult; stdcall;
- (*** Added in the v2 interface ***)
- function GetDDInterface(out lplpDD: IDirectDraw): HResult; stdcall;
- function PageLock(dwFlags: DWORD): HResult; stdcall;
- function PageUnlock(dwFlags: DWORD): HResult; stdcall;
- (*** Added in the V3 interface ***)
- function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc; dwFlags: DWORD): HResult; stdcall;
- end;
- (*
- * IDirectDrawSurface4 and related interfaces
- *)
- IDirectDrawSurface4 = interface(IUnknown)
- ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}']
- (*** IDirectDrawSurface methods ***)
- function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface4) :
- HResult; stdcall;
- function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
- function Blt(lpDestRect: PRect;
- lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect;
- dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall;
- function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function BltFast(dwX: DWORD; dwY: DWORD;
- lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect;
- dwTrans: DWORD): HResult; stdcall;
- function DeleteAttachedSurface(dwFlags: DWORD;
- lpDDSAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
- function EnumAttachedSurfaces(lpContext: Pointer;
- lpEnumSurfacesCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
- function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
- lpfnCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
- function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface4;
- dwFlags: DWORD): HResult; stdcall;
- function GetAttachedSurface(const lpDDSCaps: TDDSCaps2;
- out lplpDDAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
- function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
- function GetCaps(out lpDDSCaps: TDDSCaps2): HResult; stdcall;
- function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
- HResult; stdcall;
- function GetDC(out lphDC: HDC): HResult; stdcall;
- function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
- function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall;
- function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
- function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
- function Initialize(lpDD: IDirectDraw;
- out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
- function IsLost: HResult; stdcall;
- function Lock(lpDestRect: PRect;
- out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD;
- hEvent: THandle): HResult; stdcall;
- function ReleaseDC(hDC: Windows.HDC): HResult; stdcall;
- function _Restore: HResult; stdcall;
- function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
- HResult; stdcall;
- function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
- function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function Unlock(lpRect: PRect): HResult; stdcall;
- function UpdateOverlay(lpSrcRect: PRect;
- lpDDDestSurface: IDirectDrawSurface4; lpDestRect: PRect;
- dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall;
- function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
- function UpdateOverlayZOrder(dwFlags: DWORD;
- lpDDSReference: IDirectDrawSurface4): HResult; stdcall;
- (*** Added in the v2 interface ***)
- function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
- function PageLock(dwFlags: DWORD): HResult; stdcall;
- function PageUnlock(dwFlags: DWORD): HResult; stdcall;
- (*** Added in the V3 interface ***)
- function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall;
- (*** Added in the v4 interface ***)
- function SetPrivateData(const guidTag: TGUID; lpData: Pointer;
- cbSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function GetPrivateData(const guidTag: TGUID; lpBuffer: Pointer;
- var lpcbBufferSize: DWORD): HResult; stdcall;
- function FreePrivateData(const guidTag: TGUID): HResult; stdcall;
- function GetUniquenessValue(out lpValue: DWORD): HResult; stdcall;
- function ChangeUniquenessValue: HResult; stdcall;
- end;
- IDirectDrawSurface7 = interface(IUnknown)
- ['{06675a80-3b9b-11d2-b92f-00609797ea5b}']
- (*** IDirectDrawSurface methods ***)
- function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface7) :
- HResult; stdcall;
- function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
- function Blt(lpDestRect: PRect;
- lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect;
- dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall;
- function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
- dwFlags: DWORD): HResult; stdcall;
- function BltFast(dwX: DWORD; dwY: DWORD;
- lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect;
- dwTrans: DWORD): HResult; stdcall;
- function DeleteAttachedSurface(dwFlags: DWORD;
- lpDDSAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
- function EnumAttachedSurfaces(lpContext: Pointer;
- lpEnumSurfacesCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
- function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
- lpfnCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
- function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface7;
- dwFlags: DWORD): HResult; stdcall;
- function GetAttachedSurface(const lpDDSCaps: TDDSCaps2;
- out lplpDDAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
- function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
- function GetCaps(out lpDDSCaps: TDDSCaps2): HResult; stdcall;
- function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
- HResult; stdcall;
- function GetDC(out lphDC: HDC): HResult; stdcall;
- function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
- function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall;
- function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
- function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
- function Initialize(lpDD: IDirectDraw;
- out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
- function IsLost: HResult; stdcall;
- function Lock(lpDestRect: PRect;
- out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD;
- hEvent: THandle): HResult; stdcall;
- function ReleaseDC(hDC: Windows.HDC): HResult; stdcall;
- function _Restore: HResult; stdcall;
- function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
- function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
- HResult; stdcall;
- function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
- function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
- function Unlock(lpRect: PRect): HResult; stdcall;
- function UpdateOverlay(lpSrcRect: PRect;
- lpDDDestSurface: IDirectDrawSurface7; lpDestRect: PRect;
- dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall;
- function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
- function UpdateOverlayZOrder(dwFlags: DWORD;
- lpDDSReference: IDirectDrawSurface7): HResult; stdcall;
- (*** Added in the v2 interface ***)
- function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
- function PageLock(dwFlags: DWORD): HResult; stdcall;
- function PageUnlock(dwFlags: DWORD): HResult; stdcall;
- (*** Added in the V3 interface ***)
- function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall;
- (*** Added in the v4 interface ***)
- function SetPrivateData(const guidTag: TGUID; lpData: Pointer;
- cbSize: DWORD; dwFlags: DWORD): HResult; stdcall;
- function GetPrivateData(const guidTag: TGUID; lpBuffer: Pointer;
- var lpcbBufferSize: DWORD): HResult; stdcall;
- function FreePrivateData(const guidTag: TGUID): HResult; stdcall;
- function GetUniquenessValue(out lpValue: DWORD): HResult; stdcall;
- function ChangeUniquenessValue: HResult; stdcall;
- (*** Moved Texture7 methods here ***)
- function SetPriority(dwPriority: DWORD): HResult; stdcall;
- function GetPriority(out lpdwPriority: DWORD): HResult; stdcall;
- function SetLOD(dwMaxLOD: DWORD): HResult; stdcall;
- function GetLOD(out lpdwMaxLOD: DWORD): HResult; stdcall;
- end;
- IDirectDrawColorControl = interface(IUnknown)
- ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}']
- function GetColorControls(out lpColorControl: TDDColorControl): HResult; stdcall;
- function SetColorControls(const lpColorControl: TDDColorControl): HResult; stdcall;
- end;
- (*
- * IDirectDrawGammaControl
- *)
- IDirectDrawGammaControl = interface(IUnknown)
- ['{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}']
- function GetGammaRamp(dwFlags: DWORD; out lpRampData: TDDGammaRamp): HResult; stdcall;
- function SetGammaRamp(dwFlags: DWORD; const lpRampData: TDDGammaRamp): HResult; stdcall;
- end;
- type
- IID_IDirectDraw = IDirectDraw;
- {$EXTERNALSYM IID_IDirectDraw}
- IID_IDirectDraw2 = IDirectDraw2;
- {$EXTERNALSYM IID_IDirectDraw2}
- IID_IDirectDraw4 = IDirectDraw4;
- {$EXTERNALSYM IID_IDirectDraw4}
- IID_IDirectDraw7 = IDirectDraw7;
- {$EXTERNALSYM IID_IDirectDraw7}
- IID_IDirectDrawSurface = IDirectDrawSurface;
- {$EXTERNALSYM IID_IDirectDrawSurface}
- IID_IDirectDrawSurface2 = IDirectDrawSurface2;
- {$EXTERNALSYM IID_IDirectDrawSurface2}
- IID_IDirectDrawSurface3 = IDirectDrawSurface3;
- {$EXTERNALSYM IID_IDirectDrawSurface3}
- IID_IDirectDrawSurface4 = IDirectDrawSurface4;
- {$EXTERNALSYM IID_IDirectDrawSurface4}
- IID_IDirectDrawSurface7 = IDirectDrawSurface7;
- {$EXTERNALSYM IID_IDirectDrawSurface7}
- IID_IDirectDrawPalette = IDirectDrawPalette;
- {$EXTERNALSYM IID_IDirectDrawPalette}
- IID_IDirectDrawClipper = IDirectDrawClipper;
- {$EXTERNALSYM IID_IDirectDrawClipper}
- IID_IDirectDrawColorControl = IDirectDrawColorControl;
- {$EXTERNALSYM IID_IDirectDrawColorControl}
- IID_IDirectDrawGammaControl = IDirectDrawGammaControl;
- {$EXTERNALSYM IID_IDirectDrawGammaControl}
- const
- (*
- * ddsCaps field is valid.
- *)
- DDSD_CAPS = $00000001; // default
- {$EXTERNALSYM DDSD_CAPS}
- (*
- * dwHeight field is valid.
- *)
- DDSD_HEIGHT = $00000002;
- {$EXTERNALSYM DDSD_HEIGHT}
- (*
- * dwWidth field is valid.
- *)
- DDSD_WIDTH = $00000004;
- {$EXTERNALSYM DDSD_WIDTH}
- (*
- * lPitch is valid.
- *)
- DDSD_PITCH = $00000008;
- {$EXTERNALSYM DDSD_PITCH}
- (*
- * dwBackBufferCount is valid.
- *)
- DDSD_BACKBUFFERCOUNT = $00000020;
- {$EXTERNALSYM DDSD_BACKBUFFERCOUNT}
- (*
- * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2)
- *)
- DDSD_ZBUFFERBITDEPTH = $00000040;
- {$EXTERNALSYM DDSD_ZBUFFERBITDEPTH}
- (*
- * dwAlphaBitDepth is valid.
- *)
- DDSD_ALPHABITDEPTH = $00000080;
- {$EXTERNALSYM DDSD_ALPHABITDEPTH}
- (*
- * lpSurface is valid.
- *)
- DDSD_LPSURFACE = $00000800;
- {$EXTERNALSYM DDSD_LPSURFACE}
- (*
- * ddpfPixelFormat is valid.
- *)
- DDSD_PIXELFORMAT = $00001000;
- {$EXTERNALSYM DDSD_PIXELFORMAT}
- (*
- * ddckCKDestOverlay is valid.
- *)
- DDSD_CKDESTOVERLAY = $00002000;
- {$EXTERNALSYM DDSD_CKDESTOVERLAY}
- (*
- * ddckCKDestBlt is valid.
- *)
- DDSD_CKDESTBLT = $00004000;
- {$EXTERNALSYM DDSD_CKDESTBLT}
- (*
- * ddckCKSrcOverlay is valid.
- *)
- DDSD_CKSRCOVERLAY = $00008000;
- {$EXTERNALSYM DDSD_CKSRCOVERLAY}
- (*
- * ddckCKSrcBlt is valid.
- *)
- DDSD_CKSRCBLT = $00010000;
- {$EXTERNALSYM DDSD_CKSRCBLT}
- (*
- * dwMipMapCount is valid.
- *)
- DDSD_MIPMAPCOUNT = $00020000;
- {$EXTERNALSYM DDSD_MIPMAPCOUNT}
- (*
- * dwRefreshRate is valid
- *)
- DDSD_REFRESHRATE = $00040000;
- {$EXTERNALSYM DDSD_REFRESHRATE}
- (*
- * dwLinearSize is valid
- *)
- DDSD_LINEARSIZE = $00080000;
- {$EXTERNALSYM DDSD_LINEARSIZE}
- (*
- * dwTextureStage is valid
- *)
- DDSD_TEXTURESTAGE = $00100000;
- {$EXTERNALSYM DDSD_TEXTURESTAGE}
- (*
- * dwFVF is valid
- *)
- DDSD_FVF = $00200000;
- {$EXTERNALSYM DDSD_FVF}
- (*
- * dwSrcVBHandle is valid
- *)
- DDSD_SRCVBHANDLE = $00400000;
- {$EXTERNALSYM DDSD_SRCVBHANDLE}
- (*
- * dwDepth is valid
- *)
- DDSD_DEPTH = $00800000;
- {$EXTERNALSYM DDSD_DEPTH}
- (*
- * All input fields are valid.
- *)
- DDSD_ALL = $00fff9ee;
- {$EXTERNALSYM DDSD_ALL}
- (*
- * guid field is valid.
- *)
- DDOSD_GUID = $00000001;
- {$EXTERNALSYM DDOSD_GUID}
- (*
- * dwCompressionRatio field is valid.
- *)
- DDOSD_COMPRESSION_RATIO = $00000002;
- {$EXTERNALSYM DDOSD_COMPRESSION_RATIO}
- (*
- * ddSCaps field is valid.
- *)
- DDOSD_SCAPS = $00000004;
- {$EXTERNALSYM DDOSD_SCAPS}
- (*
- * ddOSCaps field is valid.
- *)
- DDOSD_OSCAPS = $00000008;
- {$EXTERNALSYM DDOSD_OSCAPS}
- (*
- * All input fields are valid.
- *)
- DDOSD_ALL = $0000000f;
- {$EXTERNALSYM DDOSD_ALL}
- (*
- * The surface's optimized pixelformat is compressed
- *)
- DDOSDCAPS_OPTCOMPRESSED = $00000001;
- {$EXTERNALSYM DDOSDCAPS_OPTCOMPRESSED}
- (*
- * The surface's optimized pixelformat is reordered
- *)
- DDOSDCAPS_OPTREORDERED = $00000002;
- {$EXTERNALSYM DDOSDCAPS_OPTREORDERED}
- (*
- * The opt surface is a monolithic mipmap
- *)
- DDOSDCAPS_MONOLITHICMIPMAP = $00000004;
- {$EXTERNALSYM DDOSDCAPS_MONOLITHICMIPMAP}
- (*
- * The valid Surf caps:
- * DDSCAPS_SYSTEMMEMORY = $00000800;
- * DDSCAPS_VIDEOMEMORY = $00004000;
- * DDSCAPS_LOCALVIDMEM = $10000000;
- * DDSCAPS_NONLOCALVIDMEM = $20000000;
- *)
- DDOSDCAPS_VALIDSCAPS = $30004800;
- {$EXTERNALSYM DDOSDCAPS_VALIDSCAPS}
- (*
- * The valid OptSurf caps
- *)
- DDOSDCAPS_VALIDOSCAPS = $00000007;
- {$EXTERNALSYM DDOSDCAPS_VALIDOSCAPS}
- (*
- * DDCOLORCONTROL
- *)
- (*
- * lBrightness field is valid.
- *)
- DDCOLOR_BRIGHTNESS = $00000001;
- {$EXTERNALSYM DDCOLOR_BRIGHTNESS}
- (*
- * lContrast field is valid.
- *)
- DDCOLOR_CONTRAST = $00000002;
- {$EXTERNALSYM DDCOLOR_CONTRAST}
- (*
- * lHue field is valid.
- *)
- DDCOLOR_HUE = $00000004;
- {$EXTERNALSYM DDCOLOR_HUE}
- (*
- * lSaturation field is valid.
- *)
- DDCOLOR_SATURATION = $00000008;
- {$EXTERNALSYM DDCOLOR_SATURATION}
- (*
- * lSharpness field is valid.
- *)
- DDCOLOR_SHARPNESS = $00000010;
- {$EXTERNALSYM DDCOLOR_SHARPNESS}
- (*
- * lGamma field is valid.
- *)
- DDCOLOR_GAMMA = $00000020;
- {$EXTERNALSYM DDCOLOR_GAMMA}
- (*
- * lColorEnable field is valid.
- *)
- DDCOLOR_COLORENABLE = $00000040;
- {$EXTERNALSYM DDCOLOR_COLORENABLE}
- (*============================================================================
- *
- * Direct Draw Capability Flags
- *
- * These flags are used to describe the capabilities of a given Surface.
- * All flags are bit flags.
- *
- *==========================================================================*)
- (****************************************************************************
- *
- * DIRECTDRAWSURFACE CAPABILITY FLAGS
- *
- ****************************************************************************)
- (*
- * This bit currently has no meaning.
- *)
- DDSCAPS_RESERVED1 = $00000001;
- {$EXTERNALSYM DDSCAPS_RESERVED1}
- (*
- * Indicates that this surface contains alpha-only information.
- * (To determine if a surface is RGBA/YUVA, the pixel format must be
- * interrogated.)
- *)
- DDSCAPS_ALPHA = $00000002;
- {$EXTERNALSYM DDSCAPS_ALPHA}
- (*
- * Indicates that this surface is a backbuffer. It is generally
- * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
- * It indicates that this surface is THE back buffer of a surface
- * flipping structure. DirectDraw supports N surfaces in a
- * surface flipping structure. Only the surface that immediately
- * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
- * The other surfaces are identified as back buffers by the presence
- * of the DDSCAPS_FLIP capability, their attachment order, and the
- * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
- * capabilities. The bit is sent to CreateSurface when a standalone
- * back buffer is being created. This surface could be attached to
- * a front buffer and/or back buffers to form a flipping surface
- * structure after the CreateSurface call. See AddAttachments for
- * a detailed description of the behaviors in this case.
- *)
- DDSCAPS_BACKBUFFER = $00000004;
- {$EXTERNALSYM DDSCAPS_BACKBUFFER}
- (*
- * Indicates a complex surface structure is being described. A
- * complex surface structure results in the creation of more than
- * one surface. The additional surfaces are attached to the root
- * surface. The complex structure can only be destroyed by
- * destroying the root.
- *)
- DDSCAPS_COMPLEX = $00000008;
- {$EXTERNALSYM DDSCAPS_COMPLEX}
- (*
- * Indicates that this surface is a part of a surface flipping structure.
- * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
- * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
- * on the resulting creations. The dwBackBufferCount field in the
- * TDDSurfaceDesc structure must be set to at least 1 in order for
- * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
- * must always be set with creating multiple surfaces through CreateSurface.
- *)
- DDSCAPS_FLIP = $00000010;
- {$EXTERNALSYM DDSCAPS_FLIP}
- (*
- * Indicates that this surface is THE front buffer of a surface flipping
- * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
- * capability bit is set.
- * If this capability is sent to CreateSurface then a standalonw front buffer
- * is created. This surface will not have the DDSCAPS_FLIP capability.
- * It can be attached to other back buffers to form a flipping structure.
- * See AddAttachments for a detailed description of the behaviors in this
- * case.
- *)
- DDSCAPS_FRONTBUFFER = $00000020;
- {$EXTERNALSYM DDSCAPS_FRONTBUFFER}
- (*
- * Indicates that this surface is any offscreen surface that is not an overlay,
- * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
- * to identify plain vanilla surfaces.
- *)
- DDSCAPS_OFFSCREENPLAIN = $00000040;
- {$EXTERNALSYM DDSCAPS_OFFSCREENPLAIN}
- (*
- * Indicates that this surface is an overlay. It may or may not be directly visible
- * depending on whether or not it is currently being overlayed onto the primary
- * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
- * overlayed at the moment.
- *)
- DDSCAPS_OVERLAY = $00000080;
- {$EXTERNALSYM DDSCAPS_OVERLAY}
- (*
- * Indicates that unique DirectDrawPalette objects can be created and
- * attached to this surface.
- *)
- DDSCAPS_PALETTE = $00000100;
- {$EXTERNALSYM DDSCAPS_PALETTE}
- (*
- * Indicates that this surface is the primary surface. The primary
- * surface represents what the user is seeing at the moment.
- *)
- DDSCAPS_PRIMARYSURFACE = $00000200;
- {$EXTERNALSYM DDSCAPS_PRIMARYSURFACE}
- (*
- * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
- * obsolete.
- *)
- DDSCAPS_RESERVED3 = $00000400;
- {$EXTERNALSYM DDSCAPS_RESERVED3}
- DDSCAPS_PRIMARYSURFACELEFT = DDSCAPS_RESERVED3;
- {$EXTERNALSYM DDSCAPS_PRIMARYSURFACELEFT}
- (*
- * Indicates that this surface memory was allocated in system memory
- *)
- DDSCAPS_SYSTEMMEMORY = $00000800;
- {$EXTERNALSYM DDSCAPS_SYSTEMMEMORY}
- (*
- * Indicates that this surface can be used as a 3D texture. It does not
- * indicate whether or not the surface is being used for that purpose.
- *)
- DDSCAPS_TEXTURE = $00001000;
- {$EXTERNALSYM DDSCAPS_TEXTURE}
- (*
- * Indicates that a surface may be a destination for 3D rendering. This
- * bit must be set in order to query for a Direct3D Device Interface
- * from this surface.
- *)
- DDSCAPS_3DDEVICE = $00002000;
- {$EXTERNALSYM DDSCAPS_3DDEVICE}
- (*
- * Indicates that this surface exists in video memory.
- *)
- DDSCAPS_VIDEOMEMORY = $00004000;
- {$EXTERNALSYM DDSCAPS_VIDEOMEMORY}
- (*
- * Indicates that changes made to this surface are immediately visible.
- * It is always set for the primary surface and is set for overlays while
- * they are being overlayed and texture maps while they are being textured.
- *)
- DDSCAPS_VISIBLE = $00008000;
- {$EXTERNALSYM DDSCAPS_VISIBLE}
- (*
- * Indicates that only writes are permitted to the surface. Read accesses
- * from the surface may or may not generate a protection fault, but the
- * results of a read from this surface will not be meaningful. READ ONLY.
- *)
- DDSCAPS_WRITEONLY = $00010000;
- {$EXTERNALSYM DDSCAPS_WRITEONLY}
- (*
- * Indicates that this surface is a z buffer. A z buffer does not contain
- * displayable information. Instead it contains bit depth information that is
- * used to determine which pixels are visible and which are obscured.
- *)
- DDSCAPS_ZBUFFER = $00020000;
- {$EXTERNALSYM DDSCAPS_ZBUFFER}
- (*
- * Indicates surface will have a DC associated long term
- *)
- DDSCAPS_OWNDC = $00040000;
- {$EXTERNALSYM DDSCAPS_OWNDC}
- (*
- * Indicates surface should be able to receive live video
- *)
- DDSCAPS_LIVEVIDEO = $00080000;
- {$EXTERNALSYM DDSCAPS_LIVEVIDEO}
- (*
- * Indicates surface should be able to have a stream decompressed
- * to it by the hardware.
- *)
- DDSCAPS_HWCODEC = $00100000;
- {$EXTERNALSYM DDSCAPS_HWCODEC}
- (*
- * Surface is a ModeX surface.
- *
- *)
- DDSCAPS_MODEX = $00200000;
- {$EXTERNALSYM DDSCAPS_MODEX}
- (*
- * Indicates surface is one level of a mip-map. This surface will
- * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
- * This can be done explicitly, by creating a number of surfaces and
- * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
- * If this bit is set then DDSCAPS_TEXTURE must also be set.
- *)
- DDSCAPS_MIPMAP = $00400000;
- {$EXTERNALSYM DDSCAPS_MIPMAP}
- (*
- * This bit is reserved. It should not be specified.
- *)
- DDSCAPS_RESERVED2 = $00800000;
- {$EXTERNALSYM DDSCAPS_RESERVED2}
- (*
- * Indicates that memory for the surface is not allocated until the surface
- * is loaded (via the Direct3D texture Load() function).
- *)
- DDSCAPS_ALLOCONLOAD = $04000000;
- {$EXTERNALSYM DDSCAPS_ALLOCONLOAD}
- (*
- * Indicates that the surface will recieve data from a video port.
- *)
- DDSCAPS_VIDEOPORT = $08000000;
- {$EXTERNALSYM DDSCAPS_VIDEOPORT}
- (*
- * Indicates that a video memory surface is resident in true, local video
- * memory rather than non-local video memory. If this flag is specified then
- * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
- * DDSCAPS_NONLOCALVIDMEM.
- *)
- DDSCAPS_LOCALVIDMEM = $10000000;
- {$EXTERNALSYM DDSCAPS_LOCALVIDMEM}
- (*
- * Indicates that a video memory surface is resident in non-local video
- * memory rather than true, local video memory. If this flag is specified
- * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
- * DDSCAPS_LOCALVIDMEM.
- *)
- DDSCAPS_NONLOCALVIDMEM = $20000000;
- {$EXTERNALSYM DDSCAPS_NONLOCALVIDMEM}
- (*
- * Indicates that this surface is a standard VGA mode surface, and not a
- * ModeX surface. (This flag will never be set in combination with the
- * DDSCAPS_MODEX flag).
- *)
- DDSCAPS_STANDARDVGAMODE = $40000000;
- {$EXTERNALSYM DDSCAPS_STANDARDVGAMODE}
- (*
- * Indicates that this surface will be an optimized surface. This flag is
- * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
- * will be created without any underlying video memory until loaded.
- *)
- DDSCAPS_OPTIMIZED = $80000000;
- {$EXTERNALSYM DDSCAPS_OPTIMIZED}
- (*
- * This bit is reserved
- *)
- DDSCAPS2_RESERVED4 = $00000002;
- {$EXTERNALSYM DDSCAPS2_RESERVED4}
- DDSCAPS2_HARDWAREDEINTERLACE = $00000000;
- {$EXTERNALSYM DDSCAPS2_HARDWAREDEINTERLACE}
- (*
- * Indicates to the driver that this surface will be locked very frequently
- * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
- * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
- * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
- *)
- DDSCAPS2_HINTDYNAMIC = $00000004;
- {$EXTERNALSYM DDSCAPS2_HINTDYNAMIC}
- (*
- * Indicates to the driver that this surface can be re-ordered/retiled on
- * load. This operation will not change the size of the texture. It is
- * relatively fast and symmetrical, since the application may lock these
- * bits (although it will take a performance hit when doing so). Surfaces
- * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
- * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
- *)
- DDSCAPS2_HINTSTATIC = $00000008;
- {$EXTERNALSYM DDSCAPS2_HINTSTATIC}
- (*
- * Indicates that the client would like this texture surface to be managed by the
- * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
- * DDSCAPS_TEXTURE and DDSCAPS_SYSTEMMEMORY.
- *)
- DDSCAPS2_TEXTUREMANAGE = $00000010;
- {$EXTERNALSYM DDSCAPS2_TEXTUREMANAGE}
- (*
- * These bits are reserved for internal use *)
- DDSCAPS2_RESERVED1 = $00000020;
- {$EXTERNALSYM DDSCAPS2_RESERVED1}
- DDSCAPS2_RESERVED2 = $00000040;
- {$EXTERNALSYM DDSCAPS2_RESERVED2}
- (*
- * Indicates to the driver that this surface will never be locked again.
- * The driver is free to optimize this surface via retiling and actual compression.
- * All calls to Lock() or Blts from this surface will fail. Surfaces with this
- * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
- * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
- *)
- DDSCAPS2_OPAQUE = $00000080;
- {$EXTERNALSYM DDSCAPS2_OPAQUE}
- (*
- * Applications should set this bit at CreateSurface time to indicate that they
- * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
- *)
- DDSCAPS2_HINTANTIALIASING = $00000100;
- {$EXTERNALSYM DDSCAPS2_HINTANTIALIASING}
- (*
- * This flag is used at CreateSurface time to indicate that this set of
- * surfaces is a cubic environment map
- *)
- DDSCAPS2_CUBEMAP = $00000200;
- {$EXTERNALSYM DDSCAPS2_CUBEMAP}
- (*
- * These flags preform two functions:
- * - At CreateSurface time, they define which of the six cube faces are
- * required by the application.
- * - After creation, each face in the cubemap will have exactly one of these
- * bits set.
- *)
- DDSCAPS2_CUBEMAP_POSITIVEX = $00000400;
- {$EXTERNALSYM DDSCAPS2_CUBEMAP_POSITIVEX}
- DDSCAPS2_CUBEMAP_NEGATIVEX = $00000800;
- {$EXTERNALSYM DDSCAPS2_CUBEMAP_NEGATIVEX}
- DDSCAPS2_CUBEMAP_POSITIVEY = $00001000;
- {$EXTERNALSYM DDSCAPS2_CUBEMAP_POSITIVEY}
- DDSCAPS2_CUBEMAP_NEGATIVEY = $00002000;
- {$EXTERNALSYM DDSCAPS2_CUBEMAP_NEGATIVEY}
- DDSCAPS2_CUBEMAP_POSITIVEZ = $00004000;
- {$EXTERNALSYM DDSCAPS2_CUBEMAP_POSITIVEZ}
- DDSCAPS2_CUBEMAP_NEGATIVEZ = $00008000;
- {$EXTERNALSYM DDSCAPS2_CUBEMAP_NEGATIVEZ}
- (*
- * This macro may be used to specify all faces of a cube map at CreateSurface time
- *)
- DDSCAPS2_CUBEMAP_ALLFACES = ( DDSCAPS2_CUBEMAP_POSITIVEX or
- DDSCAPS2_CUBEMAP_NEGATIVEX or
- DDSCAPS2_CUBEMAP_POSITIVEY or
- DDSCAPS2_CUBEMAP_NEGATIVEY or
- DDSCAPS2_CUBEMAP_POSITIVEZ or
- DDSCAPS2_CUBEMAP_NEGATIVEZ );
- {$EXTERNALSYM DDSCAPS2_CUBEMAP_ALLFACES}
- (*
- * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
- * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
- * constructs such as Cube Maps, wherein there are more than one mipmap surface attached
- * to the root surface.
- * This caps bit is ignored by CreateSurface
- *)
- DDSCAPS2_MIPMAPSUBLEVEL = $00010000;
- {$EXTERNALSYM DDSCAPS2_MIPMAPSUBLEVEL}
- (* This flag indicates that the texture should be managed by D3D only *)
- DDSCAPS2_D3DTEXTUREMANAGE = $00020000;
- {$EXTERNALSYM DDSCAPS2_D3DTEXTUREMANAGE}
- (* This flag indicates that the managed surface can be safely lost *)
- DDSCAPS2_DONOTPERSIST = $00040000;
- {$EXTERNALSYM DDSCAPS2_DONOTPERSIST}
- (* indicates that this surface is part of a stereo flipping chain *)
- DDSCAPS2_STEREOSURFACELEFT = $00080000;
- {$EXTERNALSYM DDSCAPS2_STEREOSURFACELEFT}
- (*
- * Indicates that the surface is a volume.
- * Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume
- *)
- DDSCAPS2_VOLUME = $00200000;
- {$EXTERNALSYM DDSCAPS2_VOLUME}
- (*
- * Indicates that the surface may be locked multiple times by the application.
- * This cap cannot be used with DDSCAPS2_OPAQUE.
- *)
- DDSCAPS2_NOTUSERLOCKABLE = $00400000;