po: Update Lithuanian translation.
[wine.git] / include / d3dx10mesh.h
blobd813ef68df266e779d10e852832f0cefdf4f118c
1 /*
2 * Copyright 2021 Nikolay Sivov for CodeWeavers
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.
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.
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
19 #include "d3dx10.h"
21 DEFINE_GUID(IID_ID3DX10Mesh, 0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95);
22 DEFINE_GUID(IID_ID3DX10MeshBuffer, 0x4b0d117, 0x1041, 0x46b1, 0xaa, 0x8a, 0x39, 0x52, 0x84, 0x8b, 0xa2, 0x2e);
24 typedef enum _D3DX10_MESH_DISCARD_FLAGS
26 D3DX10_MESH_DISCARD_ATTRIBUTE_BUFFER = 0x01,
27 D3DX10_MESH_DISCARD_ATTRIBUTE_TABLE = 0x02,
28 D3DX10_MESH_DISCARD_POINTREPS = 0x04,
29 D3DX10_MESH_DISCARD_ADJACENCY = 0x08,
30 D3DX10_MESH_DISCARD_DEVICE_BUFFERS = 0x10,
31 } D3DX10_MESH_DISCARD_FLAGS;
33 typedef struct _D3DX10_ATTRIBUTE_RANGE
35 UINT AttribId;
36 UINT FaceStart;
37 UINT FaceCount;
38 UINT VertexStart;
39 UINT VertexCount;
40 } D3DX10_ATTRIBUTE_RANGE;
41 typedef D3DX10_ATTRIBUTE_RANGE* LPD3DX10_ATTRIBUTE_RANGE;
43 #define INTERFACE ID3DX10MeshBuffer
44 DECLARE_INTERFACE_(ID3DX10MeshBuffer, IUnknown)
46 /*** IUnknown methods ***/
47 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
48 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
49 STDMETHOD_(ULONG, Release)(THIS) PURE;
50 /*** ID3DX10MeshBuffer methods ***/
51 STDMETHOD(Map)(THIS_ void **data, SIZE_T *size) PURE;
52 STDMETHOD(Unmap)(THIS) PURE;
53 STDMETHOD_(SIZE_T, GetSize)(THIS) PURE;
55 #undef INTERFACE
57 #define INTERFACE ID3DX10Mesh
58 DECLARE_INTERFACE_(ID3DX10Mesh, IUnknown)
60 /*** IUnknown methods ***/
61 STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **out) PURE;
62 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
63 STDMETHOD_(ULONG, Release)(THIS) PURE;
64 /*** ID3DX10Mesh methods ***/
65 STDMETHOD_(UINT, GetFaceCount)(THIS) PURE;
66 STDMETHOD_(UINT, GetVertexCount)(THIS) PURE;
67 STDMETHOD_(UINT, GetVertexBufferCount)(THIS) PURE;
68 STDMETHOD_(UINT, GetFlags)(THIS) PURE;
69 STDMETHOD(GetVertexDescription)(THIS_ const D3D10_INPUT_ELEMENT_DESC **desc, UINT *count) PURE;
70 STDMETHOD(SetVertexData)(THIS_ UINT index, const void *data) PURE;
71 STDMETHOD(GetVertexBuffer)(THIS_ UINT index, ID3DX10MeshBuffer **buffer) PURE;
72 STDMETHOD(SetIndexData)(THIS_ const void *data, UINT count) PURE;
73 STDMETHOD(GetIndexBuffer)(THIS_ ID3DX10MeshBuffer **buffer) PURE;
74 STDMETHOD(SetAttributeData)(THIS_ const UINT *data) PURE;
75 STDMETHOD(GetAttributeBuffer)(THIS_ ID3DX10MeshBuffer **buffer) PURE;
76 STDMETHOD(SetAttributeTable)(THIS_ const D3DX10_ATTRIBUTE_RANGE *table, UINT size) PURE;
77 STDMETHOD(GetAttributeTable)(THIS_ D3DX10_ATTRIBUTE_RANGE *table, UINT *size) PURE;
78 STDMETHOD(GenerateAdjacencyAndPointReps)(THIS_ float epsilon) PURE;
79 STDMETHOD(GenerateGSAdjacency)(THIS) PURE;
80 STDMETHOD(SetAdjacencyData)(THIS_ const UINT *adjacency) PURE;
81 STDMETHOD(GetAdjacenctBuffer)(THIS_ ID3DX10MeshBuffer **buffer) PURE;
82 STDMETHOD(SetPointRepData)(THIS_ const UINT *pointreps) PURE;
83 STDMETHOD(GetPointRepBuffer)(THIS_ ID3DX10MeshBuffer **buffer) PURE;
84 STDMETHOD(Discard)(THIS_ D3DX10_MESH_DISCARD_FLAGS flags) PURE;
85 STDMETHOD(CloneMesh)(THIS_ UINT flags, const char *pos_semantic, const D3D10_INPUT_ELEMENT_DESC *desc,
86 UINT decl_count, ID3DX10Mesh **cloned_mesh);
87 STDMETHOD(Optimize)(THIS_ UINT flags, UINT *face_remap, ID3D10Blob **vertex_remap) PURE;
88 STDMETHOD(GenerateAttributeBufferFromTable)(THIS) PURE;
89 STDMETHOD(Intersect)(THIS_ D3DXVECTOR3 *ray_pos, D3DXVECTOR3 *ray_dir, UINT *hit_count, UINT *face_index,
90 float *u, float *v, float *dist, ID3D10Blob **all_hits) PURE;
91 STDMETHOD(IntersectSubset)(THIS_ UINT attr_id, D3DXVECTOR3 *ray_pos, D3DXVECTOR3 *ray_dir, UINT *hit_count,
92 float *u, float *v, float *dist, ID3D10Blob **all_hits) PURE;
93 STDMETHOD(CommitToDevice)(THIS) PURE;
94 STDMETHOD(DrawSubset)(THIS_ UINT attr_id) PURE;
95 STDMETHOD(DrawSubsetInstanced)(THIS_ UINT attr_id, UINT instance_count, UINT start_instance) PURE;
96 STDMETHOD(GetDeviceVertexBuffer)(THIS_ UINT index, ID3D10Buffer **buffer) PURE;
97 STDMETHOD(GetDeviceIndexBuffer)(THIS_ ID3D10Buffer **buffer) PURE;
99 #undef INTERFACE