Commit 36ac98df authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3dx9: Avoid LPD3DXBUFFER.

parent d856b3a6
...@@ -132,7 +132,7 @@ static HRESULT d3dx9_buffer_init(struct ID3DXBufferImpl *buffer, DWORD size) ...@@ -132,7 +132,7 @@ static HRESULT d3dx9_buffer_init(struct ID3DXBufferImpl *buffer, DWORD size)
return D3D_OK; return D3D_OK;
} }
HRESULT WINAPI D3DXCreateBuffer(DWORD size, LPD3DXBUFFER *buffer) HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer)
{ {
struct ID3DXBufferImpl *object; struct ID3DXBufferImpl *object;
HRESULT hr; HRESULT hr;
......
...@@ -4395,7 +4395,7 @@ static HRESULT WINAPI ID3DXEffectCompilerImpl_GetLiteral(ID3DXEffectCompiler *if ...@@ -4395,7 +4395,7 @@ static HRESULT WINAPI ID3DXEffectCompilerImpl_GetLiteral(ID3DXEffectCompiler *if
} }
static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileEffect(ID3DXEffectCompiler *iface, DWORD flags, static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileEffect(ID3DXEffectCompiler *iface, DWORD flags,
LPD3DXBUFFER *effect, LPD3DXBUFFER *error_msgs) ID3DXBuffer **effect, ID3DXBuffer **error_msgs)
{ {
struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface); struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface);
......
...@@ -1628,8 +1628,8 @@ static HRESULT remap_faces_for_attrsort(ID3DXMeshImpl *This, const DWORD *indice ...@@ -1628,8 +1628,8 @@ static HRESULT remap_faces_for_attrsort(ID3DXMeshImpl *This, const DWORD *indice
return D3D_OK; return D3D_OK;
} }
static HRESULT WINAPI ID3DXMeshImpl_OptimizeInplace(ID3DXMesh *iface, DWORD flags, CONST DWORD *adjacency_in, DWORD *adjacency_out, static HRESULT WINAPI ID3DXMeshImpl_OptimizeInplace(ID3DXMesh *iface, DWORD flags, const DWORD *adjacency_in,
DWORD *face_remap_out, LPD3DXBUFFER *vertex_remap_out) DWORD *adjacency_out, DWORD *face_remap_out, ID3DXBuffer **vertex_remap_out)
{ {
ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface);
void *indices = NULL; void *indices = NULL;
......
...@@ -123,7 +123,7 @@ static void assembleshader_test(void) { ...@@ -123,7 +123,7 @@ static void assembleshader_test(void) {
"#error \"wrong include\"\n" "#error \"wrong include\"\n"
}; };
HRESULT hr; HRESULT hr;
LPD3DXBUFFER shader, messages; ID3DXBuffer *shader, *messages;
D3DXMACRO defines[] = { D3DXMACRO defines[] = {
{ {
"DEF1", "10 + 15" "DEF1", "10 + 15"
...@@ -347,7 +347,7 @@ static void d3dxpreprocess_test(void) { ...@@ -347,7 +347,7 @@ static void d3dxpreprocess_test(void) {
"#error \"wrong include\"\n" "#error \"wrong include\"\n"
}; };
HRESULT hr; HRESULT hr;
LPD3DXBUFFER shader, messages; ID3DXBuffer *shader, *messages;
HRESULT shader_vsh_res; HRESULT shader_vsh_res;
struct D3DXIncludeImpl include = {{&D3DXInclude_Vtbl}}; struct D3DXIncludeImpl include = {{&D3DXInclude_Vtbl}};
......
...@@ -268,8 +268,8 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet) ...@@ -268,8 +268,8 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
UINT num_rotation_keys, UINT num_translation_keys, CONST D3DXKEY_VECTOR3 *scale_keys, UINT num_rotation_keys, UINT num_translation_keys, CONST D3DXKEY_VECTOR3 *scale_keys,
CONST D3DXKEY_QUATERNION *rotation_keys, CONST D3DXKEY_VECTOR3 *translation_keys, CONST D3DXKEY_QUATERNION *rotation_keys, CONST D3DXKEY_VECTOR3 *translation_keys,
DWORD *animation_index) PURE; DWORD *animation_index) PURE;
STDMETHOD(Compress)(THIS_ DWORD flags, FLOAT lossiness, LPD3DXFRAME hierarchy, STDMETHOD(Compress)(THIS_ DWORD flags, float lossiness, D3DXFRAME *hierarchy,
LPD3DXBUFFER *compressed_data) PURE; ID3DXBuffer **compressed_data) PURE;
STDMETHOD(UnregisterAnimation)(THIS_ UINT index) PURE; STDMETHOD(UnregisterAnimation)(THIS_ UINT index) PURE;
}; };
#undef INTERFACE #undef INTERFACE
...@@ -295,7 +295,7 @@ DECLARE_INTERFACE_(ID3DXCompressedAnimationSet, ID3DXAnimationSet) ...@@ -295,7 +295,7 @@ DECLARE_INTERFACE_(ID3DXCompressedAnimationSet, ID3DXAnimationSet)
/*** ID3DXCompressedAnimationSet methods ***/ /*** ID3DXCompressedAnimationSet methods ***/
STDMETHOD_(D3DXPLAYBACK_TYPE, GetPlaybackType)(THIS) PURE; STDMETHOD_(D3DXPLAYBACK_TYPE, GetPlaybackType)(THIS) PURE;
STDMETHOD_(DOUBLE, GetSourceTicksPerSecond)(THIS) PURE; STDMETHOD_(DOUBLE, GetSourceTicksPerSecond)(THIS) PURE;
STDMETHOD(GetCompressedData)(THIS_ LPD3DXBUFFER *compressed_data) PURE; STDMETHOD(GetCompressedData)(THIS_ ID3DXBuffer **compressed_data) PURE;
STDMETHOD_(UINT, GetNumCallbackKeys)(THIS) PURE; STDMETHOD_(UINT, GetNumCallbackKeys)(THIS) PURE;
STDMETHOD(GetCallbackKeys)(THIS_ LPD3DXKEY_CALLBACK callback_keys) PURE; STDMETHOD(GetCallbackKeys)(THIS_ LPD3DXKEY_CALLBACK callback_keys) PURE;
}; };
...@@ -388,7 +388,9 @@ HRESULT WINAPI D3DXFrameRegisterNamedMatrices(LPD3DXFRAME, LPD3DXANIMATIONCONTRO ...@@ -388,7 +388,9 @@ HRESULT WINAPI D3DXFrameRegisterNamedMatrices(LPD3DXFRAME, LPD3DXANIMATIONCONTRO
UINT WINAPI D3DXFrameNumNamedMatrices(CONST D3DXFRAME *frame_root); UINT WINAPI D3DXFrameNumNamedMatrices(CONST D3DXFRAME *frame_root);
HRESULT WINAPI D3DXFrameCalculateBoundingSphere(CONST D3DXFRAME*, LPD3DXVECTOR3, FLOAT*); HRESULT WINAPI D3DXFrameCalculateBoundingSphere(CONST D3DXFRAME*, LPD3DXVECTOR3, FLOAT*);
HRESULT WINAPI D3DXCreateKeyframedAnimationSet(LPCSTR, DOUBLE, D3DXPLAYBACK_TYPE, UINT, UINT, CONST D3DXKEY_CALLBACK*, LPD3DXKEYFRAMEDANIMATIONSET*); HRESULT WINAPI D3DXCreateKeyframedAnimationSet(LPCSTR, DOUBLE, D3DXPLAYBACK_TYPE, UINT, UINT, CONST D3DXKEY_CALLBACK*, LPD3DXKEYFRAMEDANIMATIONSET*);
HRESULT WINAPI D3DXCreateCompressedAnimationSet(LPCSTR, DOUBLE, D3DXPLAYBACK_TYPE, LPD3DXBUFFER, UINT, CONST D3DXKEY_CALLBACK*, LPD3DXCOMPRESSEDANIMATIONSET*); HRESULT WINAPI D3DXCreateCompressedAnimationSet(const char *name, double ticks_per_second,
D3DXPLAYBACK_TYPE playback_type, ID3DXBuffer *compressed_data, UINT callback_key_count,
const D3DXKEY_CALLBACK *callback_keys, ID3DXCompressedAnimationSet **animation_set);
HRESULT WINAPI D3DXCreateAnimationController(UINT, UINT, UINT, UINT, LPD3DXANIMATIONCONTROLLER*); HRESULT WINAPI D3DXCreateAnimationController(UINT, UINT, UINT, UINT, LPD3DXANIMATIONCONTROLLER*);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -353,7 +353,7 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect) ...@@ -353,7 +353,7 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
/*** ID3DXEffectCompiler methods ***/ /*** ID3DXEffectCompiler methods ***/
STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE; STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE;
STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE; STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE;
STDMETHOD(CompileEffect)(THIS_ DWORD flags, LPD3DXBUFFER* effect, LPD3DXBUFFER* error_msgs) PURE; STDMETHOD(CompileEffect)(THIS_ DWORD flags, ID3DXBuffer **effect, ID3DXBuffer **error_msgs) PURE;
STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, const char *target, DWORD flags, STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, const char *target, DWORD flags,
ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) PURE; ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) PURE;
}; };
......
...@@ -373,8 +373,8 @@ DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh) ...@@ -373,8 +373,8 @@ DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
STDMETHOD(UnlockAttributeBuffer)(THIS) PURE; STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
STDMETHOD(Optimize)(THIS_ DWORD flags, const DWORD *adjacency_in, DWORD *adjacency_out, STDMETHOD(Optimize)(THIS_ DWORD flags, const DWORD *adjacency_in, DWORD *adjacency_out,
DWORD *face_remap, ID3DXBuffer **vertex_remap, ID3DXMesh **opt_mesh) PURE; DWORD *face_remap, ID3DXBuffer **vertex_remap, ID3DXMesh **opt_mesh) PURE;
STDMETHOD(OptimizeInplace)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out, STDMETHOD(OptimizeInplace)(THIS_ DWORD flags, const DWORD *adjacency_in, DWORD *adjacency_out,
DWORD* face_remap, LPD3DXBUFFER* vertex_remap) PURE; DWORD *face_remap, ID3DXBuffer **vertex_remap) PURE;
STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE* attrib_table, DWORD attrib_table_size) PURE; STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE* attrib_table, DWORD attrib_table_size) PURE;
}; };
#undef INTERFACE #undef INTERFACE
...@@ -696,7 +696,7 @@ HRESULT WINAPI D3DXCreateMesh(DWORD face_count, DWORD vertex_count, DWORD flags, ...@@ -696,7 +696,7 @@ HRESULT WINAPI D3DXCreateMesh(DWORD face_count, DWORD vertex_count, DWORD flags,
const D3DVERTEXELEMENT9 *declaration, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh); const D3DVERTEXELEMENT9 *declaration, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh);
HRESULT WINAPI D3DXCreateMeshFVF(DWORD face_count, DWORD vertex_count, DWORD flags, HRESULT WINAPI D3DXCreateMeshFVF(DWORD face_count, DWORD vertex_count, DWORD flags,
DWORD fvf, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh); DWORD fvf, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh);
HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*); HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer);
HRESULT WINAPI D3DXCreateSPMesh(ID3DXMesh *mesh, const DWORD *adjacency, HRESULT WINAPI D3DXCreateSPMesh(ID3DXMesh *mesh, const DWORD *adjacency,
const D3DXATTRIBUTEWEIGHTS *attribute_weights, const float *vertex_weights, ID3DXSPMesh **spmesh); const D3DXATTRIBUTEWEIGHTS *attribute_weights, const float *vertex_weights, ID3DXSPMesh **spmesh);
HRESULT WINAPI D3DXCreatePMeshFromStream(struct IStream *stream, DWORD flags, struct IDirect3DDevice9 *device, HRESULT WINAPI D3DXCreatePMeshFromStream(struct IStream *stream, DWORD flags, struct IDirect3DDevice9 *device,
...@@ -812,7 +812,10 @@ HRESULT WINAPI D3DXOptimizeVertices(LPCVOID, UINT, UINT, BOOL, DWORD *); ...@@ -812,7 +812,10 @@ HRESULT WINAPI D3DXOptimizeVertices(LPCVOID, UINT, UINT, BOOL, DWORD *);
HRESULT WINAPI D3DXRectPatchSize(CONST FLOAT *, DWORD *, DWORD *); HRESULT WINAPI D3DXRectPatchSize(CONST FLOAT *, DWORD *, DWORD *);
HRESULT WINAPI D3DXSHPRTCompSuperCluster(UINT *cluster_ids, ID3DXMesh *scene, UINT max_cluster_count, HRESULT WINAPI D3DXSHPRTCompSuperCluster(UINT *cluster_ids, ID3DXMesh *scene, UINT max_cluster_count,
UINT cluster_count, UINT *scluster_ids, UINT *scluster_count); UINT cluster_count, UINT *scluster_ids, UINT *scluster_count);
HRESULT WINAPI D3DXSHPRTCompSplitMeshSC(UINT *, UINT, UINT, UINT *, UINT, LPVOID, BOOL, UINT, LPD3DXBUFFER *, UINT *, BOOL, LPD3DXBUFFER *, LPD3DXBUFFER *, UINT *, UINT *, D3DXSHPRTSPLITMESHCLUSTERDATA *); HRESULT WINAPI D3DXSHPRTCompSplitMeshSC(UINT *cluster_idx, UINT vertex_count, UINT cluster_count, UINT *scluster_ids,
UINT scluster_count, void *index_buffer_in, BOOL ib_in_32bit, UINT face_count, ID3DXBuffer **index_buffer_out,
UINT *index_buffer_size, BOOL ib_out_32bit, ID3DXBuffer **face_remap, ID3DXBuffer **vertex_data,
UINT *vertex_data_length, UINT *sc_cluster_list, D3DXSHPRTSPLITMESHCLUSTERDATA *sc_data);
HRESULT WINAPI D3DXSimplifyMesh(ID3DXMesh *mesh_in, const DWORD *adjacency, HRESULT WINAPI D3DXSimplifyMesh(ID3DXMesh *mesh_in, const DWORD *adjacency,
const D3DXATTRIBUTEWEIGHTS *attribute_weights, const float *vertex_weights, DWORD min_value, const D3DXATTRIBUTEWEIGHTS *attribute_weights, const float *vertex_weights, DWORD min_value,
DWORD flags, ID3DXMesh **mesh_out); DWORD flags, ID3DXMesh **mesh_out);
...@@ -830,7 +833,9 @@ HRESULT WINAPI D3DXUVAtlasCreate(ID3DXMesh *mesh_in, UINT max_chart_count, float ...@@ -830,7 +833,9 @@ HRESULT WINAPI D3DXUVAtlasCreate(ID3DXMesh *mesh_in, UINT max_chart_count, float
UINT width, UINT height, float gutter, DWORD texture_idx, const DWORD *adjacency, const DWORD *false_edges, UINT width, UINT height, float gutter, DWORD texture_idx, const DWORD *adjacency, const DWORD *false_edges,
const float *imt_array, LPD3DXUVATLASCB cb, float cb_freq, void *ctx, DWORD flags, ID3DXMesh **mesh_out, const float *imt_array, LPD3DXUVATLASCB cb, float cb_freq, void *ctx, DWORD flags, ID3DXMesh **mesh_out,
ID3DXBuffer **face_partitioning_out, ID3DXBuffer **vertex_remap_out, float *max_stretch_out, UINT *chart_count); ID3DXBuffer **face_partitioning_out, ID3DXBuffer **vertex_remap_out, float *max_stretch_out, UINT *chart_count);
HRESULT WINAPI D3DXUVAtlasPack(ID3DXMesh *, UINT, UINT, FLOAT, DWORD, CONST DWORD *, LPD3DXUVATLASCB, FLOAT, LPVOID, DWORD, LPD3DXBUFFER); HRESULT WINAPI D3DXUVAtlasPack(ID3DXMesh *mesh, UINT width, UINT height, float gutter, DWORD texture_idx,
const DWORD *partition_result_adjacency, LPD3DXUVATLASCB cb, float cb_freq, void *ctx, DWORD flags,
ID3DXBuffer *face_partitioning);
HRESULT WINAPI D3DXUVAtlasPartition(ID3DXMesh *mesh_in, UINT max_chart_count, float max_stretch_in, HRESULT WINAPI D3DXUVAtlasPartition(ID3DXMesh *mesh_in, UINT max_chart_count, float max_stretch_in,
DWORD texture_idx, const DWORD *adjacency, const DWORD *false_edges, const float *imt_array, DWORD texture_idx, const DWORD *adjacency, const DWORD *false_edges, const float *imt_array,
LPD3DXUVATLASCB cb, float cb_freq, void *ctx, DWORD flags, ID3DXMesh **mesh_out, LPD3DXUVATLASCB cb, float cb_freq, void *ctx, DWORD flags, ID3DXMesh **mesh_out,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment