VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9mesh.h@ 33281

Last change on this file since 33281 was 28475, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.43

  • Property svn:eol-style set to native
File size: 7.1 KB
Line 
1/*
2 * Copyright (C) 2009 David Adam
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#include <d3dx9.h>
29
30#ifndef __WINE_D3DX9MESH_H
31#define __WINE_D3DX9MESH_H
32
33DEFINE_GUID(IID_ID3DXBaseMesh, 0x7ed943dd, 0x52e8, 0x40b5, 0xa8, 0xd8, 0x76, 0x68, 0x5c, 0x40, 0x63, 0x30);
34DEFINE_GUID(IID_ID3DXMesh, 0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95);
35
36enum _MAX_FVF_DECL_SIZE
37{
38 MAX_FVF_DECL_SIZE = MAXD3DDECLLENGTH + 1
39};
40
41typedef struct ID3DXBaseMesh* LPD3DXBASEMESH;
42typedef struct ID3DXMesh* LPD3DXMESH;
43
44typedef struct _D3DXATTRIBUTERANGE {
45 DWORD AttribId;
46 DWORD FaceStart;
47 DWORD FaceCount;
48 DWORD VertexStart;
49 DWORD VertexCount;
50} D3DXATTRIBUTERANGE;
51
52typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE;
53
54#undef INTERFACE
55#define INTERFACE ID3DXBaseMesh
56
57DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown)
58{
59 /*** IUnknown methods ***/
60 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
61 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
62 STDMETHOD_(ULONG, Release)(THIS) PURE;
63 /*** ID3DXBaseMesh ***/
64 STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
65 STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
66 STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
67 STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
68 STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
69 STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
70 STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
71 STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
72 STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
73 STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
74 LPD3DXMESH* clone_mesh) PURE;
75 STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
76 STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
77 STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
78 STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
79 STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
80 STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
81 STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
82 STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
83 STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
84 STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
85 STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
86};
87
88
89#undef INTERFACE
90#define INTERFACE ID3DXMesh
91
92DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
93{
94 /*** IUnknown methods ***/
95 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
96 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
97 STDMETHOD_(ULONG, Release)(THIS) PURE;
98 /*** ID3DXBaseMesh ***/
99 STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
100 STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
101 STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
102 STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
103 STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
104 STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
105 STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
106 STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
107 STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
108 STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
109 LPD3DXMESH* clone_mesh) PURE;
110 STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
111 STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
112 STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
113 STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
114 STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
115 STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
116 STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
117 STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
118 STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
119 STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
120 STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
121 /*** ID3DXMesh ***/
122 STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** data) PURE;
123 STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
124 STDMETHOD(Optimize)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
125 DWORD* face_remap, LPD3DXBUFFER* vertex_remap, LPD3DXMESH* opt_mesh) PURE;
126 STDMETHOD(OptimizeInplace)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
127 DWORD* face_remap, LPD3DXBUFFER* vertex_remap) PURE;
128 STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE* attrib_table, DWORD attrib_table_size) PURE;
129};
130
131#ifdef __cplusplus
132extern "C" {
133#endif
134
135HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*);
136UINT WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_idx);
137UINT WINAPI D3DXGetFVFVertexSize(DWORD);
138BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *);
139BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *);
140HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, D3DXVECTOR3 *);
141HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, FLOAT *);
142BOOL WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3*, FLOAT *, FLOAT *, FLOAT *);
143
144#ifdef __cplusplus
145}
146#endif
147
148#endif /* __WINE_D3DX9MESH_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette