2 * Implementation of IDirect3DRMMeshBuilder2 Interface
4 * Copyright 2010 Christian Costa
5 * Copyright 2011 André Hentschel
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/debug.h"
31 #include "d3drm_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(d3drm
);
41 IDirect3DRMMeshBuilder2 IDirect3DRMMeshBuilder2_iface
;
42 IDirect3DRMMeshBuilder3 IDirect3DRMMeshBuilder3_iface
;
53 } IDirect3DRMMeshBuilderImpl
;
61 static char templates
[] = {
65 "<3D82AB43-62DA-11CF-AB39-0020AF71E433>"
72 "<3D82AB5E-62DA-11CF-AB39-0020AF71E433>"
79 "<F6F23F44-7686-11CF-8F52-0040333594A3>"
85 "<F6F23F45-7686-11CF-8F52-0040333594A3>"
86 "array FLOAT matrix[16];"
90 "<35FF44E0-6C7C-11CF-8F52-0040333594A3>"
98 "<D3E16E81-7835-11CF-8F52-0040333594A3>"
103 "template IndexedColor"
105 "<1630B820-7842-11CF-8F52-0040333594A3>"
107 "ColorRGBA indexColor;"
111 "<537DA6A0-CA37-11D0-941C-0080C80CFA7B>"
116 "<4885AE63-78E8-11CF-8F52-0040333594A3>"
120 "template MaterialWrap"
122 "<4885AE60-78E8-11CF-8F52-0040333594A3>"
126 "template TextureFilename"
128 "<A42790E1-7810-11CF-8F52-0040333594A3>"
133 "<3D82AB4D-62DA-11CF-AB39-0020AF71E433>"
134 "ColorRGBA faceColor;"
136 "ColorRGB specularColor;"
137 "ColorRGB emissiveColor;"
142 "<3D82AB5F-62DA-11CF-AB39-0020AF71E433>"
143 "DWORD nFaceVertexIndices;"
144 "array DWORD faceVertexIndices[nFaceVertexIndices];"
146 "template MeshFaceWraps"
148 "<ED1EC5C0-C0A8-11D0-941C-0080C80CFA7B>"
149 "DWORD nFaceWrapValues;"
150 "array Boolean2d faceWrapValues[nFaceWrapValues];"
152 "template MeshTextureCoords"
154 "<F6F23F40-7686-11CF-8F52-0040333594A3>"
155 "DWORD nTextureCoords;"
156 "array Coords2d textureCoords[nTextureCoords];"
158 "template MeshMaterialList"
160 "<F6F23F42-7686-11CF-8F52-0040333594A3>"
162 "DWORD nFaceIndexes;"
163 "array DWORD faceIndexes[nFaceIndexes];"
166 "template MeshNormals"
168 "<F6F23F43-7686-11CF-8F52-0040333594A3>"
170 "array Vector normals[nNormals];"
171 "DWORD nFaceNormals;"
172 "array MeshFace faceNormals[nFaceNormals];"
174 "template MeshVertexColors"
176 "<1630B821-7842-11CF-8F52-0040333594A3>"
177 "DWORD nVertexColors;"
178 "array IndexedColor vertexColors[nVertexColors];"
182 "<3D82AB44-62DA-11CF-AB39-0020AF71E433>"
184 "array Vector vertices[nVertices];"
186 "array MeshFace faces[nFaces];"
189 "template FrameTransformMatrix"
191 "<F6F23F41-7686-11CF-8F52-0040333594A3>"
192 "Matrix4x4 frameMatrix;"
196 "<3D82AB46-62DA-11CF-AB39-0020AF71E433>"
201 "<10DD46A9-775B-11CF-8F52-0040333594A3>"
203 "array FLOAT values[nValues];"
205 "template TimedFloatKeys"
207 "<F406B180-7B3B-11CF-8F52-0040333594A3>"
211 "template AnimationKey"
213 "<10DD46A8-775B-11CF-8F52-0040333594A3>"
216 "array TimedFloatKeys keys[nKeys];"
218 "template AnimationOptions"
220 "<E2BF56C0-840F-11CF-8F52-0040333594A3>"
222 "DWORD positionquality;"
226 "<3D82AB4F-62DA-11CF-AB39-0020AF71E433>"
229 "template AnimationSet"
231 "<3D82AB50-62DA-11CF-AB39-0020AF71E433>"
234 "template InlineData"
236 "<3A23EEA0-94B1-11D0-AB39-0020AF71E433>"
241 "<3A23EEA1-94B1-11D0-AB39-0020AF71E433>"
243 "array STRING urls[nUrls];"
245 "template ProgressiveMesh"
247 "<8A63C360-997D-11D0-941C-0080C80CFA7B>"
252 "<A42790E0-7810-11CF-8F52-0040333594A3>"
256 "array UCHAR data4[8];"
258 "template StringProperty"
260 "<7F0F21E0-BFE1-11D1-82C0-00A0C9697271>"
264 "template PropertyBag"
266 "<7F0F21E1-BFE1-11D1-82C0-00A0C9697271>"
269 "template ExternalVisual"
271 "<98116AA0-BDBA-11D1-82C0-00A0C9697271>"
272 "Guid guidExternalVisual;"
275 "template RightHanded"
277 "<7F5D5EA0-D53A-11D1-82C0-00A0C9697271>"
278 "DWORD bRightHanded;"
282 static inline IDirect3DRMMeshBuilderImpl
*impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2
*iface
)
284 return CONTAINING_RECORD(iface
, IDirect3DRMMeshBuilderImpl
, IDirect3DRMMeshBuilder2_iface
);
287 static inline IDirect3DRMMeshBuilderImpl
*impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3
*iface
)
289 return CONTAINING_RECORD(iface
, IDirect3DRMMeshBuilderImpl
, IDirect3DRMMeshBuilder3_iface
);
292 /*** IUnknown methods ***/
293 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_QueryInterface(IDirect3DRMMeshBuilder2
* iface
,
294 REFIID riid
, void** ppvObject
)
296 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
298 TRACE("(%p)->(%s,%p)\n", This
, debugstr_guid(riid
), ppvObject
);
302 if(IsEqualGUID(riid
, &IID_IUnknown
) ||
303 IsEqualGUID(riid
, &IID_IDirect3DRMMeshBuilder
) ||
304 IsEqualGUID(riid
, &IID_IDirect3DRMMeshBuilder2
))
306 *ppvObject
= &This
->IDirect3DRMMeshBuilder2_iface
;
308 else if(IsEqualGUID(riid
, &IID_IDirect3DRMMeshBuilder3
))
310 *ppvObject
= &This
->IDirect3DRMMeshBuilder3_iface
;
314 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
315 return E_NOINTERFACE
;
318 IDirect3DRMMeshBuilder_AddRef(iface
);
322 static ULONG WINAPI
IDirect3DRMMeshBuilder2Impl_AddRef(IDirect3DRMMeshBuilder2
* iface
)
324 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
326 TRACE("(%p)\n", This
);
328 return InterlockedIncrement(&This
->ref
);
331 static ULONG WINAPI
IDirect3DRMMeshBuilder2Impl_Release(IDirect3DRMMeshBuilder2
* iface
)
333 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
334 ULONG ref
= InterlockedDecrement(&This
->ref
);
336 TRACE("(%p)\n", This
);
340 HeapFree(GetProcessHeap(), 0, This
->pVertices
);
341 HeapFree(GetProcessHeap(), 0, This
->pNormals
);
342 HeapFree(GetProcessHeap(), 0, This
->pFaceData
);
343 HeapFree(GetProcessHeap(), 0, This
);
349 /*** IDirect3DRMObject methods ***/
350 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_Clone(IDirect3DRMMeshBuilder2
* iface
,
351 LPUNKNOWN pUnkOuter
, REFIID riid
,
354 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
356 FIXME("(%p)->(%p,%s,%p): stub\n", This
, pUnkOuter
, debugstr_guid(riid
), ppvObj
);
361 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_AddDestroyCallback(IDirect3DRMMeshBuilder2
* iface
,
362 D3DRMOBJECTCALLBACK cb
,
365 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
367 FIXME("(%p)->(%p,%p): stub\n", This
, cb
, argument
);
372 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_DeleteDestroyCallback(IDirect3DRMMeshBuilder2
* iface
,
373 D3DRMOBJECTCALLBACK cb
,
376 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
378 FIXME("(%p)->(%p,%p): stub\n", This
, cb
, argument
);
383 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetAppData(IDirect3DRMMeshBuilder2
* iface
,
386 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
388 FIXME("(%p)->(%u): stub\n", This
, data
);
393 static DWORD WINAPI
IDirect3DRMMeshBuilder2Impl_GetAppData(IDirect3DRMMeshBuilder2
* iface
)
395 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
397 FIXME("(%p)->(): stub\n", This
);
402 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetName(IDirect3DRMMeshBuilder2
* iface
,
405 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
407 FIXME("(%p)->(%s): stub\n", This
, pName
);
412 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GetName(IDirect3DRMMeshBuilder2
* iface
,
413 LPDWORD lpdwSize
, LPSTR lpName
)
415 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
417 FIXME("(%p)->(%p,%p): stub\n", This
, lpdwSize
, lpName
);
422 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GetClassName(IDirect3DRMMeshBuilder2
* iface
,
423 LPDWORD lpdwSize
, LPSTR lpName
)
425 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
427 FIXME("(%p)->(%p,%p): stub\n", This
, lpdwSize
, lpName
);
432 /*** IDirect3DRMMeshBuilder2 methods ***/
433 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_Load(IDirect3DRMMeshBuilder2
* iface
,
434 LPVOID filename
, LPVOID name
,
435 D3DRMLOADOPTIONS loadflags
,
436 D3DRMLOADTEXTURECALLBACK cb
, LPVOID arg
)
438 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
440 TRACE("(%p)->(%p,%p,%x,%p,%p): partial stub\n", This
, filename
, name
, loadflags
, cb
, arg
);
442 return IDirect3DRMMeshBuilder3_Load(&This
->IDirect3DRMMeshBuilder3_iface
, filename
, name
,
443 loadflags
, (D3DRMLOADTEXTURE3CALLBACK
)cb
, arg
);
446 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_Save(IDirect3DRMMeshBuilder2
* iface
,
447 const char *filename
, D3DRMXOFFORMAT format
,
448 D3DRMSAVEOPTIONS save
)
450 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
452 FIXME("(%p)->(%s,%d,%d): stub\n", This
, filename
, format
, save
);
457 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_Scale(IDirect3DRMMeshBuilder2
* iface
,
458 D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
460 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
462 FIXME("(%p)->(%f,%f,%f): stub\n", This
, sx
, sy
, sz
);
467 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_Translate(IDirect3DRMMeshBuilder2
* iface
,
468 D3DVALUE tx
, D3DVALUE ty
, D3DVALUE tz
)
470 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
472 FIXME("(%p)->(%f,%f,%f): stub\n", This
, tx
, ty
, tz
);
477 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetColorSource(IDirect3DRMMeshBuilder2
* iface
,
478 D3DRMCOLORSOURCE color
)
480 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
482 FIXME("(%p)->(%x): stub\n", This
, color
);
487 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GetBox(IDirect3DRMMeshBuilder2
* iface
,
490 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
492 FIXME("(%p)->(%p): stub\n", This
, pBox
);
497 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GenerateNormals(IDirect3DRMMeshBuilder2
* iface
)
499 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
501 FIXME("(%p)->(): stub\n", This
);
506 static D3DRMCOLORSOURCE WINAPI
IDirect3DRMMeshBuilder2Impl_GetColorSource(IDirect3DRMMeshBuilder2
* iface
)
508 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
510 FIXME("(%p)->(): stub\n", This
);
515 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_AddMesh(IDirect3DRMMeshBuilder2
* iface
,
516 LPDIRECT3DRMMESH pMesh
)
518 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
520 FIXME("(%p)->(%p): stub\n", This
, pMesh
);
525 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_AddMeshBuilder(IDirect3DRMMeshBuilder2
* iface
,
526 LPDIRECT3DRMMESHBUILDER pMeshBuilder
)
528 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
530 FIXME("(%p)->(%p): stub\n", This
, pMeshBuilder
);
535 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_AddFrame(IDirect3DRMMeshBuilder2
* iface
,
536 LPDIRECT3DRMFRAME pFrame
)
538 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
540 FIXME("(%p)->(%p): stub\n", This
, pFrame
);
545 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_AddFace(IDirect3DRMMeshBuilder2
* iface
,
546 LPDIRECT3DRMFACE pFace
)
548 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
550 FIXME("(%p)->(%p): stub\n", This
, pFace
);
555 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_AddFaces(IDirect3DRMMeshBuilder2
* iface
,
556 DWORD vcount
, D3DVECTOR
*vertices
,
557 DWORD ncount
, D3DVECTOR
*normals
,
559 LPDIRECT3DRMFACEARRAY
* pFaceArray
)
561 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
563 FIXME("(%p)->(%d,%p,%d,%p,%p,%p): stub\n", This
, vcount
, vertices
, ncount
, normals
, data
, pFaceArray
);
568 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_ReserveSpace(IDirect3DRMMeshBuilder2
* iface
,
573 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
575 FIXME("(%p)->(%d,%d,%d): stub\n", This
, vertex_Count
, normal_count
, face_count
);
580 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetColorRGB(IDirect3DRMMeshBuilder2
* iface
,
581 D3DVALUE red
, D3DVALUE green
,
584 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
586 FIXME("(%p)->(%f,%f,%f): stub\n", This
, red
, green
, blue
);
591 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetColor(IDirect3DRMMeshBuilder2
* iface
,
594 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
596 FIXME("(%p)->(%x): stub\n", This
, color
);
601 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetTexture(IDirect3DRMMeshBuilder2
* iface
,
602 LPDIRECT3DRMTEXTURE pTexture
)
604 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
606 FIXME("(%p)->(%p): stub\n", This
, pTexture
);
611 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetMaterial(IDirect3DRMMeshBuilder2
* iface
,
612 LPDIRECT3DRMMATERIAL pMaterial
)
614 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
616 FIXME("(%p)->(%p): stub\n", This
, pMaterial
);
621 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetTextureTopology(IDirect3DRMMeshBuilder2
* iface
,
622 BOOL wrap_u
, BOOL wrap_v
)
624 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
626 FIXME("(%p)->(%d,%d): stub\n", This
, wrap_u
, wrap_v
);
631 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetQuality(IDirect3DRMMeshBuilder2
* iface
,
632 D3DRMRENDERQUALITY quality
)
634 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
636 FIXME("(%p)->(%d): stub\n", This
, quality
);
641 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetPerspective(IDirect3DRMMeshBuilder2
* iface
,
644 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
646 FIXME("(%p)->(%d): stub\n", This
, enable
);
651 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetVertex(IDirect3DRMMeshBuilder2
* iface
,
653 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
655 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
657 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
662 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetNormal(IDirect3DRMMeshBuilder2
* iface
,
664 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
666 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
668 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
673 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetTextureCoordinates(IDirect3DRMMeshBuilder2
* iface
,
675 D3DVALUE u
, D3DVALUE v
)
677 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
679 FIXME("(%p)->(%f,%f): stub\n", This
, u
, v
);
684 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetVertexColor(IDirect3DRMMeshBuilder2
* iface
,
685 DWORD index
, D3DCOLOR color
)
687 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
689 FIXME("(%p)->(%d,%x): stub\n", This
, index
, color
);
694 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_SetVertexColorRGB(IDirect3DRMMeshBuilder2
* iface
,
695 DWORD index
, D3DVALUE red
,
696 D3DVALUE green
, D3DVALUE blue
)
698 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
700 FIXME("(%p)->(%d,%f,%f,%f): stub\n", This
, index
, red
, green
, blue
);
705 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GetFaces(IDirect3DRMMeshBuilder2
* iface
,
706 LPDIRECT3DRMFACEARRAY
* pFaceArray
)
708 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
710 FIXME("(%p)->(%p): stub\n", This
, pFaceArray
);
715 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GetVertices(IDirect3DRMMeshBuilder2
* iface
,
716 DWORD
*vcount
, D3DVECTOR
*vertices
,
717 DWORD
*ncount
, D3DVECTOR
*normals
,
718 DWORD
*face_data_size
,
721 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
723 TRACE("(%p)->(%p,%p,%p,%p,%p,%p)\n", This
, vcount
, vertices
, ncount
, normals
, face_data_size
, face_data
);
726 *vcount
= This
->nb_vertices
;
727 if (vertices
&& This
->nb_vertices
)
728 memcpy(vertices
, This
->pVertices
, This
->nb_vertices
* sizeof(D3DVECTOR
));
730 *ncount
= This
->nb_normals
;
731 if (normals
&& This
->nb_normals
)
732 memcpy(normals
, This
->pNormals
, This
->nb_normals
* sizeof(D3DVECTOR
));
734 *face_data_size
= This
->face_data_size
;
735 if (face_data
&& This
->face_data_size
)
736 memcpy(face_data
, This
->pFaceData
, This
->face_data_size
);
741 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GetTextureCoordinates(IDirect3DRMMeshBuilder2
* iface
,
743 D3DVALUE
*u
, D3DVALUE
*v
)
745 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
747 TRACE("(%p)->(%d,%p,%p)\n", This
, index
, u
, v
);
749 return IDirect3DRMMeshBuilder3_GetTextureCoordinates(&This
->IDirect3DRMMeshBuilder3_iface
,
753 static int WINAPI
IDirect3DRMMeshBuilder2Impl_AddVertex(IDirect3DRMMeshBuilder2
* iface
,
754 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
756 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
758 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
763 static int WINAPI
IDirect3DRMMeshBuilder2Impl_AddNormal(IDirect3DRMMeshBuilder2
* iface
,
764 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
766 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
768 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
773 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_CreateFace(IDirect3DRMMeshBuilder2
* iface
,
774 LPDIRECT3DRMFACE
* ppFace
)
776 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
778 FIXME("(%p)->(%p): stub\n", This
, ppFace
);
783 static D3DRMRENDERQUALITY WINAPI
IDirect3DRMMeshBuilder2Impl_GetQuality(IDirect3DRMMeshBuilder2
* iface
)
785 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
787 FIXME("(%p)->(): stub\n", This
);
792 static BOOL WINAPI
IDirect3DRMMeshBuilder2Impl_GetPerspective(IDirect3DRMMeshBuilder2
* iface
)
794 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
796 FIXME("(%p)->(): stub\n", This
);
801 static int WINAPI
IDirect3DRMMeshBuilder2Impl_GetFaceCount(IDirect3DRMMeshBuilder2
* iface
)
803 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
805 TRACE("(%p)->()\n", This
);
807 return This
->nb_faces
;
810 static int WINAPI
IDirect3DRMMeshBuilder2Impl_GetVertexCount(IDirect3DRMMeshBuilder2
* iface
)
812 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
814 TRACE("(%p)->()\n", This
);
816 return This
->nb_vertices
;
819 static D3DCOLOR WINAPI
IDirect3DRMMeshBuilder2Impl_GetVertexColor(IDirect3DRMMeshBuilder2
* iface
,
822 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
824 FIXME("(%p)->(%d): stub\n", This
, index
);
829 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_CreateMesh(IDirect3DRMMeshBuilder2
* iface
,
830 LPDIRECT3DRMMESH
* ppMesh
)
832 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
834 FIXME("(%p)->(%p): stub\n", This
, ppMesh
);
839 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GenerateNormals2(IDirect3DRMMeshBuilder2
* iface
,
840 D3DVALUE crease
, DWORD dwFlags
)
842 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
844 FIXME("(%p)->(%f,%u): stub\n", This
, crease
, dwFlags
);
849 static HRESULT WINAPI
IDirect3DRMMeshBuilder2Impl_GetFace(IDirect3DRMMeshBuilder2
* iface
,
850 DWORD index
, LPDIRECT3DRMFACE
* ppFace
)
852 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder2(iface
);
854 FIXME("(%p)->(%u,%p): stub\n", This
, index
, ppFace
);
859 static const struct IDirect3DRMMeshBuilder2Vtbl Direct3DRMMeshBuilder2_Vtbl
=
861 /*** IUnknown methods ***/
862 IDirect3DRMMeshBuilder2Impl_QueryInterface
,
863 IDirect3DRMMeshBuilder2Impl_AddRef
,
864 IDirect3DRMMeshBuilder2Impl_Release
,
865 /*** IDirect3DRMObject methods ***/
866 IDirect3DRMMeshBuilder2Impl_Clone
,
867 IDirect3DRMMeshBuilder2Impl_AddDestroyCallback
,
868 IDirect3DRMMeshBuilder2Impl_DeleteDestroyCallback
,
869 IDirect3DRMMeshBuilder2Impl_SetAppData
,
870 IDirect3DRMMeshBuilder2Impl_GetAppData
,
871 IDirect3DRMMeshBuilder2Impl_SetName
,
872 IDirect3DRMMeshBuilder2Impl_GetName
,
873 IDirect3DRMMeshBuilder2Impl_GetClassName
,
874 /*** IDirect3DRMMeshBuilder methods ***/
875 IDirect3DRMMeshBuilder2Impl_Load
,
876 IDirect3DRMMeshBuilder2Impl_Save
,
877 IDirect3DRMMeshBuilder2Impl_Scale
,
878 IDirect3DRMMeshBuilder2Impl_Translate
,
879 IDirect3DRMMeshBuilder2Impl_SetColorSource
,
880 IDirect3DRMMeshBuilder2Impl_GetBox
,
881 IDirect3DRMMeshBuilder2Impl_GenerateNormals
,
882 IDirect3DRMMeshBuilder2Impl_GetColorSource
,
883 IDirect3DRMMeshBuilder2Impl_AddMesh
,
884 IDirect3DRMMeshBuilder2Impl_AddMeshBuilder
,
885 IDirect3DRMMeshBuilder2Impl_AddFrame
,
886 IDirect3DRMMeshBuilder2Impl_AddFace
,
887 IDirect3DRMMeshBuilder2Impl_AddFaces
,
888 IDirect3DRMMeshBuilder2Impl_ReserveSpace
,
889 IDirect3DRMMeshBuilder2Impl_SetColorRGB
,
890 IDirect3DRMMeshBuilder2Impl_SetColor
,
891 IDirect3DRMMeshBuilder2Impl_SetTexture
,
892 IDirect3DRMMeshBuilder2Impl_SetMaterial
,
893 IDirect3DRMMeshBuilder2Impl_SetTextureTopology
,
894 IDirect3DRMMeshBuilder2Impl_SetQuality
,
895 IDirect3DRMMeshBuilder2Impl_SetPerspective
,
896 IDirect3DRMMeshBuilder2Impl_SetVertex
,
897 IDirect3DRMMeshBuilder2Impl_SetNormal
,
898 IDirect3DRMMeshBuilder2Impl_SetTextureCoordinates
,
899 IDirect3DRMMeshBuilder2Impl_SetVertexColor
,
900 IDirect3DRMMeshBuilder2Impl_SetVertexColorRGB
,
901 IDirect3DRMMeshBuilder2Impl_GetFaces
,
902 IDirect3DRMMeshBuilder2Impl_GetVertices
,
903 IDirect3DRMMeshBuilder2Impl_GetTextureCoordinates
,
904 IDirect3DRMMeshBuilder2Impl_AddVertex
,
905 IDirect3DRMMeshBuilder2Impl_AddNormal
,
906 IDirect3DRMMeshBuilder2Impl_CreateFace
,
907 IDirect3DRMMeshBuilder2Impl_GetQuality
,
908 IDirect3DRMMeshBuilder2Impl_GetPerspective
,
909 IDirect3DRMMeshBuilder2Impl_GetFaceCount
,
910 IDirect3DRMMeshBuilder2Impl_GetVertexCount
,
911 IDirect3DRMMeshBuilder2Impl_GetVertexColor
,
912 IDirect3DRMMeshBuilder2Impl_CreateMesh
,
913 /*** IDirect3DRMMeshBuilder2 methods ***/
914 IDirect3DRMMeshBuilder2Impl_GenerateNormals2
,
915 IDirect3DRMMeshBuilder2Impl_GetFace
919 /*** IUnknown methods ***/
920 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_QueryInterface(IDirect3DRMMeshBuilder3
* iface
,
921 REFIID riid
, void** ppvObject
)
923 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
924 return IDirect3DRMMeshBuilder2_QueryInterface(&This
->IDirect3DRMMeshBuilder2_iface
, riid
, ppvObject
);
927 static ULONG WINAPI
IDirect3DRMMeshBuilder3Impl_AddRef(IDirect3DRMMeshBuilder3
* iface
)
929 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
930 return IDirect3DRMMeshBuilder2_AddRef(&This
->IDirect3DRMMeshBuilder2_iface
);
933 static ULONG WINAPI
IDirect3DRMMeshBuilder3Impl_Release(IDirect3DRMMeshBuilder3
* iface
)
935 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
936 return IDirect3DRMMeshBuilder2_Release(&This
->IDirect3DRMMeshBuilder2_iface
);
939 /*** IDirect3DRMObject methods ***/
940 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Clone(IDirect3DRMMeshBuilder3
* iface
,
941 LPUNKNOWN pUnkOuter
, REFIID riid
,
944 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
946 FIXME("(%p)->(%p,%s,%p): stub\n", This
, pUnkOuter
, debugstr_guid(riid
), ppvObj
);
951 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddDestroyCallback(IDirect3DRMMeshBuilder3
* iface
,
952 D3DRMOBJECTCALLBACK cb
,
955 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
957 FIXME("(%p)->(%p,%p): stub\n", This
, cb
, argument
);
962 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_DeleteDestroyCallback(IDirect3DRMMeshBuilder3
* iface
,
963 D3DRMOBJECTCALLBACK cb
,
966 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
968 FIXME("(%p)->(%p,%p): stub\n", This
, cb
, argument
);
973 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetAppData(IDirect3DRMMeshBuilder3
* iface
,
976 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
978 FIXME("(%p)->(%u): stub\n", This
, data
);
983 static DWORD WINAPI
IDirect3DRMMeshBuilder3Impl_GetAppData(IDirect3DRMMeshBuilder3
* iface
)
985 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
987 FIXME("(%p)->(): stub\n", This
);
992 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetName(IDirect3DRMMeshBuilder3
* iface
,
995 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
997 FIXME("(%p)->(%s): stub\n", This
, pName
);
1002 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetName(IDirect3DRMMeshBuilder3
* iface
,
1003 LPDWORD lpdwSize
, LPSTR lpName
)
1005 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1007 FIXME("(%p)->(%p,%p): stub\n", This
, lpdwSize
, lpName
);
1012 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetClassName(IDirect3DRMMeshBuilder3
* iface
,
1013 LPDWORD lpdwSize
, LPSTR lpName
)
1015 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1017 FIXME("(%p)->(%p,%p): stub\n", This
, lpdwSize
, lpName
);
1022 /*** IDirect3DRMMeshBuilder3 methods ***/
1023 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3
* iface
,
1024 LPVOID filename
, LPVOID name
,
1025 D3DRMLOADOPTIONS loadflags
,
1026 D3DRMLOADTEXTURE3CALLBACK cb
, LPVOID arg
)
1028 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1029 DXFILELOADOPTIONS load_options
;
1030 LPDIRECTXFILE pDXFile
= NULL
;
1031 LPDIRECTXFILEENUMOBJECT pEnumObject
= NULL
;
1032 LPDIRECTXFILEDATA pData
= NULL
;
1033 LPDIRECTXFILEOBJECT pObject
= NULL
;
1034 LPDIRECTXFILEDATA pData2
= NULL
;
1040 HRESULT ret
= D3DRMERR_BADOBJECT
;
1042 FIXME("(%p)->(%p,%p,%x,%p,%p): partial stub\n", This
, filename
, name
, loadflags
, cb
, arg
);
1044 /* First free allocated buffers of previous mesh data */
1045 HeapFree(GetProcessHeap(), 0, This
->pVertices
);
1046 This
->pVertices
= NULL
;
1047 HeapFree(GetProcessHeap(), 0, This
->pNormals
);
1048 This
->pNormals
= NULL
;
1049 HeapFree(GetProcessHeap(), 0, This
->pFaceData
);
1050 This
->pFaceData
= NULL
;
1051 HeapFree(GetProcessHeap(), 0, This
->pCoords2d
);
1052 This
->pCoords2d
= NULL
;
1054 if (loadflags
== D3DRMLOAD_FROMMEMORY
)
1056 load_options
= DXFILELOAD_FROMMEMORY
;
1060 FIXME("Load options %d not supported yet\n", loadflags
);
1064 hr
= DirectXFileCreate(&pDXFile
);
1065 if (hr
!= DXFILE_OK
)
1068 hr
= IDirectXFile_RegisterTemplates(pDXFile
, templates
, strlen(templates
));
1069 if (hr
!= DXFILE_OK
)
1072 hr
= IDirectXFile_CreateEnumObject(pDXFile
, filename
, load_options
, &pEnumObject
);
1073 if (hr
!= DXFILE_OK
)
1076 hr
= IDirectXFileEnumObject_GetNextDataObject(pEnumObject
, &pData
);
1077 if (hr
!= DXFILE_OK
)
1080 hr
= IDirectXFileData_GetType(pData
, &pGuid
);
1081 if (hr
!= DXFILE_OK
)
1084 TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid
));
1086 if (!IsEqualGUID(pGuid
, &TID_DXFILEHeader
))
1088 ret
= D3DRMERR_BADFILE
;
1092 hr
= IDirectXFileData_GetData(pData
, NULL
, &size
, (void**)&pHeader
);
1093 if ((hr
!= DXFILE_OK
) || (size
!= sizeof(Header
)))
1096 TRACE("Version is %d %d %d\n", pHeader
->major
, pHeader
->minor
, pHeader
->flags
);
1098 /* Version must be 1.0.x */
1099 if ((pHeader
->major
!= 1) || (pHeader
->minor
!= 0))
1101 ret
= D3DRMERR_BADFILE
;
1105 IDirectXFileData_Release(pData
);
1108 hr
= IDirectXFileEnumObject_GetNextDataObject(pEnumObject
, &pData
);
1109 if (hr
!= DXFILE_OK
)
1111 ret
= D3DRMERR_NOTFOUND
;
1115 hr
= IDirectXFileData_GetType(pData
, &pGuid
);
1116 if (hr
!= DXFILE_OK
)
1119 TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid
));
1121 if (!IsEqualGUID(pGuid
, &TID_D3DRMMesh
))
1123 ret
= D3DRMERR_NOTFOUND
;
1127 hr
= IDirectXFileData_GetData(pData
, NULL
, &size
, (void**)&ptr
);
1128 if (hr
!= DXFILE_OK
)
1131 This
->nb_vertices
= *(DWORD
*)ptr
;
1132 This
->nb_faces
= *(DWORD
*)(ptr
+ sizeof(DWORD
) + This
->nb_vertices
* sizeof(D3DVECTOR
));
1133 This
->face_data_size
= size
- sizeof(DWORD
) - This
->nb_vertices
* sizeof(D3DVECTOR
) - sizeof(DWORD
);
1135 TRACE("Mesh: nb_vertices = %d, nb_faces = %d, face_data_size = %d\n", This
->nb_vertices
, This
->nb_faces
, This
->face_data_size
);
1137 This
->pVertices
= HeapAlloc(GetProcessHeap(), 0, This
->nb_vertices
* sizeof(D3DVECTOR
));
1138 memcpy(This
->pVertices
, ptr
+ sizeof(DWORD
), This
->nb_vertices
* sizeof(D3DVECTOR
));
1140 This
->pFaceData
= HeapAlloc(GetProcessHeap(), 0, This
->face_data_size
);
1141 memcpy(This
->pFaceData
, ptr
+ sizeof(DWORD
) + This
->nb_vertices
* sizeof(D3DVECTOR
) + sizeof(DWORD
), This
->face_data_size
);
1145 hr
= IDirectXFileData_GetNextObject(pData
, &pObject
);
1146 if (hr
== DXFILEERR_NOMOREOBJECTS
)
1148 FIXME("no more object\n");
1151 if (hr
!= DXFILE_OK
)
1154 hr
= IDirectXFileObject_QueryInterface(pObject
, &IID_IDirectXFileData
, (void**)&pData2
);
1155 IDirectXFileObject_Release(pObject
);
1156 if (hr
!= DXFILE_OK
)
1159 hr
= IDirectXFileData_GetType(pData2
, &pGuid
);
1160 if (hr
!= DXFILE_OK
)
1162 IDirectXFileData_Release(pData2
);
1166 FIXME("Found object type whose GUID = %s\n", debugstr_guid(pGuid
));
1168 if (!IsEqualGUID(pGuid
, &TID_D3DRMMeshNormals
))
1172 hr
= IDirectXFileData_GetData(pData
, NULL
, &size
, (void**)&ptr
);
1173 if (hr
!= DXFILE_OK
)
1176 This
->nb_normals
= *(DWORD
*)ptr
;
1177 tmp
= *(DWORD
*)(ptr
+ sizeof(DWORD
) + This
->nb_normals
* sizeof(D3DVECTOR
));
1179 FIXME("MeshNormals: nb_normals = %d, nb_faces_normals = %d\n", This
->nb_normals
, tmp
);
1181 This
->pNormals
= HeapAlloc(GetProcessHeap(), 0, This
->nb_normals
* sizeof(D3DVECTOR
));
1182 memcpy(This
->pNormals
, ptr
+ sizeof(DWORD
), This
->nb_normals
* sizeof(D3DVECTOR
));
1184 else if(!IsEqualGUID(pGuid
, &TID_D3DRMMeshTextureCoords
))
1186 hr
= IDirectXFileData_GetData(pData
, NULL
, &size
, (void**)&ptr
);
1187 if (hr
!= DXFILE_OK
)
1190 This
->nb_coords2d
= *(DWORD
*)ptr
;
1192 FIXME("MeshTextureCoords: nb_coords2d = %d\n", This
->nb_coords2d
);
1194 This
->pCoords2d
= HeapAlloc(GetProcessHeap(), 0, This
->nb_coords2d
* sizeof(Coords2d
));
1195 memcpy(This
->pCoords2d
, ptr
+ sizeof(DWORD
), This
->nb_coords2d
* sizeof(Coords2d
));
1198 else if(!IsEqualGUID(pGuid
, &TID_D3DRMMeshMaterialList
))
1200 FIXME("MeshMaterialList not supported yet, ignoring...\n");
1204 FIXME("Unknown GUID %s, ignoring...\n", debugstr_guid(pGuid
));
1207 IDirectXFileData_Release(pData2
);
1214 IDirectXFileData_Release(pData
);
1216 IDirectXFileEnumObject_Release(pEnumObject
);
1218 IDirectXFile_Release(pDXFile
);
1220 if (ret
!= D3DRM_OK
)
1222 /* Clean mesh data */
1223 This
->nb_vertices
= 0;
1224 This
->nb_normals
= 0;
1226 This
->face_data_size
= 0;
1227 This
->nb_coords2d
= 0;
1228 HeapFree(GetProcessHeap(), 0, This
->pVertices
);
1229 This
->pVertices
= NULL
;
1230 HeapFree(GetProcessHeap(), 0, This
->pNormals
);
1231 This
->pNormals
= NULL
;
1232 HeapFree(GetProcessHeap(), 0, This
->pFaceData
);
1233 This
->pFaceData
= NULL
;
1234 HeapFree(GetProcessHeap(), 0, This
->pCoords2d
);
1235 This
->pCoords2d
= NULL
;
1241 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Save(IDirect3DRMMeshBuilder3
* iface
,
1242 const char* filename
, D3DRMXOFFORMAT format
,
1243 D3DRMSAVEOPTIONS save
)
1245 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1247 FIXME("(%p)->(%s,%d,%d): stub\n", This
, filename
, format
, save
);
1252 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Scale(IDirect3DRMMeshBuilder3
* iface
,
1253 D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
1255 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1257 FIXME("(%p)->(%f,%f,%f): stub\n", This
, sx
, sy
, sz
);
1262 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Translate(IDirect3DRMMeshBuilder3
* iface
,
1263 D3DVALUE tx
, D3DVALUE ty
, D3DVALUE tz
)
1265 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1267 FIXME("(%p)->(%f,%f,%f): stub\n", This
, tx
, ty
, tz
);
1272 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetColorSource(IDirect3DRMMeshBuilder3
* iface
,
1273 D3DRMCOLORSOURCE color
)
1275 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1277 FIXME("(%p)->(%x): stub\n", This
, color
);
1282 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetBox(IDirect3DRMMeshBuilder3
* iface
,
1285 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1287 FIXME("(%p)->(%p): stub\n", This
, box
);
1292 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GenerateNormals(IDirect3DRMMeshBuilder3
* iface
,
1293 D3DVALUE crease
, DWORD flags
)
1295 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1297 FIXME("(%p)->(%f,%u): stub\n", This
, crease
, flags
);
1302 static D3DRMCOLORSOURCE WINAPI
IDirect3DRMMeshBuilder3Impl_GetColorSource(IDirect3DRMMeshBuilder3
* iface
)
1304 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1306 FIXME("(%p)->(): stub\n", This
);
1311 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddMesh(IDirect3DRMMeshBuilder3
* iface
,
1312 LPDIRECT3DRMMESH Mesh
)
1314 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1316 FIXME("(%p)->(%p): stub\n", This
, Mesh
);
1321 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddMeshBuilder(IDirect3DRMMeshBuilder3
* iface
,
1322 LPDIRECT3DRMMESHBUILDER3 MeshBuilder
,
1325 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1327 FIXME("(%p)->(%p,%u): stub\n", This
, MeshBuilder
, flags
);
1332 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddFrame(IDirect3DRMMeshBuilder3
* iface
,
1333 LPDIRECT3DRMFRAME3 Frame
)
1335 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1337 FIXME("(%p)->(%p): stub\n", This
, Frame
);
1342 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddFace(IDirect3DRMMeshBuilder3
* iface
,
1343 LPDIRECT3DRMFACE2 Face
)
1345 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1347 FIXME("(%p)->(%p): stub\n", This
, Face
);
1352 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddFaces(IDirect3DRMMeshBuilder3
* iface
,
1353 DWORD vcount
, D3DVECTOR
* vertices
,
1354 DWORD ncount
, D3DVECTOR
* normals
,
1356 LPDIRECT3DRMFACEARRAY
* FaceArray
)
1358 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1360 FIXME("(%p)->(%d,%p,%d,%p,%p,%p): stub\n", This
, vcount
, vertices
, ncount
,
1361 normals
, data
, FaceArray
);
1366 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_ReserveSpace(IDirect3DRMMeshBuilder3
* iface
,
1371 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1373 FIXME("(%p)->(%d,%d,%d): stub\n", This
, vertex_Count
, normal_count
, face_count
);
1378 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetColorRGB(IDirect3DRMMeshBuilder3
* iface
,
1379 D3DVALUE red
, D3DVALUE green
,
1382 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1384 FIXME("(%p)->(%f,%f,%f): stub\n", This
, red
, green
, blue
);
1389 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetColor(IDirect3DRMMeshBuilder3
* iface
,
1392 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1394 FIXME("(%p)->(%x): stub\n", This
, color
);
1399 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetTexture(IDirect3DRMMeshBuilder3
* iface
,
1400 LPDIRECT3DRMTEXTURE3 texture
)
1402 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1404 FIXME("(%p)->(%p): stub\n", This
, texture
);
1409 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetMaterial(IDirect3DRMMeshBuilder3
* iface
,
1410 LPDIRECT3DRMMATERIAL2 material
)
1412 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1414 FIXME("(%p)->(%p): stub\n", This
, material
);
1419 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetTextureTopology(IDirect3DRMMeshBuilder3
* iface
,
1420 BOOL wrap_u
, BOOL wrap_v
)
1422 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1424 FIXME("(%p)->(%d,%d): stub\n", This
, wrap_u
, wrap_v
);
1429 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetQuality(IDirect3DRMMeshBuilder3
* iface
,
1430 D3DRMRENDERQUALITY quality
)
1432 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1434 FIXME("(%p)->(%d): stub\n", This
, quality
);
1439 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetPerspective(IDirect3DRMMeshBuilder3
* iface
,
1442 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1444 FIXME("(%p)->(%d): stub\n", This
, enable
);
1449 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetVertex(IDirect3DRMMeshBuilder3
* iface
,
1451 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1453 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1455 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
1460 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetNormal(IDirect3DRMMeshBuilder3
* iface
,
1462 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1464 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1466 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
1471 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetTextureCoordinates(IDirect3DRMMeshBuilder3
* iface
,
1472 DWORD index
, D3DVALUE u
,
1475 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1477 FIXME("(%p)->(%f,%f): stub\n", This
, u
, v
);
1482 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetVertexColor(IDirect3DRMMeshBuilder3
* iface
,
1483 DWORD index
, D3DCOLOR color
)
1485 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1487 FIXME("(%p)->(%d,%x): stub\n", This
, index
, color
);
1492 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetVertexColorRGB(IDirect3DRMMeshBuilder3
* iface
,
1494 D3DVALUE red
, D3DVALUE green
,
1497 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1499 FIXME("(%p)->(%d,%f,%f,%f): stub\n", This
, index
, red
, green
, blue
);
1504 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetFaces(IDirect3DRMMeshBuilder3
* iface
,
1505 LPDIRECT3DRMFACEARRAY
* FaceArray
)
1507 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1509 FIXME("(%p)->(%p): stub\n", This
, FaceArray
);
1514 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetGeometry(IDirect3DRMMeshBuilder3
* iface
,
1515 DWORD
* vcount
, D3DVECTOR
* vertices
,
1516 DWORD
* ncount
, D3DVECTOR
* normals
,
1517 DWORD
* face_data_size
,
1520 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1522 FIXME("(%p)->(%p,%p,%p,%p,%p,%p): stub\n", This
, vcount
, vertices
, ncount
, normals
,
1523 face_data_size
, face_data
);
1528 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetTextureCoordinates(IDirect3DRMMeshBuilder3
* iface
,
1529 DWORD index
, D3DVALUE
* u
,
1532 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1534 TRACE("(%p)->(%d,%p,%p)\n", This
, index
, u
, v
);
1536 if (index
>= This
->nb_coords2d
)
1537 return D3DRMERR_NOTFOUND
;
1539 *u
= This
->pCoords2d
[index
].u
;
1540 *v
= This
->pCoords2d
[index
].v
;
1546 static int WINAPI
IDirect3DRMMeshBuilder3Impl_AddVertex(IDirect3DRMMeshBuilder3
* iface
,
1547 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1549 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1551 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
1556 static int WINAPI
IDirect3DRMMeshBuilder3Impl_AddNormal(IDirect3DRMMeshBuilder3
* iface
,
1557 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1559 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1561 FIXME("(%p)->(%f,%f,%f): stub\n", This
, x
, y
, z
);
1566 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_CreateFace(IDirect3DRMMeshBuilder3
* iface
,
1567 LPDIRECT3DRMFACE2
* Face
)
1569 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1571 FIXME("(%p)->(%p): stub\n", This
, Face
);
1576 static D3DRMRENDERQUALITY WINAPI
IDirect3DRMMeshBuilder3Impl_GetQuality(IDirect3DRMMeshBuilder3
* iface
)
1578 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1580 FIXME("(%p)->(): stub\n", This
);
1585 static BOOL WINAPI
IDirect3DRMMeshBuilder3Impl_GetPerspective(IDirect3DRMMeshBuilder3
* iface
)
1587 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1589 FIXME("(%p)->(): stub\n", This
);
1594 static int WINAPI
IDirect3DRMMeshBuilder3Impl_GetFaceCount(IDirect3DRMMeshBuilder3
* iface
)
1596 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1598 TRACE("(%p)->()\n", This
);
1600 return This
->nb_faces
;
1603 static int WINAPI
IDirect3DRMMeshBuilder3Impl_GetVertexCount(IDirect3DRMMeshBuilder3
* iface
)
1605 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1607 TRACE("(%p)->()\n", This
);
1609 return This
->nb_vertices
;
1612 static D3DCOLOR WINAPI
IDirect3DRMMeshBuilder3Impl_GetVertexColor(IDirect3DRMMeshBuilder3
* iface
,
1615 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1617 FIXME("(%p)->(%d): stub\n", This
, index
);
1622 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_CreateMesh(IDirect3DRMMeshBuilder3
* iface
,
1623 LPDIRECT3DRMMESH
* Mesh
)
1625 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1627 FIXME("(%p)->(%p): stub\n", This
, Mesh
);
1632 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetFace(IDirect3DRMMeshBuilder3
* iface
,
1633 DWORD index
, LPDIRECT3DRMFACE2
* Face
)
1635 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1637 FIXME("(%p)->(%u,%p): stub\n", This
, index
, Face
);
1642 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetVertex(IDirect3DRMMeshBuilder3
* iface
,
1643 DWORD index
, LPD3DVECTOR vector
)
1645 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1647 FIXME("(%p)->(%u,%p): stub\n", This
, index
, vector
);
1652 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetNormal(IDirect3DRMMeshBuilder3
* iface
,
1653 DWORD index
, LPD3DVECTOR vector
)
1655 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1657 FIXME("(%p)->(%u,%p): stub\n", This
, index
, vector
);
1662 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_DeleteVertices(IDirect3DRMMeshBuilder3
* iface
,
1663 DWORD IndexFirst
, DWORD count
)
1665 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1667 FIXME("(%p)->(%u,%u): stub\n", This
, IndexFirst
, count
);
1672 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_DeleteNormals(IDirect3DRMMeshBuilder3
* iface
,
1673 DWORD IndexFirst
, DWORD count
)
1675 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1677 FIXME("(%p)->(%u,%u): stub\n", This
, IndexFirst
, count
);
1682 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_DeleteFace(IDirect3DRMMeshBuilder3
* iface
,
1683 LPDIRECT3DRMFACE2 Face
)
1685 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1687 FIXME("(%p)->(%p): stub\n", This
, Face
);
1692 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Empty(IDirect3DRMMeshBuilder3
* iface
, DWORD flags
)
1694 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1696 FIXME("(%p)->(%u): stub\n", This
, flags
);
1701 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Optimize(IDirect3DRMMeshBuilder3
* iface
,
1704 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1706 FIXME("(%p)->(%u): stub\n", This
, flags
);
1711 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddFacesIndexed(IDirect3DRMMeshBuilder3
* iface
,
1712 DWORD flags
, DWORD
* indices
,
1713 DWORD
* IndexFirst
, DWORD
* count
)
1715 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1717 FIXME("(%p)->(%u,%p,%p,%p): stub\n", This
, flags
, indices
, IndexFirst
, count
);
1722 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_CreateSubMesh(IDirect3DRMMeshBuilder3
* iface
,
1725 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1727 FIXME("(%p)->(%p): stub\n", This
, unkwn
);
1732 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetParentMesh(IDirect3DRMMeshBuilder3
* iface
,
1733 DWORD flags
, LPUNKNOWN
*unkwn
)
1735 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1737 FIXME("(%p)->(%u,%p): stub\n", This
, flags
, unkwn
);
1742 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetSubMeshes(IDirect3DRMMeshBuilder3
* iface
,
1743 LPDWORD count
, LPUNKNOWN
*unkwn
)
1745 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1747 FIXME("(%p)->(%p,%p): stub\n", This
, count
, unkwn
);
1752 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_DeleteSubMesh(IDirect3DRMMeshBuilder3
* iface
,
1755 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1757 FIXME("(%p)->(%p): stub\n", This
, unkwn
);
1762 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_Enable(IDirect3DRMMeshBuilder3
* iface
,
1765 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1767 FIXME("(%p)->(%u): stub\n", This
, index
);
1772 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetEnable(IDirect3DRMMeshBuilder3
* iface
,
1775 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1777 FIXME("(%p)->(%p): stub\n", This
, indices
);
1782 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_AddTriangles(IDirect3DRMMeshBuilder3
* iface
,
1783 DWORD flags
, DWORD format
,
1784 DWORD VertexCount
, LPVOID data
)
1786 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1788 FIXME("(%p)->(%u,%u,%u,%p): stub\n", This
, flags
, format
, VertexCount
, data
);
1793 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetVertices(IDirect3DRMMeshBuilder3
* iface
,
1794 DWORD IndexFirst
, DWORD count
,
1797 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1799 FIXME("(%p)->(%u,%u,%p): stub\n", This
, IndexFirst
, count
, vector
);
1804 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetVertices(IDirect3DRMMeshBuilder3
* iface
,
1805 DWORD IndexFirst
, LPDWORD vcount
,
1806 LPD3DVECTOR vertices
)
1808 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1809 DWORD count
= This
->nb_vertices
- IndexFirst
;
1811 TRACE("(%p)->(%u,%p,%p)\n", This
, IndexFirst
, vcount
, vertices
);
1815 if (vertices
&& This
->nb_vertices
)
1816 memcpy(vertices
, This
->pVertices
+ IndexFirst
, count
* sizeof(D3DVECTOR
));
1821 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_SetNormals(IDirect3DRMMeshBuilder3
* iface
,
1822 DWORD IndexFirst
, DWORD count
,
1825 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1827 FIXME("(%p)->(%u,%u,%p): stub\n", This
, IndexFirst
, count
, vector
);
1832 static HRESULT WINAPI
IDirect3DRMMeshBuilder3Impl_GetNormals(IDirect3DRMMeshBuilder3
* iface
,
1833 DWORD IndexFirst
, LPDWORD count
,
1836 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1838 FIXME("(%p)->(%u,%p,%p): stub\n", This
, IndexFirst
, count
, vector
);
1843 static int WINAPI
IDirect3DRMMeshBuilder3Impl_GetNormalCount(IDirect3DRMMeshBuilder3
* iface
)
1845 IDirect3DRMMeshBuilderImpl
*This
= impl_from_IDirect3DRMMeshBuilder3(iface
);
1847 FIXME("(%p)->(): stub\n", This
);
1852 static const struct IDirect3DRMMeshBuilder3Vtbl Direct3DRMMeshBuilder3_Vtbl
=
1854 /*** IUnknown methods ***/
1855 IDirect3DRMMeshBuilder3Impl_QueryInterface
,
1856 IDirect3DRMMeshBuilder3Impl_AddRef
,
1857 IDirect3DRMMeshBuilder3Impl_Release
,
1858 /*** IDirect3DRMObject methods ***/
1859 IDirect3DRMMeshBuilder3Impl_Clone
,
1860 IDirect3DRMMeshBuilder3Impl_AddDestroyCallback
,
1861 IDirect3DRMMeshBuilder3Impl_DeleteDestroyCallback
,
1862 IDirect3DRMMeshBuilder3Impl_SetAppData
,
1863 IDirect3DRMMeshBuilder3Impl_GetAppData
,
1864 IDirect3DRMMeshBuilder3Impl_SetName
,
1865 IDirect3DRMMeshBuilder3Impl_GetName
,
1866 IDirect3DRMMeshBuilder3Impl_GetClassName
,
1867 /*** IDirect3DRMMeshBuilder3 methods ***/
1868 IDirect3DRMMeshBuilder3Impl_Load
,
1869 IDirect3DRMMeshBuilder3Impl_Save
,
1870 IDirect3DRMMeshBuilder3Impl_Scale
,
1871 IDirect3DRMMeshBuilder3Impl_Translate
,
1872 IDirect3DRMMeshBuilder3Impl_SetColorSource
,
1873 IDirect3DRMMeshBuilder3Impl_GetBox
,
1874 IDirect3DRMMeshBuilder3Impl_GenerateNormals
,
1875 IDirect3DRMMeshBuilder3Impl_GetColorSource
,
1876 IDirect3DRMMeshBuilder3Impl_AddMesh
,
1877 IDirect3DRMMeshBuilder3Impl_AddMeshBuilder
,
1878 IDirect3DRMMeshBuilder3Impl_AddFrame
,
1879 IDirect3DRMMeshBuilder3Impl_AddFace
,
1880 IDirect3DRMMeshBuilder3Impl_AddFaces
,
1881 IDirect3DRMMeshBuilder3Impl_ReserveSpace
,
1882 IDirect3DRMMeshBuilder3Impl_SetColorRGB
,
1883 IDirect3DRMMeshBuilder3Impl_SetColor
,
1884 IDirect3DRMMeshBuilder3Impl_SetTexture
,
1885 IDirect3DRMMeshBuilder3Impl_SetMaterial
,
1886 IDirect3DRMMeshBuilder3Impl_SetTextureTopology
,
1887 IDirect3DRMMeshBuilder3Impl_SetQuality
,
1888 IDirect3DRMMeshBuilder3Impl_SetPerspective
,
1889 IDirect3DRMMeshBuilder3Impl_SetVertex
,
1890 IDirect3DRMMeshBuilder3Impl_SetNormal
,
1891 IDirect3DRMMeshBuilder3Impl_SetTextureCoordinates
,
1892 IDirect3DRMMeshBuilder3Impl_SetVertexColor
,
1893 IDirect3DRMMeshBuilder3Impl_SetVertexColorRGB
,
1894 IDirect3DRMMeshBuilder3Impl_GetFaces
,
1895 IDirect3DRMMeshBuilder3Impl_GetGeometry
,
1896 IDirect3DRMMeshBuilder3Impl_GetTextureCoordinates
,
1897 IDirect3DRMMeshBuilder3Impl_AddVertex
,
1898 IDirect3DRMMeshBuilder3Impl_AddNormal
,
1899 IDirect3DRMMeshBuilder3Impl_CreateFace
,
1900 IDirect3DRMMeshBuilder3Impl_GetQuality
,
1901 IDirect3DRMMeshBuilder3Impl_GetPerspective
,
1902 IDirect3DRMMeshBuilder3Impl_GetFaceCount
,
1903 IDirect3DRMMeshBuilder3Impl_GetVertexCount
,
1904 IDirect3DRMMeshBuilder3Impl_GetVertexColor
,
1905 IDirect3DRMMeshBuilder3Impl_CreateMesh
,
1906 IDirect3DRMMeshBuilder3Impl_GetFace
,
1907 IDirect3DRMMeshBuilder3Impl_GetVertex
,
1908 IDirect3DRMMeshBuilder3Impl_GetNormal
,
1909 IDirect3DRMMeshBuilder3Impl_DeleteVertices
,
1910 IDirect3DRMMeshBuilder3Impl_DeleteNormals
,
1911 IDirect3DRMMeshBuilder3Impl_DeleteFace
,
1912 IDirect3DRMMeshBuilder3Impl_Empty
,
1913 IDirect3DRMMeshBuilder3Impl_Optimize
,
1914 IDirect3DRMMeshBuilder3Impl_AddFacesIndexed
,
1915 IDirect3DRMMeshBuilder3Impl_CreateSubMesh
,
1916 IDirect3DRMMeshBuilder3Impl_GetParentMesh
,
1917 IDirect3DRMMeshBuilder3Impl_GetSubMeshes
,
1918 IDirect3DRMMeshBuilder3Impl_DeleteSubMesh
,
1919 IDirect3DRMMeshBuilder3Impl_Enable
,
1920 IDirect3DRMMeshBuilder3Impl_GetEnable
,
1921 IDirect3DRMMeshBuilder3Impl_AddTriangles
,
1922 IDirect3DRMMeshBuilder3Impl_SetVertices
,
1923 IDirect3DRMMeshBuilder3Impl_GetVertices
,
1924 IDirect3DRMMeshBuilder3Impl_SetNormals
,
1925 IDirect3DRMMeshBuilder3Impl_GetNormals
,
1926 IDirect3DRMMeshBuilder3Impl_GetNormalCount
1929 HRESULT
Direct3DRMMeshBuilder_create(REFIID riid
, IUnknown
** ppObj
)
1931 IDirect3DRMMeshBuilderImpl
* object
;
1933 TRACE("(%p)\n", ppObj
);
1935 object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirect3DRMMeshBuilderImpl
));
1938 ERR("Out of memory\n");
1939 return E_OUTOFMEMORY
;
1942 object
->IDirect3DRMMeshBuilder2_iface
.lpVtbl
= &Direct3DRMMeshBuilder2_Vtbl
;
1943 object
->IDirect3DRMMeshBuilder3_iface
.lpVtbl
= &Direct3DRMMeshBuilder3_Vtbl
;
1946 if (IsEqualGUID(riid
, &IID_IDirect3DRMMeshBuilder3
))
1947 *ppObj
= (IUnknown
*)&object
->IDirect3DRMMeshBuilder3_iface
;
1949 *ppObj
= (IUnknown
*)&object
->IDirect3DRMMeshBuilder2_iface
;