⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d3d.h

📁 国外游戏开发者杂志1997年第九期配套代码
💻 H
📖 第 1 页 / 共 4 页
字号:
#define IDirect3DViewport_NextLight(p, a, b, c)            (p)->lpVtbl->NextLight(p, a, b, c)
#else
#define IDirect3DViewport_QueryInterface(p, a, b)          (p)->QueryInterface(a, b)
#define IDirect3DViewport_AddRef(p)                        (p)->AddRef()
#define IDirect3DViewport_Release(p)                       (p)->Release()
#define IDirect3DViewport_Initialize(p, a)                 (p)->Initialize(a)
#define IDirect3DViewport_GetViewport(p, a)                (p)->GetViewport(a)
#define IDirect3DViewport_SetViewport(p, a)                (p)->SetViewport(a)
#define IDirect3DViewport_TransformVertices(p, a, b, c, d) (p)->TransformVertices(a, b, c, d)
#define IDirect3DViewport_LightElements(p, a, b)           (p)->LightElements(a, b)
#define IDirect3DViewport_SetBackground(p, a)              (p)->SetBackground(a)
#define IDirect3DViewport_GetBackground(p, a, b)           (p)->GetBackground(a, b)
#define IDirect3DViewport_SetBackgroundDepth(p, a)         (p)->SetBackgroundDepth(a)
#define IDirect3DViewport_GetBackgroundDepth(p, a, b)      (p)->GetBackgroundDepth(a, b)
#define IDirect3DViewport_Clear(p, a, b, c)                (p)->Clear(a, b, c)
#define IDirect3DViewport_AddLight(p, a)                   (p)->AddLight(a)
#define IDirect3DViewport_DeleteLight(p, a)                (p)->DeleteLight(a)
#define IDirect3DViewport_NextLight(p, a, b, c)            (p)->NextLight(a, b, c)
#endif

/*
 * IDirect3DViewport2
 */
#undef INTERFACE
#define INTERFACE IDirect3DViewport2
DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport)
{
    /*** IUnknown methods ***/
    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef) (THIS) PURE;
    STDMETHOD_(ULONG, Release) (THIS) PURE;
    /*** IDirect3DViewport methods ***/
    STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
    STDMETHOD(GetViewport) (THIS_ LPD3DVIEWPORT) PURE;
    STDMETHOD(SetViewport) (THIS_ LPD3DVIEWPORT) PURE;
    STDMETHOD(TransformVertices) (THIS_ DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD) PURE;
    STDMETHOD(LightElements) (THIS_ DWORD, LPD3DLIGHTDATA) PURE;
    STDMETHOD(SetBackground) (THIS_ D3DMATERIALHANDLE) PURE;
    STDMETHOD(GetBackground) (THIS_ LPD3DMATERIALHANDLE, LPBOOL) PURE;
    STDMETHOD(SetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE) PURE;
    STDMETHOD(GetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE*, LPBOOL) PURE;
    STDMETHOD(Clear) (THIS_ DWORD, LPD3DRECT, DWORD) PURE;
    STDMETHOD(AddLight) (THIS_ LPDIRECT3DLIGHT) PURE;
    STDMETHOD(DeleteLight) (THIS_ LPDIRECT3DLIGHT) PURE;
    STDMETHOD(NextLight) (THIS_ LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD) PURE;
    /*** IDirect3DViewport2 methods ***/
    STDMETHOD(GetViewport2) (THIS_ LPD3DVIEWPORT2) PURE;
    STDMETHOD(SetViewport2) (THIS_ LPD3DVIEWPORT2) PURE;
};

#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DViewport2_QueryInterface(p, a, b)          (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DViewport2_AddRef(p)                        (p)->lpVtbl->AddRef(p)
#define IDirect3DViewport2_Release(p)                       (p)->lpVtbl->Release(p)
#define IDirect3DViewport2_Initialize(p, a)                 (p)->lpVtbl->Initialize(p, a)
#define IDirect3DViewport2_GetViewport(p, a)                (p)->lpVtbl->GetViewport(p, a)
#define IDirect3DViewport2_SetViewport(p, a)                (p)->lpVtbl->SetViewport(p, a)
#define IDirect3DViewport2_TransformVertices(p, a, b, c, d) (p)->lpVtbl->TransformVertices(p, a, b, c, d)
#define IDirect3DViewport2_LightElements(p, a, b)           (p)->lpVtbl->LightElements(p, a, b)
#define IDirect3DViewport2_SetBackground(p, a)              (p)->lpVtbl->SetBackground(p, a)
#define IDirect3DViewport2_GetBackground(p, a, b)           (p)->lpVtbl->GetBackground(p, a, b)
#define IDirect3DViewport2_SetBackgroundDepth(p, a)         (p)->lpVtbl->SetBackgroundDepth(p, a)
#define IDirect3DViewport2_GetBackgroundDepth(p, a, b)      (p)->lpVtbl->GetBackgroundDepth(p, a, b)
#define IDirect3DViewport2_Clear(p, a, b, c)                (p)->lpVtbl->Clear(p, a, b, c)
#define IDirect3DViewport2_AddLight(p, a)                   (p)->lpVtbl->AddLight(p, a)
#define IDirect3DViewport2_DeleteLight(p, a)                (p)->lpVtbl->DeleteLight(p, a)
#define IDirect3DViewport2_NextLight(p, a, b, c)            (p)->lpVtbl->NextLight(p, a, b, c)
#define IDirect3DViewport2_GetViewport2(p, a)                (p)->lpVtbl->GetViewport2(p, a)
#define IDirect3DViewport2_SetViewport2(p, a)                (p)->lpVtbl->SetViewport2(p, a)
#else
#define IDirect3DViewport2_QueryInterface(p, a, b)          (p)->QueryInterface(a, b)
#define IDirect3DViewport2_AddRef(p)                        (p)->AddRef()
#define IDirect3DViewport2_Release(p)                       (p)->Release()
#define IDirect3DViewport2_Initialize(p, a)                 (p)->Initialize(a)
#define IDirect3DViewport2_GetViewport(p, a)                (p)->GetViewport(a)
#define IDirect3DViewport2_SetViewport(p, a)                (p)->SetViewport(a)
#define IDirect3DViewport2_TransformVertices(p, a, b, c, d) (p)->TransformVertices(a, b, c, d)
#define IDirect3DViewport2_LightElements(p, a, b)           (p)->LightElements(a, b)
#define IDirect3DViewport2_SetBackground(p, a)              (p)->SetBackground(a)
#define IDirect3DViewport2_GetBackground(p, a, b)           (p)->GetBackground(a, b)
#define IDirect3DViewport2_SetBackgroundDepth(p, a)         (p)->SetBackgroundDepth(a)
#define IDirect3DViewport2_GetBackgroundDepth(p, a, b)      (p)->GetBackgroundDepth(a, b)
#define IDirect3DViewport2_Clear(p, a, b, c)                (p)->Clear(a, b, c)
#define IDirect3DViewport2_AddLight(p, a)                   (p)->AddLight(a)
#define IDirect3DViewport2_DeleteLight(p, a)                (p)->DeleteLight(a)
#define IDirect3DViewport2_NextLight(p, a, b, c)            (p)->NextLight(a, b, c)
#define IDirect3DViewport2_GetViewport2(p, a)                (p)->GetViewport2(a)
#define IDirect3DViewport2_SetViewport2(p, a)                (p)->SetViewport2(a)
#endif


/****************************************************************************
 *
 * Flags for IDirect3DDevice::NextViewport
 *
 ****************************************************************************/

/*
 * Return the next viewport
 */
#define D3DNEXT_NEXT	0x00000001l

/*
 * Return the first viewport
 */
#define D3DNEXT_HEAD	0x00000002l

/*
 * Return the last viewport
 */
#define D3DNEXT_TAIL	0x00000004l


/****************************************************************************
 *
 * Flags for DrawPrimitive/DrawIndexedPrimitive
 *   Also valid for Begin/BeginIndexed
 *
 ****************************************************************************/

/*
 * Wait until the device is ready to draw the primitive
 * This will cause DP to not return DDERR_WASSTILLDRAWING
 */
#define D3DDP_WAIT					0x00000001l


/*
 * Hint that the primitives have been clipped by the application.
 */
#define D3DDP_DONOTCLIP				0x00000004l

/*
 * Hint that the extents need not be updated.
 */
#define D3DDP_DONOTUPDATEEXTENTS	0x00000008l

/*
 * Direct3D Errors
 * DirectDraw error codes are used when errors not specified here.
 */
#define D3D_OK				DD_OK
#define D3DERR_BADMAJORVERSION		MAKE_DDHRESULT(700)
#define D3DERR_BADMINORVERSION		MAKE_DDHRESULT(701)

/*
 * An invalid device was requested by the application.
 */
#define D3DERR_INVALID_DEVICE   MAKE_DDHRESULT(705)
#define D3DERR_INITFAILED       MAKE_DDHRESULT(706)

/*
 * SetRenderTarget attempted on a device that was
 * QI'd off the render target.
 */
#define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)

