📄 direct3d8.pas
字号:
const
D3DTS_WORLD = TD3DTransformStateType(0 + 256); // #define D3DTS_WORLD D3DTS_WORLDMATRIX(0)
{$EXTERNALSYM D3DTS_WORLD}
D3DTS_WORLD1 = TD3DTransformStateType(1 + 256); // #define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1)
{$EXTERNALSYM D3DTS_WORLD1}
D3DTS_WORLD2 = TD3DTransformStateType(2 + 256); // #define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2)
{$EXTERNALSYM D3DTS_WORLD2}
D3DTS_WORLD3 = TD3DTransformStateType(3 + 256); // #define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3)
{$EXTERNALSYM D3DTS_WORLD3}
{$IFNDEF SUPPORTS_EXPL_ENUMS_except_BCB6}
type
_D3DRENDERSTATETYPE = {$IFDEF TYPE_IDENTITY}type {$ENDIF}DWord;
{$EXTERNALSYM _D3DRENDERSTATETYPE}
D3DRENDERSTATETYPE = _D3DRENDERSTATETYPE;
{$EXTERNALSYM D3DRENDERSTATETYPE}
TD3DRenderStateType = _D3DRENDERSTATETYPE;
const
D3DRS_ZENABLE = TD3DRenderStateType(7); { D3DZBUFFERTYPE (or TRUE/FALSE for legacy) }
{$EXTERNALSYM D3DRS_ZENABLE}
D3DRS_FILLMODE = TD3DRenderStateType(8); { D3DFILLMODE }
{$EXTERNALSYM D3DRS_FILLMODE}
D3DRS_SHADEMODE = TD3DRenderStateType(9); { D3DSHADEMODE }
{$EXTERNALSYM D3DRS_SHADEMODE}
D3DRS_LINEPATTERN = TD3DRenderStateType(10); { D3DLINEPATTERN }
{$EXTERNALSYM D3DRS_LINEPATTERN}
D3DRS_ZWRITEENABLE = TD3DRenderStateType(14); { TRUE to enable z writes }
{$EXTERNALSYM D3DRS_ZWRITEENABLE}
D3DRS_ALPHATESTENABLE = TD3DRenderStateType(15); { TRUE to enable alpha tests }
{$EXTERNALSYM D3DRS_ALPHATESTENABLE}
D3DRS_LASTPIXEL = TD3DRenderStateType(16); { TRUE for last-pixel on lines }
{$EXTERNALSYM D3DRS_LASTPIXEL}
D3DRS_SRCBLEND = TD3DRenderStateType(19); { D3DBLEND }
{$EXTERNALSYM D3DRS_SRCBLEND}
D3DRS_DESTBLEND = TD3DRenderStateType(20); { D3DBLEND }
{$EXTERNALSYM D3DRS_DESTBLEND}
D3DRS_CULLMODE = TD3DRenderStateType(22); { D3DCULL }
{$EXTERNALSYM D3DRS_CULLMODE}
D3DRS_ZFUNC = TD3DRenderStateType(23); { D3DCMPFUNC }
{$EXTERNALSYM D3DRS_ZFUNC}
D3DRS_ALPHAREF = TD3DRenderStateType(24); { D3DFIXED }
{$EXTERNALSYM D3DRS_ALPHAREF}
D3DRS_ALPHAFUNC = TD3DRenderStateType(25); { D3DCMPFUNC }
{$EXTERNALSYM D3DRS_ALPHAFUNC}
D3DRS_DITHERENABLE = TD3DRenderStateType(26); { TRUE to enable dithering }
{$EXTERNALSYM D3DRS_DITHERENABLE}
D3DRS_ALPHABLENDENABLE = TD3DRenderStateType(27); { TRUE to enable alpha blending }
{$EXTERNALSYM D3DRS_ALPHABLENDENABLE}
D3DRS_FOGENABLE = TD3DRenderStateType(28); { TRUE to enable fog blending }
{$EXTERNALSYM D3DRS_FOGENABLE}
D3DRS_SPECULARENABLE = TD3DRenderStateType(29); { TRUE to enable specular }
{$EXTERNALSYM D3DRS_SPECULARENABLE}
D3DRS_ZVISIBLE = TD3DRenderStateType(30); { TRUE to enable z checking }
{$EXTERNALSYM D3DRS_ZVISIBLE}
D3DRS_FOGCOLOR = TD3DRenderStateType(34); { D3DCOLOR }
{$EXTERNALSYM D3DRS_FOGCOLOR}
D3DRS_FOGTABLEMODE = TD3DRenderStateType(35); { D3DFOGMODE }
{$EXTERNALSYM D3DRS_FOGTABLEMODE}
D3DRS_FOGSTART = TD3DRenderStateType(36); { Fog start (for both vertex and pixel fog) }
{$EXTERNALSYM D3DRS_FOGSTART}
D3DRS_FOGEND = TD3DRenderStateType(37); { Fog end }
{$EXTERNALSYM D3DRS_FOGEND}
D3DRS_FOGDENSITY = TD3DRenderStateType(38); { Fog density }
{$EXTERNALSYM D3DRS_FOGDENSITY}
D3DRS_EDGEANTIALIAS = TD3DRenderStateType(40); { TRUE to enable edge antialiasing }
{$EXTERNALSYM D3DRS_EDGEANTIALIAS}
D3DRS_ZBIAS = TD3DRenderStateType(47); { LONG Z bias }
{$EXTERNALSYM D3DRS_ZBIAS}
D3DRS_RANGEFOGENABLE = TD3DRenderStateType(48); { Enables range-based fog }
{$EXTERNALSYM D3DRS_RANGEFOGENABLE}
D3DRS_STENCILENABLE = TD3DRenderStateType(52); { BOOL enable/disable stenciling }
{$EXTERNALSYM D3DRS_STENCILENABLE}
D3DRS_STENCILFAIL = TD3DRenderStateType(53); { D3DSTENCILOP to do if stencil test fails }
{$EXTERNALSYM D3DRS_STENCILFAIL}
D3DRS_STENCILZFAIL = TD3DRenderStateType(54); { D3DSTENCILOP to do if stencil test passes and Z test fails }
{$EXTERNALSYM D3DRS_STENCILZFAIL}
D3DRS_STENCILPASS = TD3DRenderStateType(55); { D3DSTENCILOP to do if both stencil and Z tests pass }
{$EXTERNALSYM D3DRS_STENCILPASS}
D3DRS_STENCILFUNC = TD3DRenderStateType(56); { D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true }
{$EXTERNALSYM D3DRS_STENCILFUNC}
D3DRS_STENCILREF = TD3DRenderStateType(57); { Reference value used in stencil test }
{$EXTERNALSYM D3DRS_STENCILREF}
D3DRS_STENCILMASK = TD3DRenderStateType(58); { Mask value used in stencil test }
{$EXTERNALSYM D3DRS_STENCILMASK}
D3DRS_STENCILWRITEMASK = TD3DRenderStateType(59); { Write mask applied to values written to stencil buffer }
{$EXTERNALSYM D3DRS_STENCILWRITEMASK}
D3DRS_TEXTUREFACTOR = TD3DRenderStateType(60); { D3DCOLOR used for multi-texture blend }
{$EXTERNALSYM D3DRS_TEXTUREFACTOR}
D3DRS_WRAP0 = TD3DRenderStateType(128); { wrap for 1st texture coord. set }
{$EXTERNALSYM D3DRS_WRAP0}
D3DRS_WRAP1 = TD3DRenderStateType(129); { wrap for 2nd texture coord. set }
{$EXTERNALSYM D3DRS_WRAP1}
D3DRS_WRAP2 = TD3DRenderStateType(130); { wrap for 3rd texture coord. set }
{$EXTERNALSYM D3DRS_WRAP2}
D3DRS_WRAP3 = TD3DRenderStateType(131); { wrap for 4th texture coord. set }
{$EXTERNALSYM D3DRS_WRAP3}
D3DRS_WRAP4 = TD3DRenderStateType(132); { wrap for 5th texture coord. set }
{$EXTERNALSYM D3DRS_WRAP4}
D3DRS_WRAP5 = TD3DRenderStateType(133); { wrap for 6th texture coord. set }
{$EXTERNALSYM D3DRS_WRAP5}
D3DRS_WRAP6 = TD3DRenderStateType(134); { wrap for 7th texture coord. set }
{$EXTERNALSYM D3DRS_WRAP6}
D3DRS_WRAP7 = TD3DRenderStateType(135); { wrap for 8th texture coord. set }
{$EXTERNALSYM D3DRS_WRAP7}
D3DRS_CLIPPING = TD3DRenderStateType(136);
{$EXTERNALSYM D3DRS_CLIPPING}
D3DRS_LIGHTING = TD3DRenderStateType(137);
{$EXTERNALSYM D3DRS_LIGHTING}
D3DRS_AMBIENT = TD3DRenderStateType(139);
{$EXTERNALSYM D3DRS_AMBIENT}
D3DRS_FOGVERTEXMODE = TD3DRenderStateType(140);
{$EXTERNALSYM D3DRS_FOGVERTEXMODE}
D3DRS_COLORVERTEX = TD3DRenderStateType(141);
{$EXTERNALSYM D3DRS_COLORVERTEX}
D3DRS_LOCALVIEWER = TD3DRenderStateType(142);
{$EXTERNALSYM D3DRS_LOCALVIEWER}
D3DRS_NORMALIZENORMALS = TD3DRenderStateType(143);
{$EXTERNALSYM D3DRS_NORMALIZENORMALS}
D3DRS_DIFFUSEMATERIALSOURCE = TD3DRenderStateType(145);
{$EXTERNALSYM D3DRS_DIFFUSEMATERIALSOURCE}
D3DRS_SPECULARMATERIALSOURCE = TD3DRenderStateType(146);
{$EXTERNALSYM D3DRS_SPECULARMATERIALSOURCE}
D3DRS_AMBIENTMATERIALSOURCE = TD3DRenderStateType(147);
{$EXTERNALSYM D3DRS_AMBIENTMATERIALSOURCE}
D3DRS_EMISSIVEMATERIALSOURCE = TD3DRenderStateType(148);
{$EXTERNALSYM D3DRS_EMISSIVEMATERIALSOURCE}
D3DRS_VERTEXBLEND = TD3DRenderStateType(151);
{$EXTERNALSYM D3DRS_VERTEXBLEND}
D3DRS_CLIPPLANEENABLE = TD3DRenderStateType(152);
{$EXTERNALSYM D3DRS_CLIPPLANEENABLE}
D3DRS_SOFTWAREVERTEXPROCESSING = TD3DRenderStateType(153);
{$EXTERNALSYM D3DRS_SOFTWAREVERTEXPROCESSING}
D3DRS_POINTSIZE = TD3DRenderStateType(154); { float point size }
{$EXTERNALSYM D3DRS_POINTSIZE}
D3DRS_POINTSIZE_MIN = TD3DRenderStateType(155); { float point size min threshold }
{$EXTERNALSYM D3DRS_POINTSIZE_MIN}
D3DRS_POINTSPRITEENABLE = TD3DRenderStateType(156); { BOOL point texture coord control }
{$EXTERNALSYM D3DRS_POINTSPRITEENABLE}
D3DRS_POINTSCALEENABLE = TD3DRenderStateType(157); { BOOL point size scale enable }
{$EXTERNALSYM D3DRS_POINTSCALEENABLE}
D3DRS_POINTSCALE_A = TD3DRenderStateType(158); { float point attenuation A value }
{$EXTERNALSYM D3DRS_POINTSCALE_A}
D3DRS_POINTSCALE_B = TD3DRenderStateType(159); { float point attenuation B value }
{$EXTERNALSYM D3DRS_POINTSCALE_B}
D3DRS_POINTSCALE_C = TD3DRenderStateType(160); { float point attenuation C value }
{$EXTERNALSYM D3DRS_POINTSCALE_C}
D3DRS_MULTISAMPLEANTIALIAS = TD3DRenderStateType(161); // BOOL - set to do FSAA with multisample buffer
{$EXTERNALSYM D3DRS_MULTISAMPLEANTIALIAS}
D3DRS_MULTISAMPLEMASK = TD3DRenderStateType(162); // DWORD - per-sample enable/disable
{$EXTERNALSYM D3DRS_MULTISAMPLEMASK}
D3DRS_PATCHEDGESTYLE = TD3DRenderStateType(163); // Sets whether patch edges will use float style tessellation
{$EXTERNALSYM D3DRS_PATCHEDGESTYLE}
D3DRS_PATCHSEGMENTS = TD3DRenderStateType(164); // Number of segments per edge when drawing patches
{$EXTERNALSYM D3DRS_PATCHSEGMENTS}
D3DRS_DEBUGMONITORTOKEN = TD3DRenderStateType(165); // DEBUG ONLY - token to debug monitor
{$EXTERNALSYM D3DRS_DEBUGMONITORTOKEN}
D3DRS_POINTSIZE_MAX = TD3DRenderStateType(166); { float point size max threshold }
{$EXTERNALSYM D3DRS_POINTSIZE_MAX}
D3DRS_INDEXEDVERTEXBLENDENABLE = TD3DRenderStateType(167);
{$EXTERNALSYM D3DRS_INDEXEDVERTEXBLENDENABLE}
D3DRS_COLORWRITEENABLE = TD3DRenderStateType(168); // per-channel write enable
{$EXTERNALSYM D3DRS_COLORWRITEENABLE}
D3DRS_TWEENFACTOR = TD3DRenderStateType(170); // float tween factor
{$EXTERNALSYM D3DRS_TWEENFACTOR}
D3DRS_BLENDOP = TD3DRenderStateType(171); // D3DBLENDOP setting
{$EXTERNALSYM D3DRS_BLENDOP}
D3DRS_POSITIONORDER = TD3DRenderStateType(172); // NPatch position interpolation order. D3DORDER_LINEAR or D3DORDER_CUBIC (default)
{$EXTERNALSYM D3DRS_POSITIONORDER}
D3DRS_NORMALORDER = TD3DRenderStateType(173); // NPatch normal interpolation order. D3DORDER_LINEAR (default) or D3DORDER_QUADRATIC
{$EXTERNALSYM D3DRS_NORMALORDER}
D3DRS_FORCE_DWORD = TD3DRenderStateType($7fffffff); { force 32-bit size enum }
{$EXTERNALSYM D3DRS_FORCE_DWORD}
{$ELSE}
type
_D3DRENDERSTATETYPE = (
D3DRS_ZENABLE = 7, (* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) *)
D3DRS_FILLMODE = 8, (* D3DFILLMODE *)
D3DRS_SHADEMODE = 9, (* D3DSHADEMODE *)
D3DRS_LINEPATTERN = 10, (* D3DLINEPATTERN *)
D3DRS_ZWRITEENABLE = 14, (* TRUE to enable z writes *)
D3DRS_ALPHATESTENABLE = 15, (* TRUE to enable alpha tests *)
D3DRS_LASTPIXEL = 16, (* TRUE for last-pixel on lines *)
D3DRS_SRCBLEND = 19, (* D3DBLEND *)
D3DRS_DESTBLEND = 20, (* D3DBLEND *)
D3DRS_CULLMODE = 22, (* D3DCULL *)
D3DRS_ZFUNC = 23, (* D3DCMPFUNC *)
D3DRS_ALPHAREF = 24, (* D3DFIXED *)
D3DRS_ALPHAFUNC = 25, (* D3DCMPFUNC *)
D3DRS_DITHERENABLE = 26, (* TRUE to enable dithering *)
D3DRS_ALPHABLENDENABLE = 27, (* TRUE to enable alpha blending *)
D3DRS_FOGENABLE = 28, (* TRUE to enable fog blending *)
D3DRS_SPECULARENABLE = 29, (* TRUE to enable specular *)
D3DRS_ZVISIBLE = 30, (* TRUE to enable z checking *)
D3DRS_FOGCOLOR = 34, (* D3DCOLOR *)
D3DRS_FOGTABLEMODE = 35, (* D3DFOGMODE *)
D3DRS_FOGSTART = 36, (* Fog start (for both vertex and pixel fog) *)
D3DRS_FOGEND = 37, (* Fog end *)
D3DRS_FOGDENSITY = 38, (* Fog density *)
D3DRS_EDGEANTIALIAS = 40, (* TRUE to enable edge antialiasing *)
D3DRS_ZBIAS = 47, (* LONG Z bias *)
D3DRS_RANGEFOGENABLE = 48, (* Enables range-based fog *)
D3DRS_STENCILENABLE = 52, (* BOOL enable/disable stenciling *)
D3DRS_STENCILFAIL = 53, (* D3DSTENCILOP to do if stencil test fails *)
D3DRS_STENCILZFAIL = 54, (* D3DSTENCILOP to do if stencil test passes and Z test fails *)
D3DRS_STENCILPASS = 55, (* D3DSTENCILOP to do if both stencil and Z tests pass *)
D3DRS_STENCILFUNC = 56, (* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true *)
D3DRS_STENCILREF = 57, (* Reference value used in stencil test *)
D3DRS_STENCILMASK = 58, (* Mask value used in stencil test *)
D3DRS_STENCILWRITEMASK = 59, (* Write mask applied to values written to stencil buffer *)
D3DRS_TEXTUREFACTOR = 60, (* D3DCOLOR used for multi-texture blend *)
D3DRS_WRAP0 = 128, (* wrap for 1st texture coord. set *)
D3DRS_WRAP1 = 129, (* wrap for 2nd texture coord. set *)
D3DRS_WRAP2 = 130, (* wrap for 3rd texture coord. set *)
D3DRS_WRAP3 = 131, (* wrap for 4th texture coord. set *)
D3DRS_WRAP4 = 132, (* wrap for 5th texture coord. set *)
D3DRS_WRAP5 = 133, (* wrap for 6th texture coord. set *)
D3DRS_WRAP6 = 134, (* wrap for 7th texture coord. set *)
D3DRS_WRAP7 = 135, (* wrap for 8th texture coord. set *)
D3DRS_CLIPPING = 136,
D3DRS_LIGHTING = 137,
D3DRS_AMBIENT = 139,
D3DRS_FOGVERTEXMODE = 140,
D3DRS_COLORVERTEX = 141,
D3DRS_LOCALVIEWER = 142,
D3DRS_NORMALIZENORMALS = 143,
D3DRS_DIFFUSEMATERIALSOURCE = 145,
D3DRS_SPECULARMATERIALSOURCE = 146,
D3DRS_AMBIENTMATERIALSOURCE = 147,
D3DRS_EMISSIVEMATERIALSOURCE = 148,
D3DRS_VERTEXBLEND = 151,
D3DRS_CLIPPLANEENABLE = 152,
D3DRS_SOFTWAREVERTEXPROCESSING = 153,
D3DRS_POINTSIZE = 154, (* float point size *)
D3DRS_POINTSIZE_MIN = 155, (* float point size min threshold *)
D3DRS_POINTSPRITEENABLE = 156, (* BOOL point texture coord control *)
D3DRS_POINTSCALEENABLE = 157, (* BOOL point size scale enable *)
D3DRS_POINTSCALE_A = 158, (* float point attenuation A value *)
D3DRS_POINTSCALE_B = 159, (* float point attenuation B value *)
D3DRS_POINTSCALE_C = 160, (* float point attenuation C value *)
D3DRS_MULTISAMPLEANTIALIAS = 161, // BOOL - set to do FSAA with multisample buffer
D3DRS_MULTISAMPLEMASK = 162, // DWORD - per-sample enable/disable
D3DRS_PATCHEDGESTYLE = 163, // Sets whether patch edges will use float style tessellation
D3DRS_PATCHSEGMENTS = 164, // Number of segments per edge when drawing patches
D3DRS_DEBUGMONITORTOKEN = 165, // DEBUG ONLY - token to debug monitor
D3DRS_POINTSIZE_MAX = 166, (* float point size max threshold *)
D3DRS_INDEXEDVERTEXBLENDENABLE = 167,
D3DRS_COLORWRITEENABLE = 168, // per-channel write enable
D3DRS_TWEENFACTOR = 170, // float tween factor
D3DRS_BLENDOP = 171, // D3DBLENDOP setting
D3DRS_POSITIONORDER = 172, // NPatch position interpolation order. D3DORDER_LINEAR or D3DORDER_CUBIC (default)
D3DRS_NORMALORDER = 173, // NPatch normal interpolation order. D3DORDER_LINEAR (default) or D3DORDER_QUADRATIC
D3DRS_FORCE_DWORD = $7fffffff (* force 32-bit size enum *)
);
{$EXTERNALSYM _D3DRENDERSTATETYPE}
D3DRENDERSTATETYPE = _D3DRENDERSTATETYPE;
{$EXTERNALSYM D3DRENDERSTATETYPE}
TD3DRenderStateType = _D3DRENDERSTATETYPE;
{$ENDIF}
type
// Values for material source
_D3DMATERIALCOLORSOURCE = {$IFDEF TYPE_IDENTITY}type {$ENDIF}DWord;
{$EXTERNALSYM _D3DMATERIALCOLORSOURCE}
D3DMATERIALCOLORSOURCE = _D3DMATERIALCOLORSOURCE;
{$EXTERNALSYM D3DMATERIALCOLORSOURCE}
TD3DMaterialSource = _D3DMATERIALCOLORSOURCE;
const
D3DMCS_MATERIAL = TD3DMaterialSource(0); // Color from material is used
{$EXTERNALSYM D3DMCS_MATERIAL}
D3DMCS_COLOR1 = TD3DMaterialSource(1); // Diffuse vertex color is used
{$EXTERNALSYM D3DMCS_COLOR1}
D3DMCS_COLOR2 = TD3DMaterialSource(2); // Specular vertex color is used
{$EXTERNALSYM D3DMCS_COLOR2}
D3DMCS_FORCE_DWORD = TD3DMaterialSource($7fffffff); // force 32-bit size enum
{$EXTERNALSYM D3DMCS_FORCE_DWORD}
// Bias to apply to the texture coordinate set to apply a wrap to.
D3DRENDERSTATE_WRAPBIAS = DWORD(128);
{$EXTERNALSYM D3DRENDERSTATE_WRAPBIAS}
{ Flags to construct the WRAP render states }
D3DWRAP_U = $00000001;
{$EXTERNALSYM D3DWRAP_U}
D3DWRAP_V = $00000002;
{$EXTERNALSYM D3DWRAP_V}
D3DWRAP_W = $00000004;
{$EXTERNALSYM D3DWRAP_W}
{ Flags to construct the WRAP render states for 1D thru 4D texture coordinates }
D3DWRAPCOORD_0 = $00000001; // same as D3DWRAP_U
{$EXTERNALSYM D3DWRAPCOORD_0}
D3DWRAPCOORD_1 = $00000002; // same as D3DWRAP_V
{$EXTERNALSYM D3DWRAPCOORD_1}
D3DWRAPCOORD_2 = $00000004; // same as D3DWRAP_W
{$EXTERNALSYM D3DWRAPCOORD_2}
D3DWRAPCOORD_3 = $00000008;
{$EXTERNALSYM D3DWRAPCOORD_3}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -