Simplify D3D9 headers

This commit is contained in:
twinaphex 2017-04-19 12:46:07 +02:00
parent 1f29de24de
commit 9ca27adb59

View File

@ -12,17 +12,6 @@
#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
@ -34,45 +23,9 @@ extern "C" {
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);
@ -80,19 +33,6 @@ UINT WINAPI
}
#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;
@ -115,43 +55,6 @@ DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
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)
@ -162,32 +65,6 @@ DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
#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;
@ -239,32 +116,6 @@ HRESULT WINAPI
}
#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;
@ -437,26 +288,6 @@ HRESULT WINAPI
}
#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;
@ -517,36 +348,6 @@ HRESULT WINAPI
}
#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;
@ -621,68 +422,6 @@ HRESULT WINAPI
}
#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;