(D3D) Header cleanups

This commit is contained in:
twinaphex 2017-04-19 19:11:58 +02:00
parent d220ce5870
commit 4df1ba690d
2 changed files with 4 additions and 256 deletions

View File

@ -13,26 +13,6 @@
#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)
@ -40,19 +20,6 @@
#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)
@ -432,7 +399,6 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE hParameter, LPCVOID pData, UINT ByteOffset, UINT Bytes) PURE;
};
//////////////////////////////////////////////////////////////////////////////
// ID3DXEffectCompiler ///////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
@ -536,71 +502,14 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
// 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.
//----------------------------------------------------------------------------
#endif
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,
@ -673,10 +582,6 @@ HRESULT WINAPI
LPD3DXEFFECT* ppEffect,
LPD3DXBUFFER* ppCompilationErrors);
//
// Ex functions that accept pSkipConstants in addition to other parameters
//
HRESULT WINAPI
D3DXCreateEffectFromFileExA(
LPDIRECT3DDEVICE9 pDevice,
@ -754,39 +659,6 @@ HRESULT WINAPI
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,
@ -849,20 +721,11 @@ HRESULT WINAPI
LPD3DXEFFECTCOMPILER* ppCompiler,
LPD3DXBUFFER* ppParseErrors);
//----------------------------------------------------------------------------
// D3DXDisassembleEffect:
// -----------------------
//
// Parameters:
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXDisassembleEffect(
LPD3DXEFFECT pEffect,
BOOL EnableColorCode,
LPD3DXBUFFER *ppDisassembly);
#ifdef __cplusplus
}

View File

@ -12,29 +12,10 @@
#ifndef __D3DX9SHAPES_H__
#define __D3DX9SHAPES_H__
///////////////////////////////////////////////////////////////////////////
// Functions:
///////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif
//-------------------------------------------------------------------------
// 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,
@ -43,22 +24,6 @@ HRESULT WINAPI
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,
@ -68,24 +33,6 @@ HRESULT WINAPI
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,
@ -97,22 +44,6 @@ HRESULT WINAPI
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,
@ -122,23 +53,6 @@ HRESULT WINAPI
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,
@ -149,41 +63,12 @@ HRESULT WINAPI
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,
@ -215,6 +100,6 @@ HRESULT WINAPI
#ifdef __cplusplus
}
#endif //__cplusplus
#endif
#endif //__D3DX9SHAPES_H__
#endif