📄 directdraw.pas
字号:
* TDDPixelFormat
*)
PDDPixelFormat_DX5 = ^TDDPixelFormat_DX5;
TDDPixelFormat_DX5 = packed record
dwSize : LongWord; // size of structure
dwFlags : LongWord; // pixel format flags
dwFourCC : LongWord; // (FOURCC code)
case Integer of
0: (
dwZBufferBitDepth : LongWord; // how many bits for z buffers
);
1: (
dwAlphaBitDepth : LongWord; // how many bits for alpha channels
);
2: (
dwRGBBitCount : LongWord; // how many bits per pixel
dwRBitMask : LongWord; // mask for red bit
dwGBitMask : LongWord; // mask for green bits
dwBBitMask : LongWord; // mask for blue bits
dwRGBAlphaBitMask : LongWord; // mask for alpha channel
);
3: (
dwYUVBitCount : LongWord; // how many bits per pixel
dwYBitMask : LongWord; // mask for Y bits
dwUBitMask : LongWord; // mask for U bits
dwVBitMask : LongWord; // mask for V bits
case Integer of
0: (
dwYUVAlphaBitMask : LongWord; // mask for alpha channel
);
1: (
dwRGBZBitMask : LongWord;
);
2: (
dwYUVZBitMask : LongWord;
);
);
end;
PDDPixelFormat_DX6 = ^TDDPixelFormat_DX6;
TDDPixelFormat_DX6 = packed record
dwSize : LongWord; // size of structure
dwFlags : LongWord; // pixel format flags
dwFourCC : LongWord; // (FOURCC code)
case Integer of
1: (
dwRGBBitCount : LongWord; // how many bits per pixel
dwRBitMask : LongWord; // mask for red bit
dwGBitMask : LongWord; // mask for green bits
dwBBitMask : LongWord; // mask for blue bits
dwRGBAlphaBitMask : LongWord; // mask for alpha channel
);
2: (
dwYUVBitCount : LongWord; // how many bits per pixel
dwYBitMask : LongWord; // mask for Y bits
dwUBitMask : LongWord; // mask for U bits
dwVBitMask : LongWord; // mask for V bits
dwYUVAlphaBitMask : LongWord; // mask for alpha channel
);
3: (
dwZBufferBitDepth : LongWord; // how many total bits/pixel in z buffer (including any stencil bits)
dwStencilBitDepth : LongWord; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
dwZBitMask : LongWord; // mask for Z bits
dwStencilBitMask : LongWord; // mask for stencil bits
dwLuminanceAlphaBitMask : LongWord; // mask for alpha channel
);
4: (
dwAlphaBitDepth : LongWord; // how many bits for alpha channels
dwLuminanceBitMask : LongWord; // mask for luminance bits
dwBumpDvBitMask : LongWord; // mask for bump map V delta bits
dwBumpLuminanceBitMask : LongWord; // mask for luminance in bump map
dwRGBZBitMask : LongWord; // mask for Z channel
);
5: (
dwLuminanceBitCount : LongWord; // how many bits per pixel
dwBumpDuBitMask : LongWord; // mask for bump map U delta bits
Fill1, Fill2 : LongWord;
dwYUVZBitMask : LongWord; // mask for Z channel
);
6: ( dwBumpBitCount : LongWord; // how many bits per "buxel", total
);
end;
TDDPixelFormat_DX3 = TDDPixelFormat_DX5;
TDDPixelFormat_DX7 = TDDPixelFormat_DX6;
PDDPixelFormat = ^TDDPixelFormat;
{$IFDEF DIRECTX3}
TDDPixelFormat = TDDPixelFormat_DX3;
{$ELSE}
{$IFDEF DIRECTX5}
TDDPixelFormat = TDDPixelFormat_DX5;
{$ELSE}
{$IFDEF DIRECTX6}
TDDPixelFormat = TDDPixelFormat_DX6;
{$ELSE}
TDDPixelFormat = TDDPixelFormat_DX7;
{$ENDIF}
{$ENDIF}
{$ENDIF}
(*
* TDDOverlayFX
*)
PDDOverlayFX = ^TDDOverlayFX;
TDDOverlayFX = packed record
dwSize : LongWord; // size of structure
dwAlphaEdgeBlendBitDepth : LongWord; // Bit depth used to specify constant for alpha edge blend
dwAlphaEdgeBlend : LongWord; // Constant to use as alpha for edge blend
dwReserved : LongWord;
dwAlphaDestConstBitDepth : LongWord; // Bit depth used to specify alpha constant for destination
case Integer of
0: (
dwAlphaDestConst : LongWord; // Constant to use as alpha channel for dest
dwAlphaSrcConstBitDepth : LongWord; // Bit depth used to specify alpha constant for source
dwAlphaSrcConst : LongWord; // Constant to use as alpha channel for src
dckDestColorkey : TDDColorKey; // DestColorkey override
dckSrcColorkey : TDDColorKey; // DestColorkey override
dwDDFX : LongWord; // Overlay FX
dwFlags : LongWord; // flags
);
1: (
lpDDSAlphaDest : PDirectDrawSurface; // Surface to use as alpha channel for dest
filler : LongWord;
lpDDSAlphaSrc : PDirectDrawSurface; // Surface to use as alpha channel for src
);
end;
(*
* TDDBltBatch: BltBatch entry structure
*)
PDDBltBatch = ^TDDBltBatch;
TDDBltBatch = packed record
lprDest : PRect;
lpDDSSrc : IDirectDrawSurface;
lprSrc : PRect;
dwFlags : LongWord;
lpDDBltFx : TDDBltFX;
end;
(*
* TDDGammaRamp
*)
PDDGammaRamp = ^TDDGammaRamp;
TDDGammaRamp = packed record
red : array[0..255] of Word;
green : array[0..255] of Word;
blue : array[0..255] of Word;
end;
(*
* This is the structure within which DirectDraw returns data about the current graphics driver and chipset
*)
PDDDeviceIdentifier = ^TDDDeviceIdentifier;
TDDDeviceIdentifier = 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 : LongWord;
dwDeviceId : LongWord;
dwSubSysId : LongWord;
dwRevision : LongWord;
//
// 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;
PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2;
TDDDeviceIdentifier2 = 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 : LongWord;
dwDeviceId : LongWord;
dwSubSysId : LongWord;
dwRevision : LongWord;
//
// 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.
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -