upload
This commit is contained in:
2791
subVersion/d3d9/d3d9.h
Normal file
2791
subVersion/d3d9/d3d9.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
subVersion/d3d9/d3d9.lib
Normal file
BIN
subVersion/d3d9/d3d9.lib
Normal file
Binary file not shown.
78
subVersion/d3d9/d3dx9.h
Normal file
78
subVersion/d3d9/d3dx9.h
Normal file
@@ -0,0 +1,78 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9.h
|
||||
// Content: D3DX utility library
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __D3DX_INTERNAL__
|
||||
#error Incorrect D3DX header used
|
||||
#endif
|
||||
|
||||
#ifndef __D3DX9_H__
|
||||
#define __D3DX9_H__
|
||||
|
||||
|
||||
// Defines
|
||||
#include <limits.h>
|
||||
|
||||
#define D3DX_DEFAULT ((UINT) -1)
|
||||
#define D3DX_DEFAULT_NONPOW2 ((UINT) -2)
|
||||
#define D3DX_DEFAULT_FLOAT FLT_MAX
|
||||
#define D3DX_FROM_FILE ((UINT) -3)
|
||||
#define D3DFMT_FROM_FILE ((D3DFORMAT) -3)
|
||||
|
||||
#ifndef D3DXINLINE
|
||||
#ifdef _MSC_VER
|
||||
#if (_MSC_VER >= 1200)
|
||||
#define D3DXINLINE __forceinline
|
||||
#else
|
||||
#define D3DXINLINE __inline
|
||||
#endif
|
||||
#else
|
||||
#ifdef __cplusplus
|
||||
#define D3DXINLINE inline
|
||||
#else
|
||||
#define D3DXINLINE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Includes
|
||||
#include "d3d9.h"
|
||||
#include "d3dx9math.h"
|
||||
#include "d3dx9core.h"
|
||||
#include "d3dx9xof.h"
|
||||
#include "d3dx9mesh.h"
|
||||
#include "d3dx9shader.h"
|
||||
#include "d3dx9effect.h"
|
||||
|
||||
#include "d3dx9tex.h"
|
||||
#include "d3dx9shape.h"
|
||||
#include "d3dx9anim.h"
|
||||
|
||||
|
||||
|
||||
// Errors
|
||||
#define _FACDD 0x876
|
||||
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
|
||||
|
||||
enum _D3DXERR {
|
||||
D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900),
|
||||
D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901),
|
||||
D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902),
|
||||
D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903),
|
||||
D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904),
|
||||
D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905),
|
||||
D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906),
|
||||
D3DXERR_DUPLICATENAMEDFRAGMENT = MAKE_DDHRESULT(2907),
|
||||
D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908),
|
||||
};
|
||||
|
||||
|
||||
#endif //__D3DX9_H__
|
||||
|
BIN
subVersion/d3d9/d3dx9.lib
Normal file
BIN
subVersion/d3d9/d3dx9.lib
Normal file
Binary file not shown.
1114
subVersion/d3d9/d3dx9anim.h
Normal file
1114
subVersion/d3d9/d3dx9anim.h
Normal file
File diff suppressed because it is too large
Load Diff
753
subVersion/d3d9/d3dx9core.h
Normal file
753
subVersion/d3d9/d3dx9core.h
Normal file
@@ -0,0 +1,753 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9core.h
|
||||
// Content: D3DX core types and functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#ifndef __D3DX9CORE_H__
|
||||
#define __D3DX9CORE_H__
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3DX_SDK_VERSION:
|
||||
// -----------------
|
||||
// This identifier is passed to D3DXCheckVersion in order to ensure that an
|
||||
// application was built against the correct header files and lib files.
|
||||
// This number is incremented whenever a header (or other) change would
|
||||
// require applications to be rebuilt. If the version doesn't match,
|
||||
// D3DXCheckVersion will return FALSE. (The number itself has no meaning.)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define D3DX_VERSION 0x0902
|
||||
|
||||
#define D3DX_SDK_VERSION 43
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
BOOL WINAPI
|
||||
D3DXCheckVersion(UINT D3DSdkVersion, UINT D3DXSdkVersion);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3DXDebugMute
|
||||
// Mutes D3DX and D3D debug spew (TRUE - mute, FALSE - not mute)
|
||||
//
|
||||
// returns previous mute value
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
BOOL WINAPI
|
||||
D3DXDebugMute(BOOL Mute);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// D3DXGetDriverLevel:
|
||||
// Returns driver version information:
|
||||
//
|
||||
// 700 - DX7 level driver
|
||||
// 800 - DX8 level driver
|
||||
// 900 - DX9 level driver
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
UINT WINAPI
|
||||
D3DXGetDriverLevel(LPDIRECT3DDEVICE9 pDevice);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXBuffer:
|
||||
// ------------
|
||||
// The buffer object is used by D3DX to return arbitrary size data.
|
||||
//
|
||||
// GetBufferPointer -
|
||||
// Returns a pointer to the beginning of the buffer.
|
||||
//
|
||||
// GetBufferSize -
|
||||
// Returns the size of the buffer, in bytes.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXBuffer ID3DXBuffer;
|
||||
typedef interface ID3DXBuffer *LPD3DXBUFFER;
|
||||
|
||||
// {8BA5FB08-5195-40e2-AC58-0D989C3A0102}
|
||||
DEFINE_GUID(IID_ID3DXBuffer,
|
||||
0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXBuffer
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXBuffer
|
||||
STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// D3DXSPRITE flags:
|
||||
// -----------------
|
||||
// D3DXSPRITE_DONOTSAVESTATE
|
||||
// Specifies device state is not to be saved and restored in Begin/End.
|
||||
// D3DXSPRITE_DONOTMODIFY_RENDERSTATE
|
||||
// Specifies device render state is not to be changed in Begin. The device
|
||||
// is assumed to be in a valid state to draw vertices containing POSITION0,
|
||||
// TEXCOORD0, and COLOR0 data.
|
||||
// D3DXSPRITE_OBJECTSPACE
|
||||
// The WORLD, VIEW, and PROJECTION transforms are NOT modified. The
|
||||
// transforms currently set to the device are used to transform the sprites
|
||||
// when the batch is drawn (at Flush or End). If this is not specified,
|
||||
// WORLD, VIEW, and PROJECTION transforms are modified so that sprites are
|
||||
// drawn in screenspace coordinates.
|
||||
// D3DXSPRITE_BILLBOARD
|
||||
// Rotates each sprite about its center so that it is facing the viewer.
|
||||
// D3DXSPRITE_ALPHABLEND
|
||||
// Enables ALPHABLEND(SRCALPHA, INVSRCALPHA) and ALPHATEST(alpha > 0).
|
||||
// ID3DXFont expects this to be set when drawing text.
|
||||
// D3DXSPRITE_SORT_TEXTURE
|
||||
// Sprites are sorted by texture prior to drawing. This is recommended when
|
||||
// drawing non-overlapping sprites of uniform depth. For example, drawing
|
||||
// screen-aligned text with ID3DXFont.
|
||||
// D3DXSPRITE_SORT_DEPTH_FRONTTOBACK
|
||||
// Sprites are sorted by depth front-to-back prior to drawing. This is
|
||||
// recommended when drawing opaque sprites of varying depths.
|
||||
// D3DXSPRITE_SORT_DEPTH_BACKTOFRONT
|
||||
// Sprites are sorted by depth back-to-front prior to drawing. This is
|
||||
// recommended when drawing transparent sprites of varying depths.
|
||||
// D3DXSPRITE_DO_NOT_ADDREF_TEXTURE
|
||||
// Disables calling AddRef() on every draw, and Release() on Flush() for
|
||||
// better performance.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define D3DXSPRITE_DONOTSAVESTATE (1 << 0)
|
||||
#define D3DXSPRITE_DONOTMODIFY_RENDERSTATE (1 << 1)
|
||||
#define D3DXSPRITE_OBJECTSPACE (1 << 2)
|
||||
#define D3DXSPRITE_BILLBOARD (1 << 3)
|
||||
#define D3DXSPRITE_ALPHABLEND (1 << 4)
|
||||
#define D3DXSPRITE_SORT_TEXTURE (1 << 5)
|
||||
#define D3DXSPRITE_SORT_DEPTH_FRONTTOBACK (1 << 6)
|
||||
#define D3DXSPRITE_SORT_DEPTH_BACKTOFRONT (1 << 7)
|
||||
#define D3DXSPRITE_DO_NOT_ADDREF_TEXTURE (1 << 8)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXSprite:
|
||||
// ------------
|
||||
// This object intends to provide an easy way to drawing sprites using D3D.
|
||||
//
|
||||
// Begin -
|
||||
// Prepares device for drawing sprites.
|
||||
//
|
||||
// Draw -
|
||||
// Draws a sprite. Before transformation, the sprite is the size of
|
||||
// SrcRect, with its top-left corner specified by Position. The color
|
||||
// and alpha channels are modulated by Color.
|
||||
//
|
||||
// Flush -
|
||||
// Forces all batched sprites to submitted to the device.
|
||||
//
|
||||
// End -
|
||||
// Restores device state to how it was when Begin was called.
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXSprite ID3DXSprite;
|
||||
typedef interface ID3DXSprite *LPD3DXSPRITE;
|
||||
|
||||
|
||||
// {BA0B762D-7D28-43ec-B9DC-2F84443B0614}
|
||||
DEFINE_GUID(IID_ID3DXSprite,
|
||||
0xba0b762d, 0x7d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXSprite
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXSprite, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXSprite
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
|
||||
STDMETHOD(GetTransform)(THIS_ D3DXMATRIX *pTransform) PURE;
|
||||
STDMETHOD(SetTransform)(THIS_ CONST D3DXMATRIX *pTransform) PURE;
|
||||
|
||||
STDMETHOD(SetWorldViewRH)(THIS_ CONST D3DXMATRIX *pWorld, CONST D3DXMATRIX *pView) PURE;
|
||||
STDMETHOD(SetWorldViewLH)(THIS_ CONST D3DXMATRIX *pWorld, CONST D3DXMATRIX *pView) PURE;
|
||||
|
||||
STDMETHOD(Begin)(THIS_ DWORD Flags) PURE;
|
||||
STDMETHOD(Draw)(THIS_ LPDIRECT3DTEXTURE9 pTexture, CONST RECT *pSrcRect, CONST D3DXVECTOR3 *pCenter, CONST D3DXVECTOR3 *pPosition, D3DCOLOR Color) PURE;
|
||||
STDMETHOD(Flush)(THIS) PURE;
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSprite(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPD3DXSPRITE* ppSprite);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFont:
|
||||
// ----------
|
||||
// Font objects contain the textures and resources needed to render a specific
|
||||
// font on a specific device.
|
||||
//
|
||||
// GetGlyphData -
|
||||
// Returns glyph cache data, for a given glyph.
|
||||
//
|
||||
// PreloadCharacters/PreloadGlyphs/PreloadText -
|
||||
// Preloads glyphs into the glyph cache textures.
|
||||
//
|
||||
// DrawText -
|
||||
// Draws formatted text on a D3D device. Some parameters are
|
||||
// surprisingly similar to those of GDI's DrawText function. See GDI
|
||||
// documentation for a detailed description of these parameters.
|
||||
// If pSprite is NULL, an internal sprite object will be used.
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXFONT_DESCA
|
||||
{
|
||||
INT Height;
|
||||
UINT Width;
|
||||
UINT Weight;
|
||||
UINT MipLevels;
|
||||
BOOL Italic;
|
||||
BYTE CharSet;
|
||||
BYTE OutputPrecision;
|
||||
BYTE Quality;
|
||||
BYTE PitchAndFamily;
|
||||
CHAR FaceName[LF_FACESIZE];
|
||||
|
||||
} D3DXFONT_DESCA, *LPD3DXFONT_DESCA;
|
||||
|
||||
typedef struct _D3DXFONT_DESCW
|
||||
{
|
||||
INT Height;
|
||||
UINT Width;
|
||||
UINT Weight;
|
||||
UINT MipLevels;
|
||||
BOOL Italic;
|
||||
BYTE CharSet;
|
||||
BYTE OutputPrecision;
|
||||
BYTE Quality;
|
||||
BYTE PitchAndFamily;
|
||||
WCHAR FaceName[LF_FACESIZE];
|
||||
|
||||
} D3DXFONT_DESCW, *LPD3DXFONT_DESCW;
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef D3DXFONT_DESCW D3DXFONT_DESC;
|
||||
typedef LPD3DXFONT_DESCW LPD3DXFONT_DESC;
|
||||
#else
|
||||
typedef D3DXFONT_DESCA D3DXFONT_DESC;
|
||||
typedef LPD3DXFONT_DESCA LPD3DXFONT_DESC;
|
||||
#endif
|
||||
|
||||
|
||||
typedef interface ID3DXFont ID3DXFont;
|
||||
typedef interface ID3DXFont *LPD3DXFONT;
|
||||
|
||||
|
||||
// {D79DBB70-5F21-4d36-BBC2-FF525C213CDC}
|
||||
DEFINE_GUID(IID_ID3DXFont,
|
||||
0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFont
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXFont, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXFont
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9 *ppDevice) PURE;
|
||||
STDMETHOD(GetDescA)(THIS_ D3DXFONT_DESCA *pDesc) PURE;
|
||||
STDMETHOD(GetDescW)(THIS_ D3DXFONT_DESCW *pDesc) PURE;
|
||||
STDMETHOD_(BOOL, GetTextMetricsA)(THIS_ TEXTMETRICA *pTextMetrics) PURE;
|
||||
STDMETHOD_(BOOL, GetTextMetricsW)(THIS_ TEXTMETRICW *pTextMetrics) PURE;
|
||||
|
||||
STDMETHOD_(HDC, GetDC)(THIS) PURE;
|
||||
STDMETHOD(GetGlyphData)(THIS_ UINT Glyph, LPDIRECT3DTEXTURE9 *ppTexture, RECT *pBlackBox, POINT *pCellInc) PURE;
|
||||
|
||||
STDMETHOD(PreloadCharacters)(THIS_ UINT First, UINT Last) PURE;
|
||||
STDMETHOD(PreloadGlyphs)(THIS_ UINT First, UINT Last) PURE;
|
||||
STDMETHOD(PreloadTextA)(THIS_ LPCSTR pString, INT Count) PURE;
|
||||
STDMETHOD(PreloadTextW)(THIS_ LPCWSTR pString, INT Count) PURE;
|
||||
|
||||
STDMETHOD_(INT, DrawTextA)(THIS_ LPD3DXSPRITE pSprite, LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
|
||||
STDMETHOD_(INT, DrawTextW)(THIS_ LPD3DXSPRITE pSprite, LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef UNICODE
|
||||
HRESULT GetDesc(D3DXFONT_DESCW *pDesc) { return GetDescW(pDesc); }
|
||||
HRESULT PreloadText(LPCWSTR pString, INT Count) { return PreloadTextW(pString, Count); }
|
||||
#else
|
||||
HRESULT GetDesc(D3DXFONT_DESCA *pDesc) { return GetDescA(pDesc); }
|
||||
HRESULT PreloadText(LPCSTR pString, INT Count) { return PreloadTextA(pString, Count); }
|
||||
#endif
|
||||
#endif //__cplusplus
|
||||
};
|
||||
|
||||
#ifndef GetTextMetrics
|
||||
#ifdef UNICODE
|
||||
#define GetTextMetrics GetTextMetricsW
|
||||
#else
|
||||
#define GetTextMetrics GetTextMetricsA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DrawText
|
||||
#ifdef UNICODE
|
||||
#define DrawText DrawTextW
|
||||
#else
|
||||
#define DrawText DrawTextA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
INT Height,
|
||||
UINT Width,
|
||||
UINT Weight,
|
||||
UINT MipLevels,
|
||||
BOOL Italic,
|
||||
DWORD CharSet,
|
||||
DWORD OutputPrecision,
|
||||
DWORD Quality,
|
||||
DWORD PitchAndFamily,
|
||||
LPCSTR pFaceName,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
INT Height,
|
||||
UINT Width,
|
||||
UINT Weight,
|
||||
UINT MipLevels,
|
||||
BOOL Italic,
|
||||
DWORD CharSet,
|
||||
DWORD OutputPrecision,
|
||||
DWORD Quality,
|
||||
DWORD PitchAndFamily,
|
||||
LPCWSTR pFaceName,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateFont D3DXCreateFontW
|
||||
#else
|
||||
#define D3DXCreateFont D3DXCreateFontA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontIndirectA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
CONST D3DXFONT_DESCA* pDesc,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontIndirectW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
CONST D3DXFONT_DESCW* pDesc,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateFontIndirect D3DXCreateFontIndirectW
|
||||
#else
|
||||
#define D3DXCreateFontIndirect D3DXCreateFontIndirectA
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXRenderToSurface:
|
||||
// ---------------------
|
||||
// This object abstracts rendering to surfaces. These surfaces do not
|
||||
// necessarily need to be render targets. If they are not, a compatible
|
||||
// render target is used, and the result copied into surface at end scene.
|
||||
//
|
||||
// BeginScene, EndScene -
|
||||
// Call BeginScene() and EndScene() at the beginning and ending of your
|
||||
// scene. These calls will setup and restore render targets, viewports,
|
||||
// etc..
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXRTS_DESC
|
||||
{
|
||||
UINT Width;
|
||||
UINT Height;
|
||||
D3DFORMAT Format;
|
||||
BOOL DepthStencil;
|
||||
D3DFORMAT DepthStencilFormat;
|
||||
|
||||
} D3DXRTS_DESC, *LPD3DXRTS_DESC;
|
||||
|
||||
|
||||
typedef interface ID3DXRenderToSurface ID3DXRenderToSurface;
|
||||
typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE;
|
||||
|
||||
|
||||
// {6985F346-2C3D-43b3-BE8B-DAAE8A03D894}
|
||||
DEFINE_GUID(IID_ID3DXRenderToSurface,
|
||||
0x6985f346, 0x2c3d, 0x43b3, 0xbe, 0x8b, 0xda, 0xae, 0x8a, 0x3, 0xd8, 0x94);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXRenderToSurface
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXRenderToSurface
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(BeginScene)(THIS_ LPDIRECT3DSURFACE9 pSurface, CONST D3DVIEWPORT9* pViewport) PURE;
|
||||
STDMETHOD(EndScene)(THIS_ DWORD MipFilter) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateRenderToSurface(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
UINT Width,
|
||||
UINT Height,
|
||||
D3DFORMAT Format,
|
||||
BOOL DepthStencil,
|
||||
D3DFORMAT DepthStencilFormat,
|
||||
LPD3DXRENDERTOSURFACE* ppRenderToSurface);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXRenderToEnvMap:
|
||||
// --------------------
|
||||
// This object abstracts rendering to environment maps. These surfaces
|
||||
// do not necessarily need to be render targets. If they are not, a
|
||||
// compatible render target is used, and the result copied into the
|
||||
// environment map at end scene.
|
||||
//
|
||||
// BeginCube, BeginSphere, BeginHemisphere, BeginParabolic -
|
||||
// This function initiates the rendering of the environment map. As
|
||||
// parameters, you pass the textures in which will get filled in with
|
||||
// the resulting environment map.
|
||||
//
|
||||
// Face -
|
||||
// Call this function to initiate the drawing of each face. For each
|
||||
// environment map, you will call this six times.. once for each face
|
||||
// in D3DCUBEMAP_FACES.
|
||||
//
|
||||
// End -
|
||||
// This will restore all render targets, and if needed compose all the
|
||||
// rendered faces into the environment map surfaces.
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXRTE_DESC
|
||||
{
|
||||
UINT Size;
|
||||
UINT MipLevels;
|
||||
D3DFORMAT Format;
|
||||
BOOL DepthStencil;
|
||||
D3DFORMAT DepthStencilFormat;
|
||||
|
||||
} D3DXRTE_DESC, *LPD3DXRTE_DESC;
|
||||
|
||||
|
||||
typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap;
|
||||
typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap;
|
||||
|
||||
|
||||
// {313F1B4B-C7B0-4fa2-9D9D-8D380B64385E}
|
||||
DEFINE_GUID(IID_ID3DXRenderToEnvMap,
|
||||
0x313f1b4b, 0xc7b0, 0x4fa2, 0x9d, 0x9d, 0x8d, 0x38, 0xb, 0x64, 0x38, 0x5e);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXRenderToEnvMap
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXRenderToEnvMap
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(BeginCube)(THIS_
|
||||
LPDIRECT3DCUBETEXTURE9 pCubeTex) PURE;
|
||||
|
||||
STDMETHOD(BeginSphere)(THIS_
|
||||
LPDIRECT3DTEXTURE9 pTex) PURE;
|
||||
|
||||
STDMETHOD(BeginHemisphere)(THIS_
|
||||
LPDIRECT3DTEXTURE9 pTexZPos,
|
||||
LPDIRECT3DTEXTURE9 pTexZNeg) PURE;
|
||||
|
||||
STDMETHOD(BeginParabolic)(THIS_
|
||||
LPDIRECT3DTEXTURE9 pTexZPos,
|
||||
LPDIRECT3DTEXTURE9 pTexZNeg) PURE;
|
||||
|
||||
STDMETHOD(Face)(THIS_ D3DCUBEMAP_FACES Face, DWORD MipFilter) PURE;
|
||||
STDMETHOD(End)(THIS_ DWORD MipFilter) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateRenderToEnvMap(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
UINT Size,
|
||||
UINT MipLevels,
|
||||
D3DFORMAT Format,
|
||||
BOOL DepthStencil,
|
||||
D3DFORMAT DepthStencilFormat,
|
||||
LPD3DXRenderToEnvMap* ppRenderToEnvMap);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXLine:
|
||||
// ------------
|
||||
// This object intends to provide an easy way to draw lines using D3D.
|
||||
//
|
||||
// Begin -
|
||||
// Prepares device for drawing lines
|
||||
//
|
||||
// Draw -
|
||||
// Draws a line strip in screen-space.
|
||||
// Input is in the form of a array defining points on the line strip. of D3DXVECTOR2
|
||||
//
|
||||
// DrawTransform -
|
||||
// Draws a line in screen-space with a specified input transformation matrix.
|
||||
//
|
||||
// End -
|
||||
// Restores device state to how it was when Begin was called.
|
||||
//
|
||||
// SetPattern -
|
||||
// Applies a stipple pattern to the line. Input is one 32-bit
|
||||
// DWORD which describes the stipple pattern. 1 is opaque, 0 is
|
||||
// transparent.
|
||||
//
|
||||
// SetPatternScale -
|
||||
// Stretches the stipple pattern in the u direction. Input is one
|
||||
// floating-point value. 0.0f is no scaling, whereas 1.0f doubles
|
||||
// the length of the stipple pattern.
|
||||
//
|
||||
// SetWidth -
|
||||
// Specifies the thickness of the line in the v direction. Input is
|
||||
// one floating-point value.
|
||||
//
|
||||
// SetAntialias -
|
||||
// Toggles line antialiasing. Input is a BOOL.
|
||||
// TRUE = Antialiasing on.
|
||||
// FALSE = Antialiasing off.
|
||||
//
|
||||
// SetGLLines -
|
||||
// Toggles non-antialiased OpenGL line emulation. Input is a BOOL.
|
||||
// TRUE = OpenGL line emulation on.
|
||||
// FALSE = OpenGL line emulation off.
|
||||
//
|
||||
// OpenGL line: Regular line:
|
||||
// *\ *\
|
||||
// | \ / \
|
||||
// | \ *\ \
|
||||
// *\ \ \ \
|
||||
// \ \ \ \
|
||||
// \ * \ *
|
||||
// \ | \ /
|
||||
// \| *
|
||||
// *
|
||||
//
|
||||
// OnLostDevice, OnResetDevice -
|
||||
// Call OnLostDevice() on this object before calling Reset() on the
|
||||
// device, so that this object can release any stateblocks and video
|
||||
// memory resources. After Reset(), the call OnResetDevice().
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
typedef interface ID3DXLine ID3DXLine;
|
||||
typedef interface ID3DXLine *LPD3DXLINE;
|
||||
|
||||
|
||||
// {D379BA7F-9042-4ac4-9F5E-58192A4C6BD8}
|
||||
DEFINE_GUID(IID_ID3DXLine,
|
||||
0xd379ba7f, 0x9042, 0x4ac4, 0x9f, 0x5e, 0x58, 0x19, 0x2a, 0x4c, 0x6b, 0xd8);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXLine
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXLine, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXLine
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
|
||||
STDMETHOD(Begin)(THIS) PURE;
|
||||
|
||||
STDMETHOD(Draw)(THIS_ CONST D3DXVECTOR2 *pVertexList,
|
||||
DWORD dwVertexListCount, D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(DrawTransform)(THIS_ CONST D3DXVECTOR3 *pVertexList,
|
||||
DWORD dwVertexListCount, CONST D3DXMATRIX* pTransform,
|
||||
D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(SetPattern)(THIS_ DWORD dwPattern) PURE;
|
||||
STDMETHOD_(DWORD, GetPattern)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetPatternScale)(THIS_ FLOAT fPatternScale) PURE;
|
||||
STDMETHOD_(FLOAT, GetPatternScale)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetWidth)(THIS_ FLOAT fWidth) PURE;
|
||||
STDMETHOD_(FLOAT, GetWidth)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetAntialias)(THIS_ BOOL bAntialias) PURE;
|
||||
STDMETHOD_(BOOL, GetAntialias)(THIS) PURE;
|
||||
|
||||
STDMETHOD(SetGLLines)(THIS_ BOOL bGLLines) PURE;
|
||||
STDMETHOD_(BOOL, GetGLLines)(THIS) PURE;
|
||||
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateLine(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPD3DXLINE* ppLine);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX9CORE_H__
|
||||
|
873
subVersion/d3d9/d3dx9effect.h
Normal file
873
subVersion/d3d9/d3dx9effect.h
Normal file
@@ -0,0 +1,873 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: d3dx9effect.h
|
||||
// Content: D3DX effect types and Shaders
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#ifndef __D3DX9EFFECT_H__
|
||||
#define __D3DX9EFFECT_H__
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXFX_DONOTSAVESTATE
|
||||
// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag
|
||||
// is specified, device state is not saved or restored in Begin/End.
|
||||
// D3DXFX_DONOTSAVESHADERSTATE
|
||||
// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag
|
||||
// is specified, shader device state is not saved or restored in Begin/End.
|
||||
// This includes pixel/vertex shaders and shader constants
|
||||
// D3DXFX_DONOTSAVESAMPLERSTATE
|
||||
// This flag is used as a parameter to ID3DXEffect::Begin(). When this flag
|
||||
// is specified, sampler device state is not saved or restored in Begin/End.
|
||||
// D3DXFX_NOT_CLONEABLE
|
||||
// This flag is used as a parameter to the D3DXCreateEffect family of APIs.
|
||||
// When this flag is specified, the effect will be non-cloneable and will not
|
||||
// contain any shader binary data.
|
||||
// Furthermore, GetPassDesc will not return shader function pointers.
|
||||
// Setting this flag reduces effect memory usage by about 50%.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define D3DXFX_DONOTSAVESTATE (1 << 0)
|
||||
#define D3DXFX_DONOTSAVESHADERSTATE (1 << 1)
|
||||
#define D3DXFX_DONOTSAVESAMPLERSTATE (1 << 2)
|
||||
|
||||
#define D3DXFX_NOT_CLONEABLE (1 << 11)
|
||||
#define D3DXFX_LARGEADDRESSAWARE (1 << 17)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DX_PARAMETER_SHARED
|
||||
// Indicates that the value of a parameter will be shared with all effects
|
||||
// which share the same namespace. Changing the value in one effect will
|
||||
// change it in all.
|
||||
//
|
||||
// D3DX_PARAMETER_LITERAL
|
||||
// Indicates that the value of this parameter can be treated as literal.
|
||||
// Literal parameters can be marked when the effect is compiled, and their
|
||||
// cannot be changed after the effect is compiled. Shared parameters cannot
|
||||
// be literal.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define D3DX_PARAMETER_SHARED (1 << 0)
|
||||
#define D3DX_PARAMETER_LITERAL (1 << 1)
|
||||
#define D3DX_PARAMETER_ANNOTATION (1 << 2)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXEFFECT_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXEFFECT_DESC
|
||||
{
|
||||
LPCSTR Creator; // Creator string
|
||||
UINT Parameters; // Number of parameters
|
||||
UINT Techniques; // Number of techniques
|
||||
UINT Functions; // Number of function entrypoints
|
||||
|
||||
} D3DXEFFECT_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXPARAMETER_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXPARAMETER_DESC
|
||||
{
|
||||
LPCSTR Name; // Parameter name
|
||||
LPCSTR Semantic; // Parameter semantic
|
||||
D3DXPARAMETER_CLASS Class; // Class
|
||||
D3DXPARAMETER_TYPE Type; // Component type
|
||||
UINT Rows; // Number of rows
|
||||
UINT Columns; // Number of columns
|
||||
UINT Elements; // Number of array elements
|
||||
UINT Annotations; // Number of annotations
|
||||
UINT StructMembers; // Number of structure member sub-parameters
|
||||
DWORD Flags; // D3DX_PARAMETER_* flags
|
||||
UINT Bytes; // Parameter size, in bytes
|
||||
|
||||
} D3DXPARAMETER_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXTECHNIQUE_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXTECHNIQUE_DESC
|
||||
{
|
||||
LPCSTR Name; // Technique name
|
||||
UINT Passes; // Number of passes
|
||||
UINT Annotations; // Number of annotations
|
||||
|
||||
} D3DXTECHNIQUE_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXPASS_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXPASS_DESC
|
||||
{
|
||||
LPCSTR Name; // Pass name
|
||||
UINT Annotations; // Number of annotations
|
||||
|
||||
CONST DWORD *pVertexShaderFunction; // Vertex shader function
|
||||
CONST DWORD *pPixelShaderFunction; // Pixel shader function
|
||||
|
||||
} D3DXPASS_DESC;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXFUNCTION_DESC:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXFUNCTION_DESC
|
||||
{
|
||||
LPCSTR Name; // Function name
|
||||
UINT Annotations; // Number of annotations
|
||||
|
||||
} D3DXFUNCTION_DESC;
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXEffectPool ///////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXEffectPool ID3DXEffectPool;
|
||||
typedef interface ID3DXEffectPool *LPD3DXEFFECTPOOL;
|
||||
|
||||
// {9537AB04-3250-412e-8213-FCD2F8677933}
|
||||
DEFINE_GUID(IID_ID3DXEffectPool,
|
||||
0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffectPool
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// No public methods
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXBaseEffect ///////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXBaseEffect ID3DXBaseEffect;
|
||||
typedef interface ID3DXBaseEffect *LPD3DXBASEEFFECT;
|
||||
|
||||
// {017C18AC-103F-4417-8C51-6BF6EF1E56BE}
|
||||
DEFINE_GUID(IID_ID3DXBaseEffect,
|
||||
0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXBaseEffect
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// Descs
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE;
|
||||
|
||||
// Handle operations
|
||||
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE;
|
||||
|
||||
// Get/Set Parameters
|
||||
STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE;
|
||||
STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE;
|
||||
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE;
|
||||
STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE;
|
||||
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE;
|
||||
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE;
|
||||
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE;
|
||||
STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE;
|
||||
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE;
|
||||
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE;
|
||||
|
||||
//Set Range of an Array to pass to device
|
||||
//Useful for sending only a subrange of an array down to the device
|
||||
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ID3DXEffectStateManager:
|
||||
// ------------------------
|
||||
// This is a user implemented interface that can be used to manage device
|
||||
// state changes made by an Effect.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef interface ID3DXEffectStateManager ID3DXEffectStateManager;
|
||||
typedef interface ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER;
|
||||
|
||||
// {79AAB587-6DBC-4fa7-82DE-37FA1781C5CE}
|
||||
DEFINE_GUID(IID_ID3DXEffectStateManager,
|
||||
0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffectStateManager
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown)
|
||||
{
|
||||
// The user must correctly implement QueryInterface, AddRef, and Release.
|
||||
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// The following methods are called by the Effect when it wants to make
|
||||
// the corresponding device call. Note that:
|
||||
// 1. Users manage the state and are therefore responsible for making the
|
||||
// the corresponding device calls themselves inside their callbacks.
|
||||
// 2. Effects pay attention to the return values of the callbacks, and so
|
||||
// users must pay attention to what they return in their callbacks.
|
||||
|
||||
STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX *pMatrix) PURE;
|
||||
STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9 *pMaterial) PURE;
|
||||
STDMETHOD(SetLight)(THIS_ DWORD Index, CONST D3DLIGHT9 *pLight) PURE;
|
||||
STDMETHOD(LightEnable)(THIS_ DWORD Index, BOOL Enable) PURE;
|
||||
STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD Value) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) PURE;
|
||||
STDMETHOD(SetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) PURE;
|
||||
STDMETHOD(SetNPatchMode)(THIS_ FLOAT NumSegments) PURE;
|
||||
STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
|
||||
STDMETHOD(SetVertexShader)(THIS_ LPDIRECT3DVERTEXSHADER9 pShader) PURE;
|
||||
STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT RegisterIndex, CONST FLOAT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT RegisterIndex, CONST INT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT RegisterIndex, CONST BOOL *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetPixelShader)(THIS_ LPDIRECT3DPIXELSHADER9 pShader) PURE;
|
||||
STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT RegisterIndex, CONST FLOAT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT RegisterIndex, CONST INT *pConstantData, UINT RegisterCount) PURE;
|
||||
STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT RegisterIndex, CONST BOOL *pConstantData, UINT RegisterCount) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXEffect ///////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXEffect ID3DXEffect;
|
||||
typedef interface ID3DXEffect *LPD3DXEFFECT;
|
||||
|
||||
// {F6CEB4B3-4E4C-40dd-B883-8D8DE5EA0CD5}
|
||||
DEFINE_GUID(IID_ID3DXEffect,
|
||||
0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffect
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
|
||||
{
|
||||
// ID3DXBaseEffect
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// Descs
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE;
|
||||
|
||||
// Handle operations
|
||||
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE;
|
||||
|
||||
// Get/Set Parameters
|
||||
STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE;
|
||||
STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE;
|
||||
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE;
|
||||
STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE;
|
||||
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE;
|
||||
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE;
|
||||
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE;
|
||||
STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE;
|
||||
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE;
|
||||
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE;
|
||||
|
||||
//Set Range of an Array to pass to device
|
||||
//Usefull for sending only a subrange of an array down to the device
|
||||
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE;
|
||||
// ID3DXBaseEffect
|
||||
|
||||
|
||||
// Pool
|
||||
STDMETHOD(GetPool)(THIS_ LPD3DXEFFECTPOOL* ppPool) PURE;
|
||||
|
||||
// Selecting and setting a technique
|
||||
STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE hTechnique) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE;
|
||||
STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE hTechnique) PURE;
|
||||
STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE hTechnique, D3DXHANDLE *pTechnique) PURE;
|
||||
STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE hParameter, D3DXHANDLE hTechnique) PURE;
|
||||
|
||||
// Using current technique
|
||||
// Begin starts active technique
|
||||
// BeginPass begins a pass
|
||||
// CommitChanges updates changes to any set calls in the pass. This should be called before
|
||||
// any DrawPrimitive call to d3d
|
||||
// EndPass ends a pass
|
||||
// End ends active technique
|
||||
STDMETHOD(Begin)(THIS_ UINT *pPasses, DWORD Flags) PURE;
|
||||
STDMETHOD(BeginPass)(THIS_ UINT Pass) PURE;
|
||||
STDMETHOD(CommitChanges)(THIS) PURE;
|
||||
STDMETHOD(EndPass)(THIS) PURE;
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
|
||||
// Managing D3D Device
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* ppDevice) PURE;
|
||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||
|
||||
// Logging device calls
|
||||
STDMETHOD(SetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER pManager) PURE;
|
||||
STDMETHOD(GetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER *ppManager) PURE;
|
||||
|
||||
// Parameter blocks
|
||||
STDMETHOD(BeginParameterBlock)(THIS) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
|
||||
STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE hParameterBlock) PURE;
|
||||
STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE hParameterBlock) PURE;
|
||||
|
||||
// Cloning
|
||||
STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE9 pDevice, LPD3DXEFFECT* ppEffect) PURE;
|
||||
|
||||
// Fast path for setting variables directly in ID3DXEffect
|
||||
STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT ByteOffset, UINT Bytes) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXEffectCompiler ///////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXEffectCompiler ID3DXEffectCompiler;
|
||||
typedef interface ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
|
||||
|
||||
// {51B8A949-1A31-47e6-BEA0-4B30DB53F1E0}
|
||||
DEFINE_GUID(IID_ID3DXEffectCompiler,
|
||||
0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0);
|
||||
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXEffectCompiler
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
|
||||
{
|
||||
// ID3DXBaseEffect
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// Descs
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE hParameter, D3DXPARAMETER_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE hTechnique, D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE hPass, D3DXPASS_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE hShader, D3DXFUNCTION_DESC* pDesc) PURE;
|
||||
|
||||
// Handle operations
|
||||
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE hParameter, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE hParameter, LPCSTR pSemantic) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE hParameter, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE hTechnique, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE hTechnique, LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR pName) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE hObject, UINT Index) PURE;
|
||||
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE hObject, LPCSTR pName) PURE;
|
||||
|
||||
// Get/Set Parameters
|
||||
STDMETHOD(SetValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(GetValue)(THIS_ D3DXHANDLE hParameter, LPVOID pData, UINT Bytes) PURE;
|
||||
STDMETHOD(SetBool)(THIS_ D3DXHANDLE hParameter, BOOL b) PURE;
|
||||
STDMETHOD(GetBool)(THIS_ D3DXHANDLE hParameter, BOOL* pb) PURE;
|
||||
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE hParameter, CONST BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE hParameter, BOOL* pb, UINT Count) PURE;
|
||||
STDMETHOD(SetInt)(THIS_ D3DXHANDLE hParameter, INT n) PURE;
|
||||
STDMETHOD(GetInt)(THIS_ D3DXHANDLE hParameter, INT* pn) PURE;
|
||||
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE hParameter, CONST INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE hParameter, INT* pn, UINT Count) PURE;
|
||||
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT f) PURE;
|
||||
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE hParameter, FLOAT* pf) PURE;
|
||||
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE hParameter, CONST FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE hParameter, FLOAT* pf, UINT Count) PURE;
|
||||
STDMETHOD(SetVector)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(GetVector)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE hParameter, D3DXVECTOR4* pVector, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX* pMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, CONST D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE hParameter, D3DXMATRIX** ppMatrix, UINT Count) PURE;
|
||||
STDMETHOD(SetString)(THIS_ D3DXHANDLE hParameter, LPCSTR pString) PURE;
|
||||
STDMETHOD(GetString)(THIS_ D3DXHANDLE hParameter, LPCSTR* ppString) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture) PURE;
|
||||
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 *ppTexture) PURE;
|
||||
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DPIXELSHADER9 *ppPShader) PURE;
|
||||
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE hParameter, LPDIRECT3DVERTEXSHADER9 *ppVShader) PURE;
|
||||
|
||||
//Set Range of an Array to pass to device
|
||||
//Usefull for sending only a subrange of an array down to the device
|
||||
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE hParameter, UINT uStart, UINT uEnd) PURE;
|
||||
// ID3DXBaseEffect
|
||||
|
||||
// Parameter sharing, specialization, and information
|
||||
STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE hParameter, BOOL Literal) PURE;
|
||||
STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE hParameter, BOOL *pLiteral) PURE;
|
||||
|
||||
// Compilation
|
||||
STDMETHOD(CompileEffect)(THIS_ DWORD Flags,
|
||||
LPD3DXBUFFER* ppEffect, LPD3DXBUFFER* ppErrorMsgs) PURE;
|
||||
|
||||
STDMETHOD(CompileShader)(THIS_ D3DXHANDLE hFunction, LPCSTR pTarget, DWORD Flags,
|
||||
LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs, LPD3DXCONSTANTTABLE* ppConstantTable) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCreateEffectPool:
|
||||
// ---------------------
|
||||
// Creates an effect pool. Pools are used for sharing parameters between
|
||||
// multiple effects. For all effects within a pool, shared parameters of the
|
||||
// same name all share the same value.
|
||||
//
|
||||
// Parameters:
|
||||
// ppPool
|
||||
// Returns the created pool.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectPool(
|
||||
LPD3DXEFFECTPOOL* ppPool);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCreateEffect:
|
||||
// -----------------
|
||||
// Creates an effect from an ascii or binary effect description.
|
||||
//
|
||||
// Parameters:
|
||||
// pDevice
|
||||
// Pointer of the device on which to create the effect
|
||||
// pSrcFile
|
||||
// Name of the file containing the effect description
|
||||
// hSrcModule
|
||||
// Module handle. if NULL, current module will be used.
|
||||
// pSrcResource
|
||||
// Resource name in module
|
||||
// pSrcData
|
||||
// Pointer to effect description
|
||||
// SrcDataSize
|
||||
// Size of the effect description in bytes
|
||||
// pDefines
|
||||
// Optional NULL-terminated array of preprocessor macro definitions.
|
||||
// Flags
|
||||
// See D3DXSHADER_xxx flags.
|
||||
// pSkipConstants
|
||||
// A list of semi-colon delimited variable names. The effect will
|
||||
// not set these variables to the device when they are referenced
|
||||
// by a shader. NOTE: the variables specified here must be
|
||||
// register bound in the file and must not be used in expressions
|
||||
// in passes or samplers or the file will not load.
|
||||
// pInclude
|
||||
// Optional interface pointer to use for handling #include directives.
|
||||
// If this parameter is NULL, #includes will be honored when compiling
|
||||
// from file, and will error when compiling from resource or memory.
|
||||
// pPool
|
||||
// Pointer to ID3DXEffectPool object to use for shared parameters.
|
||||
// If NULL, no parameters will be shared.
|
||||
// ppEffect
|
||||
// Returns a buffer containing created effect.
|
||||
// ppCompilationErrors
|
||||
// Returns a buffer containing any error messages which occurred during
|
||||
// compile. Or NULL if you do not care about the error messages.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCWSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromFile D3DXCreateEffectFromFileW
|
||||
#else
|
||||
#define D3DXCreateEffectFromFile D3DXCreateEffectFromFileA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCWSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceW
|
||||
#else
|
||||
#define D3DXCreateEffectFromResource D3DXCreateEffectFromResourceA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffect(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCVOID pSrcData,
|
||||
UINT SrcDataLen,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
//
|
||||
// Ex functions that accept pSkipConstants in addition to other parameters
|
||||
//
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileExA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromFileExW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCWSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromFileEx D3DXCreateEffectFromFileExW
|
||||
#else
|
||||
#define D3DXCreateEffectFromFileEx D3DXCreateEffectFromFileExA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceExA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectFromResourceExW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HMODULE hSrcModule,
|
||||
LPCWSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectFromResourceEx D3DXCreateEffectFromResourceExW
|
||||
#else
|
||||
#define D3DXCreateEffectFromResourceEx D3DXCreateEffectFromResourceExA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectEx(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPCVOID pSrcData,
|
||||
UINT SrcDataLen,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pSkipConstants,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTPOOL pPool,
|
||||
LPD3DXEFFECT* ppEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCreateEffectCompiler:
|
||||
// -------------------------
|
||||
// Creates an effect from an ascii or binary effect description.
|
||||
//
|
||||
// Parameters:
|
||||
// pSrcFile
|
||||
// Name of the file containing the effect description
|
||||
// hSrcModule
|
||||
// Module handle. if NULL, current module will be used.
|
||||
// pSrcResource
|
||||
// Resource name in module
|
||||
// pSrcData
|
||||
// Pointer to effect description
|
||||
// SrcDataSize
|
||||
// Size of the effect description in bytes
|
||||
// pDefines
|
||||
// Optional NULL-terminated array of preprocessor macro definitions.
|
||||
// pInclude
|
||||
// Optional interface pointer to use for handling #include directives.
|
||||
// If this parameter is NULL, #includes will be honored when compiling
|
||||
// from file, and will error when compiling from resource or memory.
|
||||
// pPool
|
||||
// Pointer to ID3DXEffectPool object to use for shared parameters.
|
||||
// If NULL, no parameters will be shared.
|
||||
// ppCompiler
|
||||
// Returns a buffer containing created effect compiler.
|
||||
// ppParseErrors
|
||||
// Returns a buffer containing any error messages which occurred during
|
||||
// parse. Or NULL if you do not care about the error messages.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromFileA(
|
||||
LPCSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromFileW(
|
||||
LPCWSTR pSrcFile,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectCompilerFromFile D3DXCreateEffectCompilerFromFileW
|
||||
#else
|
||||
#define D3DXCreateEffectCompilerFromFile D3DXCreateEffectCompilerFromFileA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromResourceA(
|
||||
HMODULE hSrcModule,
|
||||
LPCSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompilerFromResourceW(
|
||||
HMODULE hSrcModule,
|
||||
LPCWSTR pSrcResource,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateEffectCompilerFromResource D3DXCreateEffectCompilerFromResourceW
|
||||
#else
|
||||
#define D3DXCreateEffectCompilerFromResource D3DXCreateEffectCompilerFromResourceA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffectCompiler(
|
||||
LPCSTR pSrcData,
|
||||
UINT SrcDataLen,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
DWORD Flags,
|
||||
LPD3DXEFFECTCOMPILER* ppCompiler,
|
||||
LPD3DXBUFFER* ppParseErrors);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXDisassembleEffect:
|
||||
// -----------------------
|
||||
//
|
||||
// Parameters:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXDisassembleEffect(
|
||||
LPD3DXEFFECT pEffect,
|
||||
BOOL EnableColorCode,
|
||||
LPD3DXBUFFER *ppDisassembly);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX9EFFECT_H__
|
||||
|
||||
|
1796
subVersion/d3d9/d3dx9math.h
Normal file
1796
subVersion/d3d9/d3dx9math.h
Normal file
File diff suppressed because it is too large
Load Diff
2251
subVersion/d3d9/d3dx9math.inl
Normal file
2251
subVersion/d3d9/d3dx9math.inl
Normal file
File diff suppressed because it is too large
Load Diff
3007
subVersion/d3d9/d3dx9mesh.h
Normal file
3007
subVersion/d3d9/d3dx9mesh.h
Normal file
File diff suppressed because it is too large
Load Diff
1010
subVersion/d3d9/d3dx9shader.h
Normal file
1010
subVersion/d3d9/d3dx9shader.h
Normal file
File diff suppressed because it is too large
Load Diff
221
subVersion/d3d9/d3dx9shape.h
Normal file
221
subVersion/d3d9/d3dx9shape.h
Normal file
@@ -0,0 +1,221 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9shapes.h
|
||||
// Content: D3DX simple shapes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#ifndef __D3DX9SHAPES_H__
|
||||
#define __D3DX9SHAPES_H__
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Functions:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreatePolygon:
|
||||
// ------------------
|
||||
// Creates a mesh containing an n-sided polygon. The polygon is centered
|
||||
// at the origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Length Length of each side.
|
||||
// Sides Number of sides the polygon has. (Must be >= 3)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreatePolygon(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Length,
|
||||
UINT Sides,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateBox:
|
||||
// --------------
|
||||
// Creates a mesh containing an axis-aligned box. The box is centered at
|
||||
// the origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Width Width of box (along X-axis)
|
||||
// Height Height of box (along Y-axis)
|
||||
// Depth Depth of box (along Z-axis)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateBox(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Width,
|
||||
FLOAT Height,
|
||||
FLOAT Depth,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateCylinder:
|
||||
// -------------------
|
||||
// Creates a mesh containing a cylinder. The generated cylinder is
|
||||
// centered at the origin, and its axis is aligned with the Z-axis.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Radius1 Radius at -Z end (should be >= 0.0f)
|
||||
// Radius2 Radius at +Z end (should be >= 0.0f)
|
||||
// Length Length of cylinder (along Z-axis)
|
||||
// Slices Number of slices about the main axis
|
||||
// Stacks Number of stacks along the main axis
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateCylinder(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Radius1,
|
||||
FLOAT Radius2,
|
||||
FLOAT Length,
|
||||
UINT Slices,
|
||||
UINT Stacks,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateSphere:
|
||||
// -----------------
|
||||
// Creates a mesh containing a sphere. The sphere is centered at the
|
||||
// origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Radius Radius of the sphere (should be >= 0.0f)
|
||||
// Slices Number of slices about the main axis
|
||||
// Stacks Number of stacks along the main axis
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSphere(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT Radius,
|
||||
UINT Slices,
|
||||
UINT Stacks,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTorus:
|
||||
// ----------------
|
||||
// Creates a mesh containing a torus. The generated torus is centered at
|
||||
// the origin, and its axis is aligned with the Z-axis.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// InnerRadius Inner radius of the torus (should be >= 0.0f)
|
||||
// OuterRadius Outer radius of the torue (should be >= 0.0f)
|
||||
// Sides Number of sides in a cross-section (must be >= 3)
|
||||
// Rings Number of rings making up the torus (must be >= 3)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTorus(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
FLOAT InnerRadius,
|
||||
FLOAT OuterRadius,
|
||||
UINT Sides,
|
||||
UINT Rings,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTeapot:
|
||||
// -----------------
|
||||
// Creates a mesh containing a teapot.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTeapot(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateText:
|
||||
// ---------------
|
||||
// Creates a mesh containing the specified text using the font associated
|
||||
// with the device context.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// hDC Device context, with desired font selected
|
||||
// pText Text to generate
|
||||
// Deviation Maximum chordal deviation from true font outlines
|
||||
// Extrusion Amount to extrude text in -Z direction
|
||||
// ppMesh The mesh object which will be created
|
||||
// pGlyphMetrics Address of buffer to receive glyph metric data (or NULL)
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTextA(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HDC hDC,
|
||||
LPCSTR pText,
|
||||
FLOAT Deviation,
|
||||
FLOAT Extrusion,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency,
|
||||
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTextW(
|
||||
LPDIRECT3DDEVICE9 pDevice,
|
||||
HDC hDC,
|
||||
LPCWSTR pText,
|
||||
FLOAT Deviation,
|
||||
FLOAT Extrusion,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency,
|
||||
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateText D3DXCreateTextW
|
||||
#else
|
||||
#define D3DXCreateText D3DXCreateTextA
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX9SHAPES_H__
|
||||
|
1735
subVersion/d3d9/d3dx9tex.h
Normal file
1735
subVersion/d3d9/d3dx9tex.h
Normal file
File diff suppressed because it is too large
Load Diff
299
subVersion/d3d9/d3dx9xof.h
Normal file
299
subVersion/d3d9/d3dx9xof.h
Normal file
@@ -0,0 +1,299 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx9xof.h
|
||||
// Content: D3DX .X File types and functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx9.h"
|
||||
|
||||
#if !defined( __D3DX9XOF_H__ )
|
||||
#define __D3DX9XOF_H__
|
||||
|
||||
#if defined( __cplusplus )
|
||||
extern "C" {
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILEFORMAT
|
||||
// This flag is used to specify what file type to use when saving to disk.
|
||||
// _BINARY, and _TEXT are mutually exclusive, while
|
||||
// _COMPRESSED is an optional setting that works with all file types.
|
||||
//----------------------------------------------------------------------------
|
||||
typedef DWORD D3DXF_FILEFORMAT;
|
||||
|
||||
#define D3DXF_FILEFORMAT_BINARY 0
|
||||
#define D3DXF_FILEFORMAT_TEXT 1
|
||||
#define D3DXF_FILEFORMAT_COMPRESSED 2
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILESAVEOPTIONS
|
||||
// This flag is used to specify where to save the file to. Each flag is
|
||||
// mutually exclusive, indicates the data location of the file, and also
|
||||
// chooses which additional data will specify the location.
|
||||
// _TOFILE is paired with a filename (LPCSTR)
|
||||
// _TOWFILE is paired with a filename (LPWSTR)
|
||||
//----------------------------------------------------------------------------
|
||||
typedef DWORD D3DXF_FILESAVEOPTIONS;
|
||||
|
||||
#define D3DXF_FILESAVE_TOFILE 0x00L
|
||||
#define D3DXF_FILESAVE_TOWFILE 0x01L
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILELOADOPTIONS
|
||||
// This flag is used to specify where to load the file from. Each flag is
|
||||
// mutually exclusive, indicates the data location of the file, and also
|
||||
// chooses which additional data will specify the location.
|
||||
// _FROMFILE is paired with a filename (LPCSTR)
|
||||
// _FROMWFILE is paired with a filename (LPWSTR)
|
||||
// _FROMRESOURCE is paired with a (D3DXF_FILELOADRESOUCE*) description.
|
||||
// _FROMMEMORY is paired with a (D3DXF_FILELOADMEMORY*) description.
|
||||
//----------------------------------------------------------------------------
|
||||
typedef DWORD D3DXF_FILELOADOPTIONS;
|
||||
|
||||
#define D3DXF_FILELOAD_FROMFILE 0x00L
|
||||
#define D3DXF_FILELOAD_FROMWFILE 0x01L
|
||||
#define D3DXF_FILELOAD_FROMRESOURCE 0x02L
|
||||
#define D3DXF_FILELOAD_FROMMEMORY 0x03L
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILELOADRESOURCE:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXF_FILELOADRESOURCE
|
||||
{
|
||||
HMODULE hModule; // Desc
|
||||
LPCSTR lpName; // Desc
|
||||
LPCSTR lpType; // Desc
|
||||
} D3DXF_FILELOADRESOURCE;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXF_FILELOADMEMORY:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3DXF_FILELOADMEMORY
|
||||
{
|
||||
LPCVOID lpMemory; // Desc
|
||||
SIZE_T dSize; // Desc
|
||||
} D3DXF_FILELOADMEMORY;
|
||||
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM )
|
||||
|
||||
// {cef08cf9-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFile,
|
||||
0xcef08cf9, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfa-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileSaveObject,
|
||||
0xcef08cfa, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfb-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileSaveData,
|
||||
0xcef08cfb, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfc-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileEnumObject,
|
||||
0xcef08cfc, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
// {cef08cfd-7b4f-4429-9624-2a690a933201}
|
||||
DEFINE_GUID( IID_ID3DXFileData,
|
||||
0xcef08cfd, 0x7b4f, 0x4429, 0x96, 0x24, 0x2a, 0x69, 0x0a, 0x93, 0x32, 0x01 );
|
||||
|
||||
#endif // defined( _WIN32 ) && !defined( _NO_COM )
|
||||
|
||||
#if defined( __cplusplus )
|
||||
#if !defined( DECLSPEC_UUID )
|
||||
#if _MSC_VER >= 1100
|
||||
#define DECLSPEC_UUID( x ) __declspec( uuid( x ) )
|
||||
#else // !( _MSC_VER >= 1100 )
|
||||
#define DECLSPEC_UUID( x )
|
||||
#endif // !( _MSC_VER >= 1100 )
|
||||
#endif // !defined( DECLSPEC_UUID )
|
||||
|
||||
interface DECLSPEC_UUID( "cef08cf9-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFile;
|
||||
interface DECLSPEC_UUID( "cef08cfa-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileSaveObject;
|
||||
interface DECLSPEC_UUID( "cef08cfb-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileSaveData;
|
||||
interface DECLSPEC_UUID( "cef08cfc-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileEnumObject;
|
||||
interface DECLSPEC_UUID( "cef08cfd-7b4f-4429-9624-2a690a933201" )
|
||||
ID3DXFileData;
|
||||
|
||||
#if defined( _COM_SMARTPTR_TYPEDEF )
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFile,
|
||||
__uuidof( ID3DXFile ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileSaveObject,
|
||||
__uuidof( ID3DXFileSaveObject ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileSaveData,
|
||||
__uuidof( ID3DXFileSaveData ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileEnumObject,
|
||||
__uuidof( ID3DXFileEnumObject ) );
|
||||
_COM_SMARTPTR_TYPEDEF( ID3DXFileData,
|
||||
__uuidof( ID3DXFileData ) );
|
||||
#endif // defined( _COM_SMARTPTR_TYPEDEF )
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
typedef interface ID3DXFile ID3DXFile;
|
||||
typedef interface ID3DXFileSaveObject ID3DXFileSaveObject;
|
||||
typedef interface ID3DXFileSaveData ID3DXFileSaveData;
|
||||
typedef interface ID3DXFileEnumObject ID3DXFileEnumObject;
|
||||
typedef interface ID3DXFileData ID3DXFileData;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFile /////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFile
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFile, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( CreateEnumObject )( THIS_ LPCVOID, D3DXF_FILELOADOPTIONS,
|
||||
ID3DXFileEnumObject** ) PURE;
|
||||
STDMETHOD( CreateSaveObject )( THIS_ LPCVOID, D3DXF_FILESAVEOPTIONS,
|
||||
D3DXF_FILEFORMAT, ID3DXFileSaveObject** ) PURE;
|
||||
STDMETHOD( RegisterTemplates )( THIS_ LPCVOID, SIZE_T ) PURE;
|
||||
STDMETHOD( RegisterEnumTemplates )( THIS_ ID3DXFileEnumObject* ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileSaveObject ///////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileSaveObject
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileSaveObject, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE;
|
||||
STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*,
|
||||
SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE;
|
||||
STDMETHOD( Save )( THIS ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileSaveData /////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileSaveData
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileSaveData, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetSave )( THIS_ ID3DXFileSaveObject** ) PURE;
|
||||
STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE;
|
||||
STDMETHOD( GetId )( THIS_ LPGUID ) PURE;
|
||||
STDMETHOD( GetType )( THIS_ GUID* ) PURE;
|
||||
STDMETHOD( AddDataObject )( THIS_ REFGUID, LPCSTR, CONST GUID*,
|
||||
SIZE_T, LPCVOID, ID3DXFileSaveData** ) PURE;
|
||||
STDMETHOD( AddDataReference )( THIS_ LPCSTR, CONST GUID* ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileEnumObject ///////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileEnumObject
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileEnumObject, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetFile )( THIS_ ID3DXFile** ) PURE;
|
||||
STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE;
|
||||
STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE;
|
||||
STDMETHOD( GetDataObjectById )( THIS_ REFGUID, ID3DXFileData** ) PURE;
|
||||
STDMETHOD( GetDataObjectByName )( THIS_ LPCSTR, ID3DXFileData** ) PURE;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFileData /////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3DXFileData
|
||||
|
||||
DECLARE_INTERFACE_( ID3DXFileData, IUnknown )
|
||||
{
|
||||
STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
|
||||
STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
|
||||
STDMETHOD_( ULONG, Release )( THIS ) PURE;
|
||||
|
||||
STDMETHOD( GetEnum )( THIS_ ID3DXFileEnumObject** ) PURE;
|
||||
STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE;
|
||||
STDMETHOD( GetId )( THIS_ LPGUID ) PURE;
|
||||
STDMETHOD( Lock )( THIS_ SIZE_T*, LPCVOID* ) PURE;
|
||||
STDMETHOD( Unlock )( THIS ) PURE;
|
||||
STDMETHOD( GetType )( THIS_ GUID* ) PURE;
|
||||
STDMETHOD_( BOOL, IsReference )( THIS ) PURE;
|
||||
STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE;
|
||||
STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE;
|
||||
};
|
||||
|
||||
STDAPI D3DXFileCreate( ID3DXFile** lplpDirectXFile );
|
||||
|
||||
/*
|
||||
* DirectX File errors.
|
||||
*/
|
||||
|
||||
#define _FACD3DXF 0x876
|
||||
|
||||
#define D3DXFERR_BADOBJECT MAKE_HRESULT( 1, _FACD3DXF, 900 )
|
||||
#define D3DXFERR_BADVALUE MAKE_HRESULT( 1, _FACD3DXF, 901 )
|
||||
#define D3DXFERR_BADTYPE MAKE_HRESULT( 1, _FACD3DXF, 902 )
|
||||
#define D3DXFERR_NOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 903 )
|
||||
#define D3DXFERR_NOTDONEYET MAKE_HRESULT( 1, _FACD3DXF, 904 )
|
||||
#define D3DXFERR_FILENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 905 )
|
||||
#define D3DXFERR_RESOURCENOTFOUND MAKE_HRESULT( 1, _FACD3DXF, 906 )
|
||||
#define D3DXFERR_BADRESOURCE MAKE_HRESULT( 1, _FACD3DXF, 907 )
|
||||
#define D3DXFERR_BADFILETYPE MAKE_HRESULT( 1, _FACD3DXF, 908 )
|
||||
#define D3DXFERR_BADFILEVERSION MAKE_HRESULT( 1, _FACD3DXF, 909 )
|
||||
#define D3DXFERR_BADFILEFLOATSIZE MAKE_HRESULT( 1, _FACD3DXF, 910 )
|
||||
#define D3DXFERR_BADFILE MAKE_HRESULT( 1, _FACD3DXF, 911 )
|
||||
#define D3DXFERR_PARSEERROR MAKE_HRESULT( 1, _FACD3DXF, 912 )
|
||||
#define D3DXFERR_BADARRAYSIZE MAKE_HRESULT( 1, _FACD3DXF, 913 )
|
||||
#define D3DXFERR_BADDATAREFERENCE MAKE_HRESULT( 1, _FACD3DXF, 914 )
|
||||
#define D3DXFERR_NOMOREOBJECTS MAKE_HRESULT( 1, _FACD3DXF, 915 )
|
||||
#define D3DXFERR_NOMOREDATA MAKE_HRESULT( 1, _FACD3DXF, 916 )
|
||||
#define D3DXFERR_BADCACHEFILE MAKE_HRESULT( 1, _FACD3DXF, 917 )
|
||||
|
||||
/*
|
||||
* DirectX File object types.
|
||||
*/
|
||||
|
||||
#ifndef WIN_TYPES
|
||||
#define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype
|
||||
#endif
|
||||
|
||||
WIN_TYPES(ID3DXFile, D3DXFILE);
|
||||
WIN_TYPES(ID3DXFileEnumObject, D3DXFILEENUMOBJECT);
|
||||
WIN_TYPES(ID3DXFileSaveObject, D3DXFILESAVEOBJECT);
|
||||
WIN_TYPES(ID3DXFileData, D3DXFILEDATA);
|
||||
WIN_TYPES(ID3DXFileSaveData, D3DXFILESAVEDATA);
|
||||
|
||||
#if defined( __cplusplus )
|
||||
} // extern "C"
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
#endif // !defined( __D3DX9XOF_H__ )
|
||||
|
||||
|
Reference in New Issue
Block a user