#define D3DERR_EXECUTE_CREATE_FAILED	MAKE_DDHRESULT(710)
#define D3DERR_EXECUTE_DESTROY_FAILED	MAKE_DDHRESULT(711)
#define D3DERR_EXECUTE_LOCK_FAILED	MAKE_DDHRESULT(712)
#define D3DERR_EXECUTE_UNLOCK_FAILED	MAKE_DDHRESULT(713)
#define D3DERR_EXECUTE_LOCKED		MAKE_DDHRESULT(714)
#define D3DERR_EXECUTE_NOT_LOCKED	MAKE_DDHRESULT(715)

#define D3DERR_EXECUTE_FAILED		MAKE_DDHRESULT(716)
#define D3DERR_EXECUTE_CLIPPED_FAILED	MAKE_DDHRESULT(717)

#define D3DERR_TEXTURE_NO_SUPPORT	MAKE_DDHRESULT(720)
#define D3DERR_TEXTURE_CREATE_FAILED	MAKE_DDHRESULT(721)
#define D3DERR_TEXTURE_DESTROY_FAILED	MAKE_DDHRESULT(722)
#define D3DERR_TEXTURE_LOCK_FAILED	MAKE_DDHRESULT(723)
#define D3DERR_TEXTURE_UNLOCK_FAILED	MAKE_DDHRESULT(724)
#define D3DERR_TEXTURE_LOAD_FAILED	MAKE_DDHRESULT(725)
#define D3DERR_TEXTURE_SWAP_FAILED	MAKE_DDHRESULT(726)
#define D3DERR_TEXTURE_LOCKED		MAKE_DDHRESULT(727)
#define D3DERR_TEXTURE_NOT_LOCKED	MAKE_DDHRESULT(728)
#define D3DERR_TEXTURE_GETSURF_FAILED	MAKE_DDHRESULT(729)

#define D3DERR_MATRIX_CREATE_FAILED	MAKE_DDHRESULT(730)
#define D3DERR_MATRIX_DESTROY_FAILED	MAKE_DDHRESULT(731)
#define D3DERR_MATRIX_SETDATA_FAILED	MAKE_DDHRESULT(732)
#define D3DERR_MATRIX_GETDATA_FAILED	MAKE_DDHRESULT(733)
#define D3DERR_SETVIEWPORTDATA_FAILED	MAKE_DDHRESULT(734)

#define D3DERR_INVALIDCURRENTVIEWPORT   MAKE_DDHRESULT(735)
#define D3DERR_INVALIDPRIMITIVETYPE     MAKE_DDHRESULT(736)
#define D3DERR_INVALIDVERTEXTYPE        MAKE_DDHRESULT(737)
#define D3DERR_TEXTURE_BADSIZE          MAKE_DDHRESULT(738)
#define D3DERR_INVALIDRAMPTEXTURE		MAKE_DDHRESULT(739)

#define D3DERR_MATERIAL_CREATE_FAILED	MAKE_DDHRESULT(740)
#define D3DERR_MATERIAL_DESTROY_FAILED	MAKE_DDHRESULT(741)
#define D3DERR_MATERIAL_SETDATA_FAILED	MAKE_DDHRESULT(742)
#define D3DERR_MATERIAL_GETDATA_FAILED	MAKE_DDHRESULT(743)
#define D3DERR_INVALIDPALETTE	        MAKE_DDHRESULT(744)

#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY  MAKE_DDHRESULT(746)
#define D3DERR_SURFACENOTINVIDMEM       MAKE_DDHRESULT(747)

#define D3DERR_LIGHT_SET_FAILED		MAKE_DDHRESULT(750)
#define D3DERR_LIGHTHASVIEWPORT		MAKE_DDHRESULT(751)
#define D3DERR_LIGHTNOTINTHISVIEWPORT           MAKE_DDHRESULT(752)

#define D3DERR_SCENE_IN_SCENE		MAKE_DDHRESULT(760)
#define D3DERR_SCENE_NOT_IN_SCENE	MAKE_DDHRESULT(761)
#define D3DERR_SCENE_BEGIN_FAILED	MAKE_DDHRESULT(762)
#define D3DERR_SCENE_END_FAILED		MAKE_DDHRESULT(763)

#define D3DERR_INBEGIN                  MAKE_DDHRESULT(770)
#define D3DERR_NOTINBEGIN               MAKE_DDHRESULT(771)
#define D3DERR_NOVIEWPORTS              MAKE_DDHRESULT(772)
#define D3DERR_VIEWPORTDATANOTSET       MAKE_DDHRESULT(773)
#define D3DERR_VIEWPORTHASNODEVICE      MAKE_DDHRESULT(774)
#define D3DERR_NOCURRENTVIEWPORT		MAKE_DDHRESULT(775)

#ifdef __cplusplus
};
#endif

#endif /* _D3D_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -