ReactOS  0.4.14-dev-614-gbfd8a84
meshbuilder.c File Reference
#include "d3drm_private.h"
Include dependency graph for meshbuilder.c:

Go to the source code of this file.

Classes

struct  coords_2d
 
struct  mesh_material
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3drm)
 
BOOL d3drm_array_reserve (void **elements, SIZE_T *capacity, SIZE_T element_count, SIZE_T element_size)
 
static struct d3drm_meshimpl_from_IDirect3DRMMesh (IDirect3DRMMesh *iface)
 
static struct d3drm_mesh_builderimpl_from_IDirect3DRMMeshBuilder2 (IDirect3DRMMeshBuilder2 *iface)
 
static struct d3drm_mesh_builderimpl_from_IDirect3DRMMeshBuilder3 (IDirect3DRMMeshBuilder3 *iface)
 
static struct d3drm_wrapimpl_from_IDirect3DRMWrap (IDirect3DRMWrap *iface)
 
static void clean_mesh_builder_data (struct d3drm_mesh_builder *mesh_builder)
 
static HRESULT WINAPI d3drm_mesh_builder2_QueryInterface (IDirect3DRMMeshBuilder2 *iface, REFIID riid, void **out)
 
static ULONG WINAPI d3drm_mesh_builder2_AddRef (IDirect3DRMMeshBuilder2 *iface)
 
static ULONG WINAPI d3drm_mesh_builder2_Release (IDirect3DRMMeshBuilder2 *iface)
 
static HRESULT WINAPI d3drm_mesh_builder2_Clone (IDirect3DRMMeshBuilder2 *iface, IUnknown *outer, REFIID iid, void **out)
 
static HRESULT WINAPI d3drm_mesh_builder2_AddDestroyCallback (IDirect3DRMMeshBuilder2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_mesh_builder2_DeleteDestroyCallback (IDirect3DRMMeshBuilder2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetAppData (IDirect3DRMMeshBuilder3 *iface, DWORD data)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetAppData (IDirect3DRMMeshBuilder2 *iface, DWORD data)
 
static DWORD WINAPI d3drm_mesh_builder3_GetAppData (IDirect3DRMMeshBuilder3 *iface)
 
static DWORD WINAPI d3drm_mesh_builder2_GetAppData (IDirect3DRMMeshBuilder2 *iface)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetName (IDirect3DRMMeshBuilder2 *iface, const char *name)
 
static HRESULT WINAPI d3drm_mesh_builder2_GetName (IDirect3DRMMeshBuilder2 *iface, DWORD *size, char *name)
 
static HRESULT WINAPI d3drm_mesh_builder2_GetClassName (IDirect3DRMMeshBuilder2 *iface, DWORD *size, char *name)
 
static HRESULT WINAPI d3drm_mesh_builder2_Load (IDirect3DRMMeshBuilder2 *iface, void *filename, void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURECALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_mesh_builder2_Save (IDirect3DRMMeshBuilder2 *iface, const char *filename, D3DRMXOFFORMAT format, D3DRMSAVEOPTIONS flags)
 
static HRESULT WINAPI d3drm_mesh_builder2_Scale (IDirect3DRMMeshBuilder2 *iface, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
 
static HRESULT WINAPI d3drm_mesh_builder2_Translate (IDirect3DRMMeshBuilder2 *iface, D3DVALUE tx, D3DVALUE ty, D3DVALUE tz)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetColorSource (IDirect3DRMMeshBuilder2 *iface, D3DRMCOLORSOURCE source)
 
static HRESULT WINAPI d3drm_mesh_builder2_GetBox (IDirect3DRMMeshBuilder2 *iface, D3DRMBOX *box)
 
static HRESULT WINAPI d3drm_mesh_builder2_GenerateNormals (IDirect3DRMMeshBuilder2 *iface)
 
static D3DRMCOLORSOURCE WINAPI d3drm_mesh_builder2_GetColorSource (IDirect3DRMMeshBuilder2 *iface)
 
static HRESULT WINAPI d3drm_mesh_builder2_AddMesh (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMMesh *mesh)
 
static HRESULT WINAPI d3drm_mesh_builder2_AddMeshBuilder (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMMeshBuilder *mesh_builder)
 
static HRESULT WINAPI d3drm_mesh_builder2_AddFrame (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMFrame *frame)
 
static HRESULT WINAPI d3drm_mesh_builder2_AddFace (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMFace *face)
 
static HRESULT WINAPI d3drm_mesh_builder2_AddFaces (IDirect3DRMMeshBuilder2 *iface, DWORD vertex_count, D3DVECTOR *vertices, DWORD normal_count, D3DVECTOR *normals, DWORD *face_data, IDirect3DRMFaceArray **array)
 
static HRESULT WINAPI d3drm_mesh_builder2_ReserveSpace (IDirect3DRMMeshBuilder2 *iface, DWORD vertex_count, DWORD normal_count, DWORD face_count)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetColorRGB (IDirect3DRMMeshBuilder2 *iface, D3DVALUE red, D3DVALUE green, D3DVALUE blue)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetColor (IDirect3DRMMeshBuilder2 *iface, D3DCOLOR color)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetTexture (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMTexture *texture)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetMaterial (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMMaterial *material)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetTextureTopology (IDirect3DRMMeshBuilder2 *iface, BOOL wrap_u, BOOL wrap_v)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetQuality (IDirect3DRMMeshBuilder2 *iface, D3DRMRENDERQUALITY quality)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetPerspective (IDirect3DRMMeshBuilder2 *iface, BOOL enable)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetVertex (IDirect3DRMMeshBuilder2 *iface, DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetNormal (IDirect3DRMMeshBuilder2 *iface, DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetTextureCoordinates (IDirect3DRMMeshBuilder2 *iface, DWORD index, D3DVALUE u, D3DVALUE v)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetVertexColor (IDirect3DRMMeshBuilder2 *iface, DWORD index, D3DCOLOR color)
 
static HRESULT WINAPI d3drm_mesh_builder2_SetVertexColorRGB (IDirect3DRMMeshBuilder2 *iface, DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue)
 
static HRESULT WINAPI d3drm_mesh_builder2_GetFaces (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMFaceArray **array)
 
static HRESULT WINAPI d3drm_mesh_builder2_GetVertices (IDirect3DRMMeshBuilder2 *iface, DWORD *vertex_count, D3DVECTOR *vertices, DWORD *normal_count, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data)
 
static HRESULT WINAPI d3drm_mesh_builder2_GetTextureCoordinates (IDirect3DRMMeshBuilder2 *iface, DWORD index, D3DVALUE *u, D3DVALUE *v)
 
static int WINAPI d3drm_mesh_builder2_AddVertex (IDirect3DRMMeshBuilder2 *iface, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static int WINAPI d3drm_mesh_builder2_AddNormal (IDirect3DRMMeshBuilder2 *iface, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static HRESULT WINAPI d3drm_mesh_builder2_CreateFace (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMFace **face)
 
static D3DRMRENDERQUALITY WINAPI d3drm_mesh_builder2_GetQuality (IDirect3DRMMeshBuilder2 *iface)
 
static BOOL WINAPI d3drm_mesh_builder2_GetPerspective (IDirect3DRMMeshBuilder2 *iface)
 
static int WINAPI d3drm_mesh_builder2_GetFaceCount (IDirect3DRMMeshBuilder2 *iface)
 
static int WINAPI d3drm_mesh_builder2_GetVertexCount (IDirect3DRMMeshBuilder2 *iface)
 
static D3DCOLOR WINAPI d3drm_mesh_builder2_GetVertexColor (IDirect3DRMMeshBuilder2 *iface, DWORD index)
 
static HRESULT WINAPI d3drm_mesh_builder2_CreateMesh (IDirect3DRMMeshBuilder2 *iface, IDirect3DRMMesh **mesh)
 
static HRESULT WINAPI d3drm_mesh_builder2_GenerateNormals2 (IDirect3DRMMeshBuilder2 *iface, D3DVALUE crease, DWORD flags)
 
static HRESULT WINAPI d3drm_mesh_builder2_GetFace (IDirect3DRMMeshBuilder2 *iface, DWORD index, IDirect3DRMFace **face)
 
static HRESULT WINAPI d3drm_mesh_builder3_QueryInterface (IDirect3DRMMeshBuilder3 *iface, REFIID riid, void **out)
 
static ULONG WINAPI d3drm_mesh_builder3_AddRef (IDirect3DRMMeshBuilder3 *iface)
 
static ULONG WINAPI d3drm_mesh_builder3_Release (IDirect3DRMMeshBuilder3 *iface)
 
static HRESULT WINAPI d3drm_mesh_builder3_Clone (IDirect3DRMMeshBuilder3 *iface, IUnknown *outer, REFIID iid, void **out)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddDestroyCallback (IDirect3DRMMeshBuilder3 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_mesh_builder3_DeleteDestroyCallback (IDirect3DRMMeshBuilder3 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetName (IDirect3DRMMeshBuilder3 *iface, const char *name)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetName (IDirect3DRMMeshBuilder3 *iface, DWORD *size, char *name)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetClassName (IDirect3DRMMeshBuilder3 *iface, DWORD *size, char *name)
 
HRESULT load_mesh_data (IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *pData, D3DRMLOADTEXTURECALLBACK load_texture_proc, void *arg)
 
static HRESULT WINAPI d3drm_mesh_builder3_Load (IDirect3DRMMeshBuilder3 *iface, void *filename, void *name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK cb, void *arg)
 
static HRESULT WINAPI d3drm_mesh_builder3_Save (IDirect3DRMMeshBuilder3 *iface, const char *filename, D3DRMXOFFORMAT format, D3DRMSAVEOPTIONS flags)
 
static HRESULT WINAPI d3drm_mesh_builder3_Scale (IDirect3DRMMeshBuilder3 *iface, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
 
static HRESULT WINAPI d3drm_mesh_builder3_Translate (IDirect3DRMMeshBuilder3 *iface, D3DVALUE tx, D3DVALUE ty, D3DVALUE tz)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetColorSource (IDirect3DRMMeshBuilder3 *iface, D3DRMCOLORSOURCE source)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetBox (IDirect3DRMMeshBuilder3 *iface, D3DRMBOX *box)
 
static HRESULT WINAPI d3drm_mesh_builder3_GenerateNormals (IDirect3DRMMeshBuilder3 *iface, D3DVALUE crease, DWORD flags)
 
static D3DRMCOLORSOURCE WINAPI d3drm_mesh_builder3_GetColorSource (IDirect3DRMMeshBuilder3 *iface)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddMesh (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMMesh *mesh)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddMeshBuilder (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMMeshBuilder3 *mesh_builder, DWORD flags)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddFrame (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMFrame3 *frame)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddFace (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMFace2 *face)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddFaces (IDirect3DRMMeshBuilder3 *iface, DWORD vertex_count, D3DVECTOR *vertices, DWORD normal_count, D3DVECTOR *normals, DWORD *face_data, IDirect3DRMFaceArray **array)
 
static HRESULT WINAPI d3drm_mesh_builder3_ReserveSpace (IDirect3DRMMeshBuilder3 *iface, DWORD vertex_count, DWORD normal_count, DWORD face_count)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetColorRGB (IDirect3DRMMeshBuilder3 *iface, D3DVALUE red, D3DVALUE green, D3DVALUE blue)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetColor (IDirect3DRMMeshBuilder3 *iface, D3DCOLOR color)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetTexture (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMTexture3 *texture)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetMaterial (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMMaterial2 *material)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetTextureTopology (IDirect3DRMMeshBuilder3 *iface, BOOL wrap_u, BOOL wrap_v)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetQuality (IDirect3DRMMeshBuilder3 *iface, D3DRMRENDERQUALITY quality)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetPerspective (IDirect3DRMMeshBuilder3 *iface, BOOL enable)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetVertex (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetNormal (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetTextureCoordinates (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DVALUE u, D3DVALUE v)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetVertexColor (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DCOLOR color)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetVertexColorRGB (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetFaces (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMFaceArray **array)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetGeometry (IDirect3DRMMeshBuilder3 *iface, DWORD *vertex_count, D3DVECTOR *vertices, DWORD *normal_count, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetTextureCoordinates (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DVALUE *u, D3DVALUE *v)
 
static int WINAPI d3drm_mesh_builder3_AddVertex (IDirect3DRMMeshBuilder3 *iface, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static int WINAPI d3drm_mesh_builder3_AddNormal (IDirect3DRMMeshBuilder3 *iface, D3DVALUE x, D3DVALUE y, D3DVALUE z)
 
static HRESULT WINAPI d3drm_mesh_builder3_CreateFace (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMFace2 **face)
 
static D3DRMRENDERQUALITY WINAPI d3drm_mesh_builder3_GetQuality (IDirect3DRMMeshBuilder3 *iface)
 
static BOOL WINAPI d3drm_mesh_builder3_GetPerspective (IDirect3DRMMeshBuilder3 *iface)
 
static int WINAPI d3drm_mesh_builder3_GetFaceCount (IDirect3DRMMeshBuilder3 *iface)
 
static int WINAPI d3drm_mesh_builder3_GetVertexCount (IDirect3DRMMeshBuilder3 *iface)
 
static D3DCOLOR WINAPI d3drm_mesh_builder3_GetVertexColor (IDirect3DRMMeshBuilder3 *iface, DWORD index)
 
static HRESULT WINAPI d3drm_mesh_builder3_CreateMesh (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMMesh **mesh)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetFace (IDirect3DRMMeshBuilder3 *iface, DWORD index, IDirect3DRMFace2 **face)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetVertex (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DVECTOR *vector)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetNormal (IDirect3DRMMeshBuilder3 *iface, DWORD index, D3DVECTOR *vector)
 
static HRESULT WINAPI d3drm_mesh_builder3_DeleteVertices (IDirect3DRMMeshBuilder3 *iface, DWORD start_idx, DWORD count)
 
static HRESULT WINAPI d3drm_mesh_builder3_DeleteNormals (IDirect3DRMMeshBuilder3 *iface, DWORD start_idx, DWORD count)
 
static HRESULT WINAPI d3drm_mesh_builder3_DeleteFace (IDirect3DRMMeshBuilder3 *iface, IDirect3DRMFace2 *face)
 
static HRESULT WINAPI d3drm_mesh_builder3_Empty (IDirect3DRMMeshBuilder3 *iface, DWORD flags)
 
static HRESULT WINAPI d3drm_mesh_builder3_Optimize (IDirect3DRMMeshBuilder3 *iface, DWORD flags)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddFacesIndexed (IDirect3DRMMeshBuilder3 *iface, DWORD flags, DWORD *indices, DWORD *start_idx, DWORD *count)
 
static HRESULT WINAPI d3drm_mesh_builder3_CreateSubMesh (IDirect3DRMMeshBuilder3 *iface, IUnknown **mesh)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetParentMesh (IDirect3DRMMeshBuilder3 *iface, DWORD flags, IUnknown **parent)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetSubMeshes (IDirect3DRMMeshBuilder3 *iface, DWORD *count, IUnknown **meshes)
 
static HRESULT WINAPI d3drm_mesh_builder3_DeleteSubMesh (IDirect3DRMMeshBuilder3 *iface, IUnknown *mesh)
 
static HRESULT WINAPI d3drm_mesh_builder3_Enable (IDirect3DRMMeshBuilder3 *iface, DWORD index)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetEnable (IDirect3DRMMeshBuilder3 *iface, DWORD *indices)
 
static HRESULT WINAPI d3drm_mesh_builder3_AddTriangles (IDirect3DRMMeshBuilder3 *iface, DWORD flags, DWORD format, DWORD vertex_count, void *data)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetVertices (IDirect3DRMMeshBuilder3 *iface, DWORD start_idx, DWORD count, D3DVECTOR *vector)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetVertices (IDirect3DRMMeshBuilder3 *iface, DWORD start_idx, DWORD *vertex_count, D3DVECTOR *vertices)
 
static HRESULT WINAPI d3drm_mesh_builder3_SetNormals (IDirect3DRMMeshBuilder3 *iface, DWORD start_idx, DWORD count, D3DVECTOR *vector)
 
static HRESULT WINAPI d3drm_mesh_builder3_GetNormals (IDirect3DRMMeshBuilder3 *iface, DWORD start_idx, DWORD *normal_count, D3DVECTOR *normals)
 
static int WINAPI d3drm_mesh_builder3_GetNormalCount (IDirect3DRMMeshBuilder3 *iface)
 
HRESULT d3drm_mesh_builder_create (struct d3drm_mesh_builder **mesh_builder, IDirect3DRM *d3drm)
 
static HRESULT WINAPI d3drm_mesh_QueryInterface (IDirect3DRMMesh *iface, REFIID riid, void **out)
 
static ULONG WINAPI d3drm_mesh_AddRef (IDirect3DRMMesh *iface)
 
static ULONG WINAPI d3drm_mesh_Release (IDirect3DRMMesh *iface)
 
static HRESULT WINAPI d3drm_mesh_Clone (IDirect3DRMMesh *iface, IUnknown *outer, REFIID iid, void **out)
 
static HRESULT WINAPI d3drm_mesh_AddDestroyCallback (IDirect3DRMMesh *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_mesh_DeleteDestroyCallback (IDirect3DRMMesh *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_mesh_SetAppData (IDirect3DRMMesh *iface, DWORD data)
 
static DWORD WINAPI d3drm_mesh_GetAppData (IDirect3DRMMesh *iface)
 
static HRESULT WINAPI d3drm_mesh_SetName (IDirect3DRMMesh *iface, const char *name)
 
static HRESULT WINAPI d3drm_mesh_GetName (IDirect3DRMMesh *iface, DWORD *size, char *name)
 
static HRESULT WINAPI d3drm_mesh_GetClassName (IDirect3DRMMesh *iface, DWORD *size, char *name)
 
static HRESULT WINAPI d3drm_mesh_Scale (IDirect3DRMMesh *iface, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
 
static HRESULT WINAPI d3drm_mesh_Translate (IDirect3DRMMesh *iface, D3DVALUE tx, D3DVALUE ty, D3DVALUE tz)
 
static HRESULT WINAPI d3drm_mesh_GetBox (IDirect3DRMMesh *iface, D3DRMBOX *box)
 
static HRESULT WINAPI d3drm_mesh_AddGroup (IDirect3DRMMesh *iface, unsigned vertex_count, unsigned face_count, unsigned vertex_per_face, unsigned *face_data, D3DRMGROUPINDEX *id)
 
static HRESULT WINAPI d3drm_mesh_SetVertices (IDirect3DRMMesh *iface, D3DRMGROUPINDEX group_id, unsigned int start_idx, unsigned int count, D3DRMVERTEX *values)
 
static HRESULT WINAPI d3drm_mesh_SetGroupColor (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, D3DCOLOR color)
 
static HRESULT WINAPI d3drm_mesh_SetGroupColorRGB (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, D3DVALUE red, D3DVALUE green, D3DVALUE blue)
 
static HRESULT WINAPI d3drm_mesh_SetGroupMapping (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, D3DRMMAPPING value)
 
static HRESULT WINAPI d3drm_mesh_SetGroupQuality (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, D3DRMRENDERQUALITY value)
 
static HRESULT WINAPI d3drm_mesh_SetGroupMaterial (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, IDirect3DRMMaterial *material)
 
static HRESULT WINAPI d3drm_mesh_SetGroupTexture (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, IDirect3DRMTexture *texture)
 
static DWORD WINAPI d3drm_mesh_GetGroupCount (IDirect3DRMMesh *iface)
 
static HRESULT WINAPI d3drm_mesh_GetGroup (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, unsigned *vertex_count, unsigned *face_count, unsigned *vertex_per_face, DWORD *face_data_size, unsigned *face_data)
 
static HRESULT WINAPI d3drm_mesh_GetVertices (IDirect3DRMMesh *iface, D3DRMGROUPINDEX group_id, DWORD start_idx, DWORD count, D3DRMVERTEX *vertices)
 
static D3DCOLOR WINAPI d3drm_mesh_GetGroupColor (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id)
 
static D3DRMMAPPING WINAPI d3drm_mesh_GetGroupMapping (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id)
 
static D3DRMRENDERQUALITY WINAPI d3drm_mesh_GetGroupQuality (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id)
 
static HRESULT WINAPI d3drm_mesh_GetGroupMaterial (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, IDirect3DRMMaterial **material)
 
static HRESULT WINAPI d3drm_mesh_GetGroupTexture (IDirect3DRMMesh *iface, D3DRMGROUPINDEX id, IDirect3DRMTexture **texture)
 
HRESULT d3drm_mesh_create (struct d3drm_mesh **mesh, IDirect3DRM *d3drm)
 
static HRESULT WINAPI d3drm_wrap_QueryInterface (IDirect3DRMWrap *iface, REFIID riid, void **out)
 
static ULONG WINAPI d3drm_wrap_AddRef (IDirect3DRMWrap *iface)
 
static ULONG WINAPI d3drm_wrap_Release (IDirect3DRMWrap *iface)
 
static HRESULT WINAPI d3drm_wrap_Clone (IDirect3DRMWrap *iface, IUnknown *outer, REFIID iid, void **out)
 
static HRESULT WINAPI d3drm_wrap_AddDestroyCallback (IDirect3DRMWrap *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_wrap_DeleteDestroyCallback (IDirect3DRMWrap *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
 
static HRESULT WINAPI d3drm_wrap_SetAppData (IDirect3DRMWrap *iface, DWORD data)
 
static DWORD WINAPI d3drm_wrap_GetAppData (IDirect3DRMWrap *iface)
 
static HRESULT WINAPI d3drm_wrap_SetName (IDirect3DRMWrap *iface, const char *name)
 
static HRESULT WINAPI d3drm_wrap_GetName (IDirect3DRMWrap *iface, DWORD *size, char *name)
 
static HRESULT WINAPI d3drm_wrap_GetClassName (IDirect3DRMWrap *iface, DWORD *size, char *name)
 
static HRESULT WINAPI d3drm_wrap_Init (IDirect3DRMWrap *iface, D3DRMWRAPTYPE type, IDirect3DRMFrame *reference, D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov, D3DVALUE su, D3DVALUE sv)
 
static HRESULT WINAPI d3drm_wrap_Apply (IDirect3DRMWrap *iface, IDirect3DRMObject *object)
 
static HRESULT WINAPI d3drm_wrap_ApplyRelative (IDirect3DRMWrap *iface, IDirect3DRMFrame *frame, IDirect3DRMObject *object)
 
HRESULT d3drm_wrap_create (struct d3drm_wrap **wrap, IDirect3DRM *d3drm)
 

Variables

char templates []
 
static const struct IDirect3DRMMeshBuilder2Vtbl d3drm_mesh_builder2_vtbl
 
static const struct IDirect3DRMMeshBuilder3Vtbl d3drm_mesh_builder3_vtbl
 
static const struct IDirect3DRMMeshVtbl d3drm_mesh_vtbl
 
static const struct IDirect3DRMWrapVtbl d3drm_wrap_vtbl
 

Function Documentation

◆ clean_mesh_builder_data()

static void clean_mesh_builder_data ( struct d3drm_mesh_builder mesh_builder)
static

Definition at line 307 of file meshbuilder.c.

308 {
309  DWORD i;
310 
311  IDirect3DRMMeshBuilder3_SetName(&mesh_builder->IDirect3DRMMeshBuilder3_iface, NULL);
312  heap_free(mesh_builder->vertices);
313  mesh_builder->vertices = NULL;
314  mesh_builder->nb_vertices = 0;
315  mesh_builder->vertices_size = 0;
316  heap_free(mesh_builder->normals);
317  mesh_builder->normals = NULL;
318  mesh_builder->nb_normals = 0;
319  mesh_builder->normals_size = 0;
320  heap_free(mesh_builder->pFaceData);
321  mesh_builder->pFaceData = NULL;
322  mesh_builder->face_data_size = 0;
323  mesh_builder->nb_faces = 0;
324  heap_free(mesh_builder->pCoords2d);
325  mesh_builder->pCoords2d = NULL;
326  mesh_builder->nb_coords2d = 0;
327  for (i = 0; i < mesh_builder->nb_materials; i++)
328  {
329  if (mesh_builder->materials[i].material)
330  IDirect3DRMMaterial2_Release(mesh_builder->materials[i].material);
331  if (mesh_builder->materials[i].texture)
332  IDirect3DRMTexture3_Release(mesh_builder->materials[i].texture);
333  }
334  mesh_builder->nb_materials = 0;
335  heap_free(mesh_builder->materials);
336  mesh_builder->materials = NULL;
337  heap_free(mesh_builder->material_indices);
338  mesh_builder->material_indices = NULL;
339 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define IDirect3DRMMaterial2_Release(p)
Definition: d3drmobj.h:3732
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMTexture3_Release(p)
Definition: d3drmobj.h:3476
#define IDirect3DRMMeshBuilder3_SetName(p, a)
Definition: d3drmobj.h:2933
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by d3drm_mesh_builder2_Release(), and d3drm_mesh_builder3_Load().

◆ d3drm_array_reserve()

BOOL d3drm_array_reserve ( void **  elements,
SIZE_T capacity,
SIZE_T  element_count,
SIZE_T  element_size 
)

Definition at line 260 of file meshbuilder.c.

261 {
262  SIZE_T new_capacity, max_capacity;
263  void *new_elements;
264 
265  if (element_count <= *capacity)
266  return TRUE;
267 
268  max_capacity = ~(SIZE_T)0 / element_size;
269  if (max_capacity < element_count)
270  return FALSE;
271 
272  new_capacity = max(*capacity, 4);
273  while (new_capacity < element_count && new_capacity <= max_capacity / 2)
274  new_capacity *= 2;
275 
276  if (new_capacity < element_count)
277  new_capacity = max_capacity;
278 
279  if (!(new_elements = heap_realloc(*elements, new_capacity * element_size)))
280  return FALSE;
281 
282  *elements = new_elements;
283  *capacity = new_capacity;
284  return TRUE;
285 }
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
ULONG_PTR SIZE_T
Definition: typedefs.h:78

Referenced by d3drm_animation2_AddKey(), d3drm_frame3_AddChild(), d3drm_frame3_AddLight(), d3drm_frame3_AddVisual(), d3drm_mesh_AddGroup(), d3drm_mesh_builder3_AddNormal(), d3drm_mesh_builder3_AddVertex(), and load_mesh_data().

◆ d3drm_mesh_AddDestroyCallback()

static HRESULT WINAPI d3drm_mesh_AddDestroyCallback ( IDirect3DRMMesh *  iface,
D3DRMOBJECTCALLBACK  cb,
void ctx 
)
static

Definition at line 2424 of file meshbuilder.c.

2426 {
2427  struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
2428 
2429  TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
2430 
2431  return d3drm_object_add_destroy_callback(&mesh->obj, cb, ctx);
2432 }
HRESULT d3drm_object_add_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:55
#define TRACE(s)
Definition: solgame.cpp:4
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
static struct d3drm_mesh * impl_from_IDirect3DRMMesh(IDirect3DRMMesh *iface)
Definition: meshbuilder.c:287
struct d3drm_object obj

◆ d3drm_mesh_AddGroup()

static HRESULT WINAPI d3drm_mesh_AddGroup ( IDirect3DRMMesh *  iface,
unsigned  vertex_count,
unsigned  face_count,
unsigned  vertex_per_face,
unsigned face_data,
D3DRMGROUPINDEX id 
)
static

Definition at line 2514 of file meshbuilder.c.

2516 {
2517  struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
2518  struct mesh_group *group;
2519 
2520  TRACE("iface %p, vertex_count %u, face_count %u, vertex_per_face %u, face_data %p, id %p.\n",
2522 
2523  if (!face_data || !id)
2524  return E_POINTER;
2525 
2526  if (!d3drm_array_reserve((void **)&mesh->groups, &mesh->groups_size, mesh->nb_groups + 1, sizeof(*mesh->groups)))
2527  return E_OUTOFMEMORY;
2528 
2529  group = mesh->groups + mesh->nb_groups;
2530 
2531  if (!(group->vertices = heap_calloc(vertex_count, sizeof(*group->vertices))))
2532  return E_OUTOFMEMORY;
2533  group->nb_vertices = vertex_count;
2534  group->nb_faces = face_count;
2535  group->vertex_per_face = vertex_per_face;
2536 
2537  if (vertex_per_face)
2538  {
2539  group->face_data_size = face_count * vertex_per_face;
2540  }
2541  else
2542  {
2543  unsigned i;
2544  unsigned nb_indices;
2545  unsigned* face_data_ptr = face_data;
2546  group->face_data_size = 0;
2547 
2548  for (i = 0; i < face_count; i++)
2549  {
2550  nb_indices = *face_data_ptr;
2551  group->face_data_size += nb_indices + 1;
2552  face_data_ptr += nb_indices;
2553  }
2554  }
2555 
2556  if (!(group->face_data = heap_calloc(group->face_data_size, sizeof(*group->face_data))))
2557  {
2558  heap_free(group->vertices);
2559  return E_OUTOFMEMORY;
2560  }
2561  memcpy(group->face_data, face_data, group->face_data_size * sizeof(*face_data));
2562 
2563  group->material = NULL;
2564  group->texture = NULL;
2565 
2566  *id = mesh->nb_groups++;
2567 
2568  return D3DRM_OK;
2569 }
BOOL d3drm_array_reserve(void **elements, SIZE_T *capacity, SIZE_T element_count, SIZE_T element_size)
Definition: meshbuilder.c:260
int vertex_count
Definition: d3drm.c:3367
static void * heap_calloc(SIZE_T count, SIZE_T size)
Definition: heap.h:49
int vertex_per_face
Definition: d3drm.c:3369
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
SIZE_T groups_size
smooth NULL
Definition: ftsmooth.c:416
GLboolean GLuint group
Definition: glext.h:11120
#define TRACE(s)
Definition: solgame.cpp:4
struct mesh_group * groups
#define D3DRM_OK
Definition: d3drm.h:486
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned * face_data
SIZE_T nb_groups
#define E_POINTER
Definition: winerror.h:2365
int face_count
Definition: d3drm.c:3368
static struct d3drm_mesh * impl_from_IDirect3DRMMesh(IDirect3DRMMesh *iface)
Definition: meshbuilder.c:287
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ d3drm_mesh_AddRef()

static ULONG WINAPI d3drm_mesh_AddRef ( IDirect3DRMMesh *  iface)
static

Definition at line 2377 of file meshbuilder.c.

2378 {
2379  struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
2380  ULONG refcount = InterlockedIncrement(&mesh->ref);
2381 
2382  TRACE("%p increasing refcount to %u.\n", iface, refcount);
2383 
2384  return refcount;
2385 }
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
static struct d3drm_mesh * impl_from_IDirect3DRMMesh(IDirect3DRMMesh *iface)
Definition: meshbuilder.c:287

◆ d3drm_mesh_builder2_AddDestroyCallback()

static HRESULT WINAPI d3drm_mesh_builder2_AddDestroyCallback ( IDirect3DRMMeshBuilder2 *  iface,
D3DRMOBJECTCALLBACK  cb,
void ctx 
)
static

Definition at line 410 of file meshbuilder.c.

412 {
414 
415  TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
416 
417  return IDirect3DRMMeshBuilder3_AddDestroyCallback(&mesh_builder->IDirect3DRMMeshBuilder3_iface, cb, ctx);
418 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
#define IDirect3DRMMeshBuilder3_AddDestroyCallback(p, a, b)
Definition: d3drmobj.h:2929

◆ d3drm_mesh_builder2_AddFace()

static HRESULT WINAPI d3drm_mesh_builder2_AddFace ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMFace *  face 
)
static

Definition at line 587 of file meshbuilder.c.

588 {
589  FIXME("iface %p, face %p stub!\n", iface, face);
590 
591  return E_NOTIMPL;
592 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ d3drm_mesh_builder2_AddFaces()

static HRESULT WINAPI d3drm_mesh_builder2_AddFaces ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  vertex_count,
D3DVECTOR vertices,
DWORD  normal_count,
D3DVECTOR normals,
DWORD face_data,
IDirect3DRMFaceArray **  array 
)
static

Definition at line 594 of file meshbuilder.c.

597 {
598  FIXME("iface %p, vertex_count %u, vertices %p, normal_count %u, normals %p, face_data %p, array %p stub!\n",
599  iface, vertex_count, vertices, normal_count, normals, face_data, array);
600 
601  return E_NOTIMPL;
602 }
int vertex_count
Definition: d3drm.c:3367
#define FIXME(fmt,...)
Definition: debug.h:110
D3DVECTOR * vertices
D3DVECTOR * normals
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_AddFrame()

static HRESULT WINAPI d3drm_mesh_builder2_AddFrame ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMFrame *  frame 
)
static

Definition at line 580 of file meshbuilder.c.

581 {
582  FIXME("iface %p, frame %p stub!\n", iface, frame);
583 
584  return E_NOTIMPL;
585 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_AddMesh()

static HRESULT WINAPI d3drm_mesh_builder2_AddMesh ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMMesh *  mesh 
)
static

Definition at line 565 of file meshbuilder.c.

566 {
567  FIXME("iface %p, mesh %p stub!\n", iface, mesh);
568 
569  return E_NOTIMPL;
570 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_AddMeshBuilder()

static HRESULT WINAPI d3drm_mesh_builder2_AddMeshBuilder ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMMeshBuilder *  mesh_builder 
)
static

Definition at line 572 of file meshbuilder.c.

574 {
575  FIXME("iface %p, mesh_builder %p stub!\n", iface, mesh_builder);
576 
577  return E_NOTIMPL;
578 }
#define FIXME(fmt,...)
Definition: debug.h:110
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_AddNormal()

static int WINAPI d3drm_mesh_builder2_AddNormal ( IDirect3DRMMeshBuilder2 *  iface,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 791 of file meshbuilder.c.

793 {
795 
796  TRACE("iface %p, x %.8e, y %.8e, z %.8e.\n", iface, x, y, z);
797 
798  return IDirect3DRMMeshBuilder3_AddNormal(&mesh_builder->IDirect3DRMMeshBuilder3_iface, x, y, z);
799 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMMeshBuilder3_AddNormal(p, a, b, c)
Definition: d3drmobj.h:2968
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder2_AddRef()

static ULONG WINAPI d3drm_mesh_builder2_AddRef ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 370 of file meshbuilder.c.

371 {
373  ULONG refcount = InterlockedIncrement(&mesh_builder->ref);
374 
375  TRACE("%p increasing refcount to %u.\n", mesh_builder, refcount);
376 
377  return refcount;
378 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by d3drm_mesh_builder3_AddRef().

◆ d3drm_mesh_builder2_AddVertex()

static int WINAPI d3drm_mesh_builder2_AddVertex ( IDirect3DRMMeshBuilder2 *  iface,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 781 of file meshbuilder.c.

783 {
785 
786  TRACE("iface %p, x %.8e, y %.8e, z %.8e.\n", iface, x, y, z);
787 
788  return IDirect3DRMMeshBuilder3_AddVertex(&mesh_builder->IDirect3DRMMeshBuilder3_iface, x, y, z);
789 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
#define IDirect3DRMMeshBuilder3_AddVertex(p, a, b, c)
Definition: d3drmobj.h:2967
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder2_Clone()

static HRESULT WINAPI d3drm_mesh_builder2_Clone ( IDirect3DRMMeshBuilder2 *  iface,
IUnknown outer,
REFIID  iid,
void **  out 
)
static

Definition at line 402 of file meshbuilder.c.

404 {
405  FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
406 
407  return E_NOTIMPL;
408 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static FILE * out
Definition: regtests2xml.c:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_CreateFace()

static HRESULT WINAPI d3drm_mesh_builder2_CreateFace ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMFace **  face 
)
static

Definition at line 801 of file meshbuilder.c.

802 {
803  struct d3drm_face *object;
804  HRESULT hr;
805 
806  TRACE("iface %p, face %p.\n", iface, face);
807 
808  if (FAILED(hr = d3drm_face_create(&object)))
809  return hr;
810 
811  *face = &object->IDirect3DRMFace_iface;
812 
813  return S_OK;
814 }
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
HRESULT d3drm_face_create(struct d3drm_face **face) DECLSPEC_HIDDEN
Definition: face.c:620
#define S_OK
Definition: intsafe.h:59
void * object
Definition: jmemsys.h:48
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ d3drm_mesh_builder2_CreateMesh()

static HRESULT WINAPI d3drm_mesh_builder2_CreateMesh ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMMesh **  mesh 
)
static

Definition at line 855 of file meshbuilder.c.

856 {
858 
859  TRACE("iface %p, mesh %p.\n", iface, mesh);
860 
861  return IDirect3DRMMeshBuilder3_CreateMesh(&mesh_builder->IDirect3DRMMeshBuilder3_iface, mesh);
862 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMMeshBuilder3_CreateMesh(p, a)
Definition: d3drmobj.h:2977

◆ d3drm_mesh_builder2_DeleteDestroyCallback()

static HRESULT WINAPI d3drm_mesh_builder2_DeleteDestroyCallback ( IDirect3DRMMeshBuilder2 *  iface,
D3DRMOBJECTCALLBACK  cb,
void ctx 
)
static

Definition at line 420 of file meshbuilder.c.

422 {
424 
425  TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
426 
427  return IDirect3DRMMeshBuilder3_DeleteDestroyCallback(&mesh_builder->IDirect3DRMMeshBuilder3_iface, cb, ctx);
428 }
#define IDirect3DRMMeshBuilder3_DeleteDestroyCallback(p, a, b)
Definition: d3drmobj.h:2930
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32

◆ d3drm_mesh_builder2_GenerateNormals()

static HRESULT WINAPI d3drm_mesh_builder2_GenerateNormals ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 551 of file meshbuilder.c.

552 {
553  FIXME("iface %p stub!\n", iface);
554 
555  return E_NOTIMPL;
556 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_GenerateNormals2()

static HRESULT WINAPI d3drm_mesh_builder2_GenerateNormals2 ( IDirect3DRMMeshBuilder2 *  iface,
D3DVALUE  crease,
DWORD  flags 
)
static

Definition at line 864 of file meshbuilder.c.

866 {
867  FIXME("iface %p, crease %.8e, flags %#x stub!\n", iface, crease, flags);
868 
869  return E_NOTIMPL;
870 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_GetAppData()

static DWORD WINAPI d3drm_mesh_builder2_GetAppData ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 459 of file meshbuilder.c.

460 {
462 
463  TRACE("iface %p.\n", iface);
464 
465  return d3drm_mesh_builder3_GetAppData(&mesh_builder->IDirect3DRMMeshBuilder3_iface);
466 }
static DWORD WINAPI d3drm_mesh_builder3_GetAppData(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:450
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder2_GetBox()

static HRESULT WINAPI d3drm_mesh_builder2_GetBox ( IDirect3DRMMeshBuilder2 *  iface,
D3DRMBOX box 
)
static

Definition at line 544 of file meshbuilder.c.

545 {
546  FIXME("iface %p, box %p stub!\n", iface, box);
547 
548  return E_NOTIMPL;
549 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: palette.c:467

◆ d3drm_mesh_builder2_GetClassName()

static HRESULT WINAPI d3drm_mesh_builder2_GetClassName ( IDirect3DRMMeshBuilder2 *  iface,
DWORD size,
char name 
)
static

Definition at line 486 of file meshbuilder.c.

487 {
489 
490  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
491 
492  return IDirect3DRMMeshBuilder3_GetClassName(&mesh_builder->IDirect3DRMMeshBuilder3_iface, size, name);
493 }
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMMeshBuilder3_GetClassName(p, a, b)
Definition: d3drmobj.h:2935
Definition: name.c:38

◆ d3drm_mesh_builder2_GetColorSource()

static D3DRMCOLORSOURCE WINAPI d3drm_mesh_builder2_GetColorSource ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 558 of file meshbuilder.c.

559 {
560  FIXME("iface %p stub!\n", iface);
561 
562  return E_NOTIMPL;
563 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_GetFace()

static HRESULT WINAPI d3drm_mesh_builder2_GetFace ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index,
IDirect3DRMFace **  face 
)
static

Definition at line 872 of file meshbuilder.c.

874 {
875  FIXME("iface %p, index %u, face %p stub!\n", iface, index, face);
876 
877  return E_NOTIMPL;
878 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ d3drm_mesh_builder2_GetFaceCount()

static int WINAPI d3drm_mesh_builder2_GetFaceCount ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 830 of file meshbuilder.c.

831 {
833 
834  TRACE("iface %p.\n", iface);
835 
836  return mesh_builder->nb_faces;
837 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder2_GetFaces()

static HRESULT WINAPI d3drm_mesh_builder2_GetFaces ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMFaceArray **  array 
)
static

Definition at line 729 of file meshbuilder.c.

731 {
732  FIXME("iface %p, array %p stub!\n", iface, array);
733 
734  return E_NOTIMPL;
735 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_GetName()

static HRESULT WINAPI d3drm_mesh_builder2_GetName ( IDirect3DRMMeshBuilder2 *  iface,
DWORD size,
char name 
)
static

Definition at line 477 of file meshbuilder.c.

478 {
480 
481  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
482 
483  return IDirect3DRMMeshBuilder3_GetName(&mesh_builder->IDirect3DRMMeshBuilder3_iface, size, name);
484 }
#define IDirect3DRMMeshBuilder3_GetName(p, a, b)
Definition: d3drmobj.h:2934
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
Definition: name.c:38

◆ d3drm_mesh_builder2_GetPerspective()

static BOOL WINAPI d3drm_mesh_builder2_GetPerspective ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 823 of file meshbuilder.c.

824 {
825  FIXME("iface %p stub!\n", iface);
826 
827  return FALSE;
828 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ d3drm_mesh_builder2_GetQuality()

static D3DRMRENDERQUALITY WINAPI d3drm_mesh_builder2_GetQuality ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 816 of file meshbuilder.c.

817 {
818  FIXME("iface %p stub!\n", iface);
819 
820  return 0;
821 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ d3drm_mesh_builder2_GetTextureCoordinates()

static HRESULT WINAPI d3drm_mesh_builder2_GetTextureCoordinates ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index,
D3DVALUE u,
D3DVALUE v 
)
static

Definition at line 770 of file meshbuilder.c.

772 {
774 
775  TRACE("iface %p, index %u, u %p, v %p.\n", iface, index, u, v);
776 
777  return IDirect3DRMMeshBuilder3_GetTextureCoordinates(&mesh_builder->IDirect3DRMMeshBuilder3_iface,
778  index, u, v);
779 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
const GLdouble * v
Definition: gl.h:2040
#define IDirect3DRMMeshBuilder3_GetTextureCoordinates(p, a, b, c)
Definition: d3drmobj.h:2966

◆ d3drm_mesh_builder2_GetVertexColor()

static D3DCOLOR WINAPI d3drm_mesh_builder2_GetVertexColor ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index 
)
static

Definition at line 848 of file meshbuilder.c.

849 {
850  FIXME("iface %p, index %u stub!\n", iface, index);
851 
852  return 0;
853 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031

◆ d3drm_mesh_builder2_GetVertexCount()

static int WINAPI d3drm_mesh_builder2_GetVertexCount ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 839 of file meshbuilder.c.

840 {
842 
843  TRACE("iface %p.\n", iface);
844 
845  return mesh_builder->nb_vertices;
846 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder2_GetVertices()

static HRESULT WINAPI d3drm_mesh_builder2_GetVertices ( IDirect3DRMMeshBuilder2 *  iface,
DWORD vertex_count,
D3DVECTOR vertices,
DWORD normal_count,
D3DVECTOR normals,
DWORD face_data_size,
DWORD face_data 
)
static

Definition at line 737 of file meshbuilder.c.

740 {
742 
743  TRACE("iface %p, vertex_count %p, vertices %p, normal_count %p, normals %p, face_data_size %p, face_data %p.\n",
744  iface, vertex_count, vertices, normal_count, normals, face_data_size, face_data);
745 
746  if (vertices && (!vertex_count || (*vertex_count < mesh_builder->nb_vertices)))
747  return D3DRMERR_BADVALUE;
748  if (vertex_count)
749  *vertex_count = mesh_builder->nb_vertices;
750  if (vertices && mesh_builder->nb_vertices)
751  memcpy(vertices, mesh_builder->vertices, mesh_builder->nb_vertices * sizeof(*vertices));
752 
753  if (normals && (!normal_count || (*normal_count < mesh_builder->nb_normals)))
754  return D3DRMERR_BADVALUE;
755  if (normal_count)
756  *normal_count = mesh_builder->nb_normals;
757  if (normals && mesh_builder->nb_normals)
758  memcpy(normals, mesh_builder->normals, mesh_builder->nb_normals * sizeof(*normals));
759 
760  if (face_data && (!face_data_size || (*face_data_size < mesh_builder->face_data_size)))
761  return D3DRMERR_BADVALUE;
762  if (face_data_size)
763  *face_data_size = mesh_builder->face_data_size;
764  if (face_data && mesh_builder->face_data_size)
765  memcpy(face_data, mesh_builder->pFaceData, mesh_builder->face_data_size * sizeof(*face_data));
766 
767  return D3DRM_OK;
768 }
int vertex_count
Definition: d3drm.c:3367
int face_data_size
Definition: d3drm.c:3370
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
D3DVECTOR * vertices
#define D3DRMERR_BADVALUE
Definition: d3drm.h:496
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
D3DVECTOR * normals
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder2_Load()

static HRESULT WINAPI d3drm_mesh_builder2_Load ( IDirect3DRMMeshBuilder2 *  iface,
void filename,
void name,
D3DRMLOADOPTIONS  flags,
D3DRMLOADTEXTURECALLBACK  cb,
void ctx 
)
static

Definition at line 495 of file meshbuilder.c.

497 {
499 
500  TRACE("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p.\n",
501  iface, filename, name, flags, cb, ctx);
502 
503  if (cb)
504  FIXME("Texture callback is not yet supported\n");
505 
506  return IDirect3DRMMeshBuilder3_Load(&mesh_builder->IDirect3DRMMeshBuilder3_iface,
507  filename, name, flags, NULL, ctx);
508 }
#define IDirect3DRMMeshBuilder3_Load(p, a, b, c, d, e)
Definition: d3drmobj.h:2938
const char * filename
Definition: ioapi.h:135
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
Definition: name.c:38

◆ d3drm_mesh_builder2_QueryInterface()

static HRESULT WINAPI d3drm_mesh_builder2_QueryInterface ( IDirect3DRMMeshBuilder2 *  iface,
REFIID  riid,
void **  out 
)
static

Definition at line 341 of file meshbuilder.c.

342 {
344 
345  TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
346 
347  if (IsEqualGUID(riid, &IID_IDirect3DRMMeshBuilder2)
348  || IsEqualGUID(riid, &IID_IDirect3DRMMeshBuilder)
349  || IsEqualGUID(riid, &IID_IDirect3DRMVisual)
350  || IsEqualGUID(riid, &IID_IDirect3DRMObject)
352  {
353  *out = &mesh_builder->IDirect3DRMMeshBuilder2_iface;
354  }
355  else if (IsEqualGUID(riid, &IID_IDirect3DRMMeshBuilder3))
356  {
357  *out = &mesh_builder->IDirect3DRMMeshBuilder3_iface;
358  }
359  else
360  {
361  *out = NULL;
362  WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
363  return E_NOINTERFACE;
364  }
365 
366  IUnknown_AddRef((IUnknown *)*out);
367  return S_OK;
368 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static FILE * out
Definition: regtests2xml.c:44
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

Referenced by d3drm_mesh_builder3_QueryInterface().

◆ d3drm_mesh_builder2_Release()

static ULONG WINAPI d3drm_mesh_builder2_Release ( IDirect3DRMMeshBuilder2 *  iface)
static

Definition at line 380 of file meshbuilder.c.

381 {
383  ULONG refcount = InterlockedDecrement(&mesh_builder->ref);
384 
385  TRACE("%p decreasing refcount to %u.\n", mesh_builder, refcount);
386 
387  if (!refcount)
388  {
389  d3drm_object_cleanup((IDirect3DRMObject *)iface, &mesh_builder->obj);
391  if (mesh_builder->material)
393  if (mesh_builder->texture)
397  }
398 
399  return refcount;
400 }
void d3drm_object_cleanup(IDirect3DRMObject *iface, struct d3drm_object *object)
Definition: d3drm_main.c:153
static void clean_mesh_builder_data(struct d3drm_mesh_builder *mesh_builder)
Definition: meshbuilder.c:307
#define IDirect3DRMMaterial2_Release(p)
Definition: d3drmobj.h:3732
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMTexture3_Release(p)
Definition: d3drmobj.h:3476
unsigned int ULONG
Definition: retypes.h:1
#define IDirect3DRM_Release(p)
Definition: d3drm.h:111
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by d3drm_mesh_builder3_Release().

◆ d3drm_mesh_builder2_ReserveSpace()

static HRESULT WINAPI d3drm_mesh_builder2_ReserveSpace ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  vertex_count,
DWORD  normal_count,
DWORD  face_count 
)
static

Definition at line 604 of file meshbuilder.c.

606 {
607  FIXME("iface %p, vertex_count %u, normal_count %u, face_count %u stub!\n",
608  iface, vertex_count, normal_count, face_count);
609 
610  return E_NOTIMPL;
611 }
int vertex_count
Definition: d3drm.c:3367
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
int face_count
Definition: d3drm.c:3368

◆ d3drm_mesh_builder2_Save()

static HRESULT WINAPI d3drm_mesh_builder2_Save ( IDirect3DRMMeshBuilder2 *  iface,
const char filename,
D3DRMXOFFORMAT  format,
D3DRMSAVEOPTIONS  flags 
)
static

Definition at line 510 of file meshbuilder.c.

512 {
513  FIXME("iface %p, filename %s, format %#x, flags %#x stub!\n",
514  iface, debugstr_a(filename), format, flags);
515 
516  return E_NOTIMPL;
517 }
const char * filename
Definition: ioapi.h:135
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_Scale()

static HRESULT WINAPI d3drm_mesh_builder2_Scale ( IDirect3DRMMeshBuilder2 *  iface,
D3DVALUE  sx,
D3DVALUE  sy,
D3DVALUE  sz 
)
static

Definition at line 519 of file meshbuilder.c.

521 {
523 
524  TRACE("iface %p, sx %.8e, sy %.8e, sz %.8e.\n", iface, sx, sy, sz);
525 
526  return IDirect3DRMMeshBuilder3_Scale(&mesh_builder->IDirect3DRMMeshBuilder3_iface, sx, sy, sz);
527 }
#define TRACE(s)
Definition: solgame.cpp:4
#define IDirect3DRMMeshBuilder3_Scale(p, a, b, c)
Definition: d3drmobj.h:2940
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder2_SetAppData()

static HRESULT WINAPI d3drm_mesh_builder2_SetAppData ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  data 
)
static

Definition at line 441 of file meshbuilder.c.

442 {
444 
445  TRACE("iface %p, data %#x.\n", iface, data);
446 
447  return d3drm_mesh_builder3_SetAppData(&mesh_builder->IDirect3DRMMeshBuilder3_iface, data);
448 }
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static HRESULT WINAPI d3drm_mesh_builder3_SetAppData(IDirect3DRMMeshBuilder3 *iface, DWORD data)
Definition: meshbuilder.c:430

◆ d3drm_mesh_builder2_SetColor()

static HRESULT WINAPI d3drm_mesh_builder2_SetColor ( IDirect3DRMMeshBuilder2 *  iface,
D3DCOLOR  color 
)
static

Definition at line 623 of file meshbuilder.c.

624 {
626 
627  TRACE("iface %p, color 0x%08x.\n", iface, color);
628 
629  return IDirect3DRMMeshBuilder3_SetColor(&mesh_builder->IDirect3DRMMeshBuilder3_iface, color);
630 }
GLuint color
Definition: glext.h:6243
#define TRACE(s)
Definition: solgame.cpp:4
#define IDirect3DRMMeshBuilder3_SetColor(p, a)
Definition: d3drmobj.h:2953
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder2_SetColorRGB()

static HRESULT WINAPI d3drm_mesh_builder2_SetColorRGB ( IDirect3DRMMeshBuilder2 *  iface,
D3DVALUE  red,
D3DVALUE  green,
D3DVALUE  blue 
)
static

Definition at line 613 of file meshbuilder.c.

615 {
617 
618  TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface, red, green, blue);
619 
620  return IDirect3DRMMeshBuilder3_SetColorRGB(&mesh_builder->IDirect3DRMMeshBuilder3_iface, red, green, blue);
621 }
#define IDirect3DRMMeshBuilder3_SetColorRGB(p, a, b, c)
Definition: d3drmobj.h:2952
GLclampf GLclampf blue
Definition: gl.h:1740
#define TRACE(s)
Definition: solgame.cpp:4
GLclampf green
Definition: gl.h:1740
#define red
Definition: linetest.c:67
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder2_SetColorSource()

static HRESULT WINAPI d3drm_mesh_builder2_SetColorSource ( IDirect3DRMMeshBuilder2 *  iface,
D3DRMCOLORSOURCE  source 
)
static

Definition at line 537 of file meshbuilder.c.

538 {
539  FIXME("iface %p, source %#x stub!\n", iface, source);
540 
541  return E_NOTIMPL;
542 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_SetMaterial()

static HRESULT WINAPI d3drm_mesh_builder2_SetMaterial ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMMaterial *  material 
)
static

Definition at line 651 of file meshbuilder.c.

653 {
655 
656  TRACE("iface %p, material %p.\n", iface, material);
657 
658  return IDirect3DRMMeshBuilder3_SetMaterial(&mesh_builder->IDirect3DRMMeshBuilder3_iface,
659  (IDirect3DRMMaterial2 *)material);
660 }
IDirect3DRMMaterial2 * material
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMMeshBuilder3_SetMaterial(p, a)
Definition: d3drmobj.h:2955

◆ d3drm_mesh_builder2_SetName()

static HRESULT WINAPI d3drm_mesh_builder2_SetName ( IDirect3DRMMeshBuilder2 *  iface,
const char name 
)
static

Definition at line 468 of file meshbuilder.c.

469 {
471 
472  TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
473 
474  return IDirect3DRMMeshBuilder3_SetName(&mesh_builder->IDirect3DRMMeshBuilder3_iface, name);
475 }
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
Definition: name.c:38
#define IDirect3DRMMeshBuilder3_SetName(p, a)
Definition: d3drmobj.h:2933

◆ d3drm_mesh_builder2_SetNormal()

static HRESULT WINAPI d3drm_mesh_builder2_SetNormal ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 693 of file meshbuilder.c.

695 {
696  FIXME("iface %p, index %u, x %.8e, y %.8e, z %.8e stub!\n", iface, index, x, y, z);
697 
698  return E_NOTIMPL;
699 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define FIXME(fmt,...)
Definition: debug.h:110
GLdouble GLdouble z
Definition: glext.h:5874
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder2_SetPerspective()

static HRESULT WINAPI d3drm_mesh_builder2_SetPerspective ( IDirect3DRMMeshBuilder2 *  iface,
BOOL  enable 
)
static

Definition at line 678 of file meshbuilder.c.

679 {
680  FIXME("iface %p, enable %#x stub!\n", iface, enable);
681 
682  return E_NOTIMPL;
683 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLboolean enable
Definition: glext.h:11120
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_SetQuality()

static HRESULT WINAPI d3drm_mesh_builder2_SetQuality ( IDirect3DRMMeshBuilder2 *  iface,
D3DRMRENDERQUALITY  quality 
)
static

Definition at line 670 of file meshbuilder.c.

672 {
673  FIXME("iface %p, quality %#x stub!\n", iface, quality);
674 
675  return E_NOTIMPL;
676 }
#define FIXME(fmt,...)
Definition: debug.h:110
int quality
Definition: jpeglib.h:991
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_SetTexture()

static HRESULT WINAPI d3drm_mesh_builder2_SetTexture ( IDirect3DRMMeshBuilder2 *  iface,
IDirect3DRMTexture *  texture 
)
static

Definition at line 632 of file meshbuilder.c.

634 {
636  IDirect3DRMTexture3 *texture3 = NULL;
637  HRESULT hr = D3DRM_OK;
638 
639  TRACE("iface %p, texture %p.\n", iface, texture);
640 
641  if (texture)
642  hr = IDirect3DRMTexture_QueryInterface(texture, &IID_IDirect3DRMTexture3, (void **)&texture3);
643  if (SUCCEEDED(hr))
644  hr = IDirect3DRMMeshBuilder3_SetTexture(&mesh_builder->IDirect3DRMMeshBuilder3_iface, texture3);
645  if (texture3)
646  IDirect3DRMTexture3_Release(texture3);
647 
648  return hr;
649 }
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
#define IDirect3DRMMeshBuilder3_SetTexture(p, a)
Definition: d3drmobj.h:2954
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLuint texture
Definition: glext.h:6295
LONG HRESULT
Definition: typedefs.h:77
#define D3DRM_OK
Definition: d3drm.h:486
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMTexture3_Release(p)
Definition: d3drmobj.h:3476
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define IDirect3DRMTexture_QueryInterface(p, a, b)
Definition: d3drmobj.h:3230

◆ d3drm_mesh_builder2_SetTextureCoordinates()

static HRESULT WINAPI d3drm_mesh_builder2_SetTextureCoordinates ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index,
D3DVALUE  u,
D3DVALUE  v 
)
static

Definition at line 701 of file meshbuilder.c.

703 {
705 
706  TRACE("iface %p, index %u, u %.8e, v %.8e.\n", iface, index, u, v);
707 
708  return IDirect3DRMMeshBuilder3_SetTextureCoordinates(&mesh_builder->IDirect3DRMMeshBuilder3_iface,
709  index, u, v);
710 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
#define IDirect3DRMMeshBuilder3_SetTextureCoordinates(p, a, b, c)
Definition: d3drmobj.h:2961
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder2(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:292
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
const GLdouble * v
Definition: gl.h:2040

◆ d3drm_mesh_builder2_SetTextureTopology()

static HRESULT WINAPI d3drm_mesh_builder2_SetTextureTopology ( IDirect3DRMMeshBuilder2 *  iface,
BOOL  wrap_u,
BOOL  wrap_v 
)
static

Definition at line 662 of file meshbuilder.c.

664 {
665  FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface, wrap_u, wrap_v);
666 
667  return E_NOTIMPL;
668 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_SetVertex()

static HRESULT WINAPI d3drm_mesh_builder2_SetVertex ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 685 of file meshbuilder.c.

687 {
688  FIXME("iface %p, index %u, x %.8e, y %.8e, z %.8e stub!\n", iface, index, x, y, z);
689 
690  return E_NOTIMPL;
691 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define FIXME(fmt,...)
Definition: debug.h:110
GLdouble GLdouble z
Definition: glext.h:5874
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder2_SetVertexColor()

static HRESULT WINAPI d3drm_mesh_builder2_SetVertexColor ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index,
D3DCOLOR  color 
)
static

Definition at line 712 of file meshbuilder.c.

714 {
715  FIXME("iface %p, index %u, color 0x%08x stub!\n", iface, index, color);
716 
717  return E_NOTIMPL;
718 }
GLuint color
Definition: glext.h:6243
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_SetVertexColorRGB()

static HRESULT WINAPI d3drm_mesh_builder2_SetVertexColorRGB ( IDirect3DRMMeshBuilder2 *  iface,
DWORD  index,
D3DVALUE  red,
D3DVALUE  green,
D3DVALUE  blue 
)
static

Definition at line 720 of file meshbuilder.c.

722 {
723  FIXME("iface %p, index %u, red %.8e, green %.8e, blue %.8e stub!\n",
724  iface, index, red, green, blue);
725 
726  return E_NOTIMPL;
727 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
GLclampf GLclampf blue
Definition: gl.h:1740
GLclampf green
Definition: gl.h:1740
#define red
Definition: linetest.c:67
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder2_Translate()

static HRESULT WINAPI d3drm_mesh_builder2_Translate ( IDirect3DRMMeshBuilder2 *  iface,
D3DVALUE  tx,
D3DVALUE  ty,
D3DVALUE  tz 
)
static

Definition at line 529 of file meshbuilder.c.

531 {
532  FIXME("iface %p, tx %.8e, ty %.8e, tz %.8e stub!\n", iface, tx, ty, tz);
533 
534  return E_NOTIMPL;
535 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLbyte ty
Definition: glext.h:8756
#define E_NOTIMPL
Definition: ddrawi.h:99
GLbyte GLbyte tz
Definition: glext.h:8756

◆ d3drm_mesh_builder3_AddDestroyCallback()

static HRESULT WINAPI d3drm_mesh_builder3_AddDestroyCallback ( IDirect3DRMMeshBuilder3 *  iface,
D3DRMOBJECTCALLBACK  cb,
void ctx 
)
static

Definition at line 970 of file meshbuilder.c.

972 {
974 
975  TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
976 
978 }
HRESULT d3drm_object_add_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:55
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32

◆ d3drm_mesh_builder3_AddFace()

static HRESULT WINAPI d3drm_mesh_builder3_AddFace ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMFace2 *  face 
)
static

Definition at line 1665 of file meshbuilder.c.

1666 {
1667  FIXME("iface %p, face %p stub!\n", iface, face);
1668 
1669  return E_NOTIMPL;
1670 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ d3drm_mesh_builder3_AddFaces()

static HRESULT WINAPI d3drm_mesh_builder3_AddFaces ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  vertex_count,
D3DVECTOR vertices,
DWORD  normal_count,
D3DVECTOR normals,
DWORD face_data,
IDirect3DRMFaceArray **  array 
)
static

Definition at line 1672 of file meshbuilder.c.

1675 {
1676  FIXME("iface %p, vertex_count %u, vertices %p, normal_count %u, normals %p, face_data %p array %p stub!\n",
1677  iface, vertex_count, vertices, normal_count, normals, face_data, array);
1678 
1679  return E_NOTIMPL;
1680 }
int vertex_count
Definition: d3drm.c:3367
#define FIXME(fmt,...)
Definition: debug.h:110
D3DVECTOR * vertices
D3DVECTOR * normals
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_AddFacesIndexed()

static HRESULT WINAPI d3drm_mesh_builder3_AddFacesIndexed ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  flags,
DWORD indices,
DWORD start_idx,
DWORD count 
)
static

Definition at line 2138 of file meshbuilder.c.

2140 {
2141  FIXME("iface %p, flags %#x, indices %p, start_idx %p, count %p stub!\n",
2142  iface, flags, indices, start_idx, count);
2143 
2144  return E_NOTIMPL;
2145 }
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_AddFrame()

static HRESULT WINAPI d3drm_mesh_builder3_AddFrame ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMFrame3 *  frame 
)
static

Definition at line 1658 of file meshbuilder.c.

1659 {
1660  FIXME("iface %p, frame %p stub!\n", iface, frame);
1661 
1662  return E_NOTIMPL;
1663 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_AddMesh()

static HRESULT WINAPI d3drm_mesh_builder3_AddMesh ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMMesh *  mesh 
)
static

Definition at line 1643 of file meshbuilder.c.

1644 {
1645  FIXME("iface %p, mesh %p stub!\n", iface, mesh);
1646 
1647  return E_NOTIMPL;
1648 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_AddMeshBuilder()

static HRESULT WINAPI d3drm_mesh_builder3_AddMeshBuilder ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMMeshBuilder3 *  mesh_builder,
DWORD  flags 
)
static

Definition at line 1650 of file meshbuilder.c.

1652 {
1653  FIXME("iface %p, mesh_builder %p, flags %#x stub!\n", iface, mesh_builder, flags);
1654 
1655  return E_NOTIMPL;
1656 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLbitfield flags
Definition: glext.h:7161
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_AddNormal()

static int WINAPI d3drm_mesh_builder3_AddNormal ( IDirect3DRMMeshBuilder3 *  iface,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 1872 of file meshbuilder.c.

1874 {
1876 
1877  TRACE("iface %p, x %.8e, y %.8e, z %.8e.\n", iface, x, y, z);
1878 
1879  if (!d3drm_array_reserve((void **)&mesh_builder->normals, &mesh_builder->normals_size,
1880  mesh_builder->nb_normals + 1, sizeof(*mesh_builder->normals)))
1881  return 0;
1882 
1883  mesh_builder->normals[mesh_builder->nb_normals].u1.x = x;
1884  mesh_builder->normals[mesh_builder->nb_normals].u2.y = y;
1885  mesh_builder->normals[mesh_builder->nb_normals].u3.z = z;
1886 
1887  return mesh_builder->nb_normals++;
1888 }
BOOL d3drm_array_reserve(void **elements, SIZE_T *capacity, SIZE_T element_count, SIZE_T element_size)
Definition: meshbuilder.c:260
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder3_AddRef()

static ULONG WINAPI d3drm_mesh_builder3_AddRef ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 944 of file meshbuilder.c.

945 {
947 
948  TRACE("iface %p.\n", iface);
949 
950  return d3drm_mesh_builder2_AddRef(&mesh_builder->IDirect3DRMMeshBuilder2_iface);
951 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG WINAPI d3drm_mesh_builder2_AddRef(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:370
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_AddTriangles()

static HRESULT WINAPI d3drm_mesh_builder3_AddTriangles ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  flags,
DWORD  format,
DWORD  vertex_count,
void data 
)
static

Definition at line 2191 of file meshbuilder.c.

2193 {
2194  FIXME("iface %p, flags %#x, format %#x, vertex_count %u, data %p stub!\n",
2195  iface, flags, format, vertex_count, data);
2196 
2197  return E_NOTIMPL;
2198 }
int vertex_count
Definition: d3drm.c:3367
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define FIXME(fmt,...)
Definition: debug.h:110
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_AddVertex()

static int WINAPI d3drm_mesh_builder3_AddVertex ( IDirect3DRMMeshBuilder3 *  iface,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 1854 of file meshbuilder.c.

1856 {
1858 
1859  TRACE("iface %p, x %.8e, y %.8e, z %.8e.\n", iface, x, y, z);
1860 
1861  if (!d3drm_array_reserve((void **)&mesh_builder->vertices, &mesh_builder->vertices_size,
1862  mesh_builder->nb_vertices + 1, sizeof(*mesh_builder->vertices)))
1863  return 0;
1864 
1865  mesh_builder->vertices[mesh_builder->nb_vertices].u1.x = x;
1866  mesh_builder->vertices[mesh_builder->nb_vertices].u2.y = y;
1867  mesh_builder->vertices[mesh_builder->nb_vertices].u3.z = z;
1868 
1869  return mesh_builder->nb_vertices++;
1870 }
BOOL d3drm_array_reserve(void **elements, SIZE_T *capacity, SIZE_T element_count, SIZE_T element_size)
Definition: meshbuilder.c:260
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder3_Clone()

static HRESULT WINAPI d3drm_mesh_builder3_Clone ( IDirect3DRMMeshBuilder3 *  iface,
IUnknown outer,
REFIID  iid,
void **  out 
)
static

Definition at line 962 of file meshbuilder.c.

964 {
965  FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
966 
967  return E_NOTIMPL;
968 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static FILE * out
Definition: regtests2xml.c:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_CreateFace()

static HRESULT WINAPI d3drm_mesh_builder3_CreateFace ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMFace2 **  face 
)
static

Definition at line 1890 of file meshbuilder.c.

1891 {
1892  struct d3drm_face *object;
1893  HRESULT hr;
1894 
1895  TRACE("iface %p, face %p.\n", iface, face);
1896 
1897  if (FAILED(hr = d3drm_face_create(&object)))
1898  return hr;
1899 
1900  *face = &object->IDirect3DRMFace2_iface;
1901 
1902  return S_OK;
1903 }
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
HRESULT d3drm_face_create(struct d3drm_face **face) DECLSPEC_HIDDEN
Definition: face.c:620
#define S_OK
Definition: intsafe.h:59
void * object
Definition: jmemsys.h:48
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ d3drm_mesh_builder3_CreateMesh()

static HRESULT WINAPI d3drm_mesh_builder3_CreateMesh ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMMesh **  mesh 
)
static

Definition at line 1945 of file meshbuilder.c.

1946 {
1948  HRESULT hr;
1950 
1951  TRACE("iface %p, mesh %p.\n", iface, mesh);
1952 
1953  if (!mesh)
1954  return E_POINTER;
1955 
1956  hr = IDirect3DRM_CreateMesh(mesh_builder->d3drm, mesh);
1957  if (FAILED(hr))
1958  return hr;
1959 
1960  /* If there is mesh data, create a group and put data inside */
1961  if (mesh_builder->nb_vertices)
1962  {
1963  DWORD i, j;
1964  int k;
1966 
1967  if (!(vertices = heap_calloc(mesh_builder->nb_vertices, sizeof(*vertices))))
1968  {
1969  IDirect3DRMMesh_Release(*mesh);
1970  return E_OUTOFMEMORY;
1971  }
1972  for (i = 0; i < mesh_builder->nb_vertices; i++)
1973  vertices[i].position = mesh_builder->vertices[i];
1974  hr = IDirect3DRMMesh_SetVertices(*mesh, 0, 0, mesh_builder->nb_vertices, vertices);
1976 
1977  /* Groups are in reverse order compared to materials list in X file */
1978  for (k = mesh_builder->nb_materials - 1; k >= 0; k--)
1979  {
1980  unsigned* face_data;
1981  unsigned* out_ptr;
1982  DWORD* in_ptr = mesh_builder->pFaceData;
1983  ULONG vertex_per_face = 0;
1984  BOOL* used_vertices;
1985  unsigned nb_vertices = 0;
1986  unsigned nb_faces = 0;
1987 
1988  if (!(used_vertices = heap_calloc(mesh_builder->face_data_size, sizeof(*used_vertices))))
1989  {
1990  IDirect3DRMMesh_Release(*mesh);
1991  return E_OUTOFMEMORY;
1992  }
1993 
1994  if (!(face_data = heap_calloc(mesh_builder->face_data_size, sizeof(*face_data))))
1995  {
1996  heap_free(used_vertices);
1997  IDirect3DRMMesh_Release(*mesh);
1998  return E_OUTOFMEMORY;
1999  }
2000  out_ptr = face_data;
2001 
2002  /* If all faces have the same number of vertex, set vertex_per_face */
2003  for (i = 0; i < mesh_builder->nb_faces; i++)
2004  {
2005  /* Process only faces belonging to the group */
2006  if (mesh_builder->material_indices[i] == k)
2007  {
2008  if (vertex_per_face && (vertex_per_face != *in_ptr))
2009  break;
2010  vertex_per_face = *in_ptr;
2011  }
2012  in_ptr += 1 + *in_ptr * 2;
2013  }
2014  if (i != mesh_builder->nb_faces)
2015  vertex_per_face = 0;
2016 
2017  /* Put only vertex indices */
2018  in_ptr = mesh_builder->pFaceData;
2019  for (i = 0; i < mesh_builder->nb_faces; i++)
2020  {
2021  DWORD nb_indices = *in_ptr++;
2022 
2023  /* Skip faces not belonging to the group */
2024  if (mesh_builder->material_indices[i] != k)
2025  {
2026  in_ptr += 2 * nb_indices;
2027  continue;
2028  }
2029 
2030  /* Don't put nb indices when vertex_per_face is set */
2031  if (vertex_per_face)
2032  *out_ptr++ = nb_indices;
2033 
2034  for (j = 0; j < nb_indices; j++)
2035  {
2036  *out_ptr = *in_ptr++;
2037  used_vertices[*out_ptr++] = TRUE;
2038  /* Skip normal index */
2039  in_ptr++;
2040  }
2041 
2042  nb_faces++;
2043  }
2044 
2045  for (i = 0; i < mesh_builder->nb_vertices; i++)
2046  if (used_vertices[i])
2047  nb_vertices++;
2048 
2050  heap_free(used_vertices);
2051  heap_free(face_data);
2052  if (SUCCEEDED(hr))
2053  hr = IDirect3DRMMesh_SetGroupColor(*mesh, group, mesh_builder->materials[k].color);
2054  if (SUCCEEDED(hr))
2056  (IDirect3DRMMaterial *)mesh_builder->materials[k].material);
2057  if (SUCCEEDED(hr) && mesh_builder->materials[k].texture)
2058  {
2059  IDirect3DRMTexture *texture;
2060 
2062  &IID_IDirect3DRMTexture, (void **)&texture);
2065  }
2066  if (FAILED(hr))
2067  {
2068  IDirect3DRMMesh_Release(*mesh);
2069  return hr;
2070  }
2071  }
2072  }
2073 
2074  return D3DRM_OK;
2075 }
#define TRUE
Definition: types.h:120
#define IDirect3DRM_CreateMesh(p, a)
Definition: d3drm.h:115
#define IDirect3DRMMesh_SetGroupTexture(p, a, b)
Definition: d3drmobj.h:1962
HRESULT hr
Definition: shlfolder.c:183
#define IDirect3DRMMesh_SetVertices(p, a, b, c, d)
Definition: d3drmobj.h:1956
static void * heap_calloc(SIZE_T count, SIZE_T size)
Definition: heap.h:49
int vertex_per_face
Definition: d3drm.c:3369
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
GLboolean GLuint group
Definition: glext.h:11120
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLuint texture
Definition: glext.h:6295
LONG HRESULT
Definition: typedefs.h:77
#define D3DRM_OK
Definition: d3drm.h:486
D3DVECTOR * vertices
#define IDirect3DRMMesh_SetGroupMaterial(p, a, b)
Definition: d3drmobj.h:1961
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IDirect3DRMMesh_AddGroup(p, a, b, c, d, e)
Definition: d3drmobj.h:1955
LONG D3DRMGROUPINDEX
Definition: d3drmdef.h:431
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMMesh_Release(p)
Definition: d3drmobj.h:1941
#define IDirect3DRMMesh_SetGroupColor(p, a, b)
Definition: d3drmobj.h:1957
#define IDirect3DRMTexture3_QueryInterface(p, a, b)
Definition: d3drmobj.h:3474
unsigned int ULONG
Definition: retypes.h:1
#define E_POINTER
Definition: winerror.h:2365
int k
Definition: mpi.c:3369
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define IDirect3DRMTexture_Release(p)
Definition: d3drmobj.h:3232

◆ d3drm_mesh_builder3_CreateSubMesh()

static HRESULT WINAPI d3drm_mesh_builder3_CreateSubMesh ( IDirect3DRMMeshBuilder3 *  iface,
IUnknown **  mesh 
)
static

Definition at line 2147 of file meshbuilder.c.

2148 {
2149  FIXME("iface %p, mesh %p stub!\n", iface, mesh);
2150 
2151  return E_NOTIMPL;
2152 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_DeleteDestroyCallback()

static HRESULT WINAPI d3drm_mesh_builder3_DeleteDestroyCallback ( IDirect3DRMMeshBuilder3 *  iface,
D3DRMOBJECTCALLBACK  cb,
void ctx 
)
static

Definition at line 980 of file meshbuilder.c.

982 {
984 
985  TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
986 
988 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT d3drm_object_delete_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:72
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32

◆ d3drm_mesh_builder3_DeleteFace()

static HRESULT WINAPI d3drm_mesh_builder3_DeleteFace ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMFace2 *  face 
)
static

Definition at line 2117 of file meshbuilder.c.

2118 {
2119  FIXME("iface %p, face %p stub!\n", iface, face);
2120 
2121  return E_NOTIMPL;
2122 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ d3drm_mesh_builder3_DeleteNormals()

static HRESULT WINAPI d3drm_mesh_builder3_DeleteNormals ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  start_idx,
DWORD  count 
)
static

Definition at line 2109 of file meshbuilder.c.

2111 {
2112  FIXME("iface %p, start_idx %u, count %u stub!\n", iface, start_idx, count);
2113 
2114  return E_NOTIMPL;
2115 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_DeleteSubMesh()

static HRESULT WINAPI d3drm_mesh_builder3_DeleteSubMesh ( IDirect3DRMMeshBuilder3 *  iface,
IUnknown mesh 
)
static

Definition at line 2170 of file meshbuilder.c.

2171 {
2172  FIXME("iface %p, mesh %p stub!\n", iface, mesh);
2173 
2174  return E_NOTIMPL;
2175 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_DeleteVertices()

static HRESULT WINAPI d3drm_mesh_builder3_DeleteVertices ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  start_idx,
DWORD  count 
)
static

Definition at line 2101 of file meshbuilder.c.

2103 {
2104  FIXME("iface %p, start_idx %u, count %u stub!\n", iface, start_idx, count);
2105 
2106  return E_NOTIMPL;
2107 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_Empty()

static HRESULT WINAPI d3drm_mesh_builder3_Empty ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  flags 
)
static

Definition at line 2124 of file meshbuilder.c.

2125 {
2126  FIXME("iface %p, flags %#x stub!\n", iface, flags);
2127 
2128  return E_NOTIMPL;
2129 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_Enable()

static HRESULT WINAPI d3drm_mesh_builder3_Enable ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index 
)
static

Definition at line 2177 of file meshbuilder.c.

2178 {
2179  FIXME("iface %p, index %u stub!\n", iface, index);
2180 
2181  return E_NOTIMPL;
2182 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GenerateNormals()

static HRESULT WINAPI d3drm_mesh_builder3_GenerateNormals ( IDirect3DRMMeshBuilder3 *  iface,
D3DVALUE  crease,
DWORD  flags 
)
static

Definition at line 1628 of file meshbuilder.c.

1630 {
1631  FIXME("iface %p, crease %.8e, flags %#x stub!\n", iface, crease, flags);
1632 
1633  return E_NOTIMPL;
1634 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetAppData()

static DWORD WINAPI d3drm_mesh_builder3_GetAppData ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 450 of file meshbuilder.c.

451 {
453 
454  TRACE("iface %p.\n", iface);
455 
456  return mesh_builder->obj.appdata;
457 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

Referenced by d3drm_mesh_builder2_GetAppData().

◆ d3drm_mesh_builder3_GetBox()

static HRESULT WINAPI d3drm_mesh_builder3_GetBox ( IDirect3DRMMeshBuilder3 *  iface,
D3DRMBOX box 
)
static

Definition at line 1621 of file meshbuilder.c.

1622 {
1623  FIXME("iface %p, box %p stub!\n", iface, box);
1624 
1625  return E_NOTIMPL;
1626 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: palette.c:467

◆ d3drm_mesh_builder3_GetClassName()

static HRESULT WINAPI d3drm_mesh_builder3_GetClassName ( IDirect3DRMMeshBuilder3 *  iface,
DWORD size,
char name 
)
static

Definition at line 1009 of file meshbuilder.c.

1011 {
1012  struct d3drm_mesh_builder *meshbuilder = impl_from_IDirect3DRMMeshBuilder3(iface);
1013 
1014  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
1015 
1016  return d3drm_object_get_class_name(&meshbuilder->obj, size, name);
1017 }
HRESULT d3drm_object_get_class_name(struct d3drm_object *object, DWORD *size, char *name)
Definition: d3drm_main.c:92
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
Definition: name.c:38
struct d3drm_object obj

◆ d3drm_mesh_builder3_GetColorSource()

static D3DRMCOLORSOURCE WINAPI d3drm_mesh_builder3_GetColorSource ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 1636 of file meshbuilder.c.

1637 {
1638  FIXME("iface %p stub!\n", iface);
1639 
1640  return E_NOTIMPL;
1641 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetEnable()

static HRESULT WINAPI d3drm_mesh_builder3_GetEnable ( IDirect3DRMMeshBuilder3 *  iface,
DWORD indices 
)
static

Definition at line 2184 of file meshbuilder.c.

2185 {
2186  FIXME("iface %p, indices %p stub!\n", iface, indices);
2187 
2188  return E_NOTIMPL;
2189 }
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetFace()

static HRESULT WINAPI d3drm_mesh_builder3_GetFace ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
IDirect3DRMFace2 **  face 
)
static

Definition at line 2077 of file meshbuilder.c.

2079 {
2080  FIXME("iface %p, index %u, face %p stub!\n", iface, index, face);
2081 
2082  return E_NOTIMPL;
2083 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ d3drm_mesh_builder3_GetFaceCount()

static int WINAPI d3drm_mesh_builder3_GetFaceCount ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 1919 of file meshbuilder.c.

1920 {
1922 
1923  TRACE("iface %p.\n", iface);
1924 
1925  return mesh_builder->nb_faces;
1926 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_GetFaces()

static HRESULT WINAPI d3drm_mesh_builder3_GetFaces ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMFaceArray **  array 
)
static

Definition at line 1819 of file meshbuilder.c.

1821 {
1822  FIXME("iface %p, array %p stub!\n", iface, array);
1823 
1824  return E_NOTIMPL;
1825 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetGeometry()

static HRESULT WINAPI d3drm_mesh_builder3_GetGeometry ( IDirect3DRMMeshBuilder3 *  iface,
DWORD vertex_count,
D3DVECTOR vertices,
DWORD normal_count,
D3DVECTOR normals,
DWORD face_data_size,
DWORD face_data 
)
static

Definition at line 1827 of file meshbuilder.c.

1830 {
1831  FIXME("iface %p, vertex_count %p, vertices %p, normal_count %p, normals %p, "
1832  "face_data_size %p, face_data %p stub!\n",
1833  iface, vertex_count, vertices, normal_count, normals, face_data_size, face_data);
1834 
1835  return E_NOTIMPL;
1836 }
int vertex_count
Definition: d3drm.c:3367
int face_data_size
Definition: d3drm.c:3370
#define FIXME(fmt,...)
Definition: debug.h:110
D3DVECTOR * vertices
D3DVECTOR * normals
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetName()

static HRESULT WINAPI d3drm_mesh_builder3_GetName ( IDirect3DRMMeshBuilder3 *  iface,
DWORD size,
char name 
)
static

Definition at line 999 of file meshbuilder.c.

1001 {
1003 
1004  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
1005 
1006  return d3drm_object_get_name(&mesh_builder->obj, size, name);
1007 }
HRESULT d3drm_object_get_name(struct d3drm_object *object, DWORD *size, char *name)
Definition: d3drm_main.c:111
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
Definition: name.c:38

◆ d3drm_mesh_builder3_GetNormal()

static HRESULT WINAPI d3drm_mesh_builder3_GetNormal ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DVECTOR vector 
)
static

Definition at line 2093 of file meshbuilder.c.

2095 {
2096  FIXME("iface %p, index %u, vector %p stub!\n", iface, index, vector);
2097 
2098  return E_NOTIMPL;
2099 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetNormalCount()

static int WINAPI d3drm_mesh_builder3_GetNormalCount ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 2251 of file meshbuilder.c.

2252 {
2254 
2255  TRACE("iface %p.\n", iface);
2256 
2257  return mesh_builder->nb_normals;
2258 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_GetNormals()

static HRESULT WINAPI d3drm_mesh_builder3_GetNormals ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  start_idx,
DWORD normal_count,
D3DVECTOR normals 
)
static

Definition at line 2234 of file meshbuilder.c.

2236 {
2238  DWORD count = mesh_builder->nb_normals - start_idx;
2239 
2240  TRACE("iface %p, start_idx %u, normal_count %p, normals %p.\n",
2241  iface, start_idx, normal_count, normals);
2242 
2243  if (normal_count)
2244  *normal_count = count;
2245  if (normals && mesh_builder->nb_normals)
2246  memcpy(normals, &mesh_builder->normals[start_idx], count * sizeof(*normals));
2247 
2248  return D3DRM_OK;
2249 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
D3DVECTOR * normals
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_GetParentMesh()

static HRESULT WINAPI d3drm_mesh_builder3_GetParentMesh ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  flags,
IUnknown **  parent 
)
static

Definition at line 2154 of file meshbuilder.c.

2156 {
2157  FIXME("iface %p, flags %#x, parent %p stub!\n", iface, flags, parent);
2158 
2159  return E_NOTIMPL;
2160 }
#define FIXME(fmt,...)
Definition: debug.h:110
r parent
Definition: btrfs.c:2869
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetPerspective()

static BOOL WINAPI d3drm_mesh_builder3_GetPerspective ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 1912 of file meshbuilder.c.

1913 {
1914  FIXME("iface %p stub!\n", iface);
1915 
1916  return FALSE;
1917 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ d3drm_mesh_builder3_GetQuality()

static D3DRMRENDERQUALITY WINAPI d3drm_mesh_builder3_GetQuality ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 1905 of file meshbuilder.c.

1906 {
1907  FIXME("iface %p stub!\n", iface);
1908 
1909  return 0;
1910 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ d3drm_mesh_builder3_GetSubMeshes()

static HRESULT WINAPI d3drm_mesh_builder3_GetSubMeshes ( IDirect3DRMMeshBuilder3 *  iface,
DWORD count,
IUnknown **  meshes 
)
static

Definition at line 2162 of file meshbuilder.c.

2164 {
2165  FIXME("iface %p, count %p, meshes %p stub!\n", iface, count, meshes);
2166 
2167  return E_NOTIMPL;
2168 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetTextureCoordinates()

static HRESULT WINAPI d3drm_mesh_builder3_GetTextureCoordinates ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DVALUE u,
D3DVALUE v 
)
static

Definition at line 1838 of file meshbuilder.c.

1840 {
1842 
1843  TRACE("iface %p, index %u, u %p, v %p.\n", iface, index, u, v);
1844 
1845  if (index >= mesh_builder->nb_coords2d)
1846  return D3DRMERR_BADVALUE;
1847 
1848  *u = mesh_builder->pCoords2d[index].u;
1849  *v = mesh_builder->pCoords2d[index].v;
1850 
1851  return D3DRM_OK;
1852 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
GLuint index
Definition: glext.h:6031
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
#define index(s, c)
Definition: various.h:29
#define D3DRMERR_BADVALUE
Definition: d3drm.h:496
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
const GLdouble * v
Definition: gl.h:2040

◆ d3drm_mesh_builder3_GetVertex()

static HRESULT WINAPI d3drm_mesh_builder3_GetVertex ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DVECTOR vector 
)
static

Definition at line 2085 of file meshbuilder.c.

2087 {
2088  FIXME("iface %p, index %u, vector %p stub!\n", iface, index, vector);
2089 
2090  return E_NOTIMPL;
2091 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_GetVertexColor()

static D3DCOLOR WINAPI d3drm_mesh_builder3_GetVertexColor ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index 
)
static

Definition at line 1937 of file meshbuilder.c.

1939 {
1940  FIXME("iface %p, index %u stub!\n", iface, index);
1941 
1942  return 0;
1943 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031

◆ d3drm_mesh_builder3_GetVertexCount()

static int WINAPI d3drm_mesh_builder3_GetVertexCount ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 1928 of file meshbuilder.c.

1929 {
1931 
1932  TRACE("iface %p.\n", iface);
1933 
1934  return mesh_builder->nb_vertices;
1935 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_GetVertices()

static HRESULT WINAPI d3drm_mesh_builder3_GetVertices ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  start_idx,
DWORD vertex_count,
D3DVECTOR vertices 
)
static

Definition at line 2208 of file meshbuilder.c.

2210 {
2212  DWORD count = mesh_builder->nb_vertices - start_idx;
2213 
2214  TRACE("iface %p, start_idx %u, vertex_count %p, vertices %p.\n",
2215  iface, start_idx, vertex_count, vertices);
2216 
2217  if (vertex_count)
2218  *vertex_count = count;
2219  if (vertices && mesh_builder->nb_vertices)
2220  memcpy(vertices, mesh_builder->vertices + start_idx, count * sizeof(*vertices));
2221 
2222  return D3DRM_OK;
2223 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
int vertex_count
Definition: d3drm.c:3367
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
D3DVECTOR * vertices
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_Load()

static HRESULT WINAPI d3drm_mesh_builder3_Load ( IDirect3DRMMeshBuilder3 *  iface,
void filename,
void name,
D3DRMLOADOPTIONS  loadflags,
D3DRMLOADTEXTURE3CALLBACK  cb,
void arg 
)
static

Definition at line 1459 of file meshbuilder.c.

1461 {
1463  DXFILELOADOPTIONS load_options;
1464  IDirectXFile *dxfile = NULL;
1465  IDirectXFileEnumObject *enum_object = NULL;
1466  IDirectXFileData *data = NULL;
1467  const GUID* guid;
1468  DWORD size;
1469  struct d3drm_file_header *header;
1470  HRESULT hr;
1472 
1473  TRACE("iface %p, filename %p, name %p, loadflags %#x, cb %p, arg %p.\n",
1474  iface, filename, name, loadflags, cb, arg);
1475 
1477 
1478  if (loadflags == D3DRMLOAD_FROMMEMORY)
1479  {
1480  load_options = DXFILELOAD_FROMMEMORY;
1481  }
1482  else if (loadflags == D3DRMLOAD_FROMFILE)
1483  {
1484  load_options = DXFILELOAD_FROMFILE;
1485  TRACE("Loading from file %s\n", debugstr_a(filename));
1486  }
1487  else
1488  {
1489  FIXME("Load options %d not supported yet\n", loadflags);
1490  return E_NOTIMPL;
1491  }
1492 
1493  hr = DirectXFileCreate(&dxfile);
1494  if (hr != DXFILE_OK)
1495  goto end;
1496 
1498  if (hr != DXFILE_OK)
1499  goto end;
1500 
1501  hr = IDirectXFile_CreateEnumObject(dxfile, filename, load_options, &enum_object);
1502  if (hr != DXFILE_OK)
1503  goto end;
1504 
1506  if (hr != DXFILE_OK)
1507  goto end;
1508 
1510  if (hr != DXFILE_OK)
1511  goto end;
1512 
1513  TRACE("Found object type whose GUID = %s\n", debugstr_guid(guid));
1514 
1515  if (!IsEqualGUID(guid, &TID_DXFILEHeader))
1516  {
1518  goto end;
1519  }
1520 
1521  hr = IDirectXFileData_GetData(data, NULL, &size, (void**)&header);
1522  if ((hr != DXFILE_OK) || (size != sizeof(*header)))
1523  goto end;
1524 
1525  TRACE("Version is %u.%u, flags %#x.\n", header->major, header->minor, header->flags);
1526 
1527  /* Version must be 1.0.x */
1528  if ((header->major != 1) || (header->minor != 0))
1529  {
1531  goto end;
1532  }
1533 
1535  data = NULL;
1536 
1538  if (hr != DXFILE_OK)
1539  {
1541  goto end;
1542  }
1543 
1545  if (hr != DXFILE_OK)
1546  goto end;
1547 
1548  TRACE("Found object type whose GUID = %s\n", debugstr_guid(guid));
1549 
1550  if (!IsEqualGUID(guid, &TID_D3DRMMesh))
1551  {
1553  goto end;
1554  }
1555 
1556  /* We don't care about the texture interface version since we rely on QueryInterface */
1558  if (hr == S_OK)
1559  ret = D3DRM_OK;
1560 
1561 end:
1562 
1563  if (data)
1565  if (enum_object)
1566  IDirectXFileEnumObject_Release(enum_object);
1567  if (dxfile)
1568  IDirectXFile_Release(dxfile);
1569 
1570  if (ret != D3DRM_OK)
1572 
1573  return ret;
1574 }
HRESULT hr
Definition: shlfolder.c:183
#define IDirectXFileEnumObject_Release(p)
Definition: dxfile.h:107
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define IDirectXFileData_Release(p)
Definition: dxfile.h:185
#define D3DRMLOAD_FROMMEMORY
Definition: d3drmdef.h:343
#define IDirectXFile_Release(p)
Definition: dxfile.h:82
static void clean_mesh_builder_data(struct d3drm_mesh_builder *mesh_builder)
Definition: meshbuilder.c:307
GLuint GLuint end
Definition: gl.h:1545
const char * filename
Definition: ioapi.h:135
#define DXFILELOAD_FROMFILE
Definition: dxfile.h:37
#define DXFILE_OK
Definition: dxfile.h:268
#define IDirectXFile_RegisterTemplates(p, a, b)
Definition: dxfile.h:86
const GUID * guid
#define D3DRMERR_BADOBJECT
Definition: d3drm.h:487
#define FIXME(fmt,...)
Definition: debug.h:110
#define IDirectXFileEnumObject_GetNextDataObject(p, a)
Definition: dxfile.h:109
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
#define D3DRM_OK
Definition: d3drm.h:486
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define IDirectXFile_CreateEnumObject(p, a, b, c)
Definition: dxfile.h:84
DWORD DXFILELOADOPTIONS
Definition: dxfile.h:35
int ret
#define IDirectXFileData_GetData(p, a, b, c)
Definition: dxfile.h:190
#define IDirectXFileData_GetType(p, a)
Definition: dxfile.h:191
HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *pData, D3DRMLOADTEXTURECALLBACK load_texture_proc, void *arg)
Definition: meshbuilder.c:1019
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
HRESULT WINAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile)
Definition: main.c:153
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
Definition: name.c:38
#define D3DRMERR_BADFILE
Definition: d3drm.h:494
HRESULT(__cdecl * D3DRMLOADTEXTURECALLBACK)(char *tex_name, void *arg, struct IDirect3DRMTexture **texture)
Definition: d3drmobj.h:165
#define D3DRMERR_NOTFOUND
Definition: d3drm.h:491
char templates[]
Definition: meshbuilder.c:39
struct CFHEADER header
Definition: fdi.c:101
#define D3DRMLOAD_FROMFILE
Definition: d3drmdef.h:341
#define DXFILELOAD_FROMMEMORY
Definition: dxfile.h:39

◆ d3drm_mesh_builder3_Optimize()

static HRESULT WINAPI d3drm_mesh_builder3_Optimize ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  flags 
)
static

Definition at line 2131 of file meshbuilder.c.

2132 {
2133  FIXME("iface %p, flags %#x stub!\n", iface, flags);
2134 
2135  return E_NOTIMPL;
2136 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_QueryInterface()

static HRESULT WINAPI d3drm_mesh_builder3_QueryInterface ( IDirect3DRMMeshBuilder3 *  iface,
REFIID  riid,
void **  out 
)
static

Definition at line 935 of file meshbuilder.c.

936 {
938 
939  TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
940 
941  return d3drm_mesh_builder2_QueryInterface(&mesh_builder->IDirect3DRMMeshBuilder2_iface, riid, out);
942 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
static FILE * out
Definition: regtests2xml.c:44
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static HRESULT WINAPI d3drm_mesh_builder2_QueryInterface(IDirect3DRMMeshBuilder2 *iface, REFIID riid, void **out)
Definition: meshbuilder.c:341

◆ d3drm_mesh_builder3_Release()

static ULONG WINAPI d3drm_mesh_builder3_Release ( IDirect3DRMMeshBuilder3 *  iface)
static

Definition at line 953 of file meshbuilder.c.

954 {
956 
957  TRACE("iface %p.\n", iface);
958 
959  return d3drm_mesh_builder2_Release(&mesh_builder->IDirect3DRMMeshBuilder2_iface);
960 }
static ULONG WINAPI d3drm_mesh_builder2_Release(IDirect3DRMMeshBuilder2 *iface)
Definition: meshbuilder.c:380
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_ReserveSpace()

static HRESULT WINAPI d3drm_mesh_builder3_ReserveSpace ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  vertex_count,
DWORD  normal_count,
DWORD  face_count 
)
static

Definition at line 1682 of file meshbuilder.c.

1684 {
1685  FIXME("iface %p, vertex_count %u, normal_count %u, face_count %u stub!\n",
1686  iface, vertex_count, normal_count, face_count);
1687 
1688  return E_NOTIMPL;
1689 }
int vertex_count
Definition: d3drm.c:3367
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
int face_count
Definition: d3drm.c:3368

◆ d3drm_mesh_builder3_Save()

static HRESULT WINAPI d3drm_mesh_builder3_Save ( IDirect3DRMMeshBuilder3 *  iface,
const char filename,
D3DRMXOFFORMAT  format,
D3DRMSAVEOPTIONS  flags 
)
static

Definition at line 1576 of file meshbuilder.c.

1578 {
1579  FIXME("iface %p, filename %s, format %#x, flags %#x stub!\n",
1580  iface, debugstr_a(filename), format, flags);
1581 
1582  return E_NOTIMPL;
1583 }
const char * filename
Definition: ioapi.h:135
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_Scale()

static HRESULT WINAPI d3drm_mesh_builder3_Scale ( IDirect3DRMMeshBuilder3 *  iface,
D3DVALUE  sx,
D3DVALUE  sy,
D3DVALUE  sz 
)
static

Definition at line 1585 of file meshbuilder.c.

1587 {
1589  DWORD i;
1590 
1591  TRACE("iface %p, sx %.8e, sy %.8e, sz %.8e.\n", iface, sx, sy, sz);
1592 
1593  for (i = 0; i < mesh_builder->nb_vertices; ++i)
1594  {
1595  mesh_builder->vertices[i].u1.x *= sx;
1596  mesh_builder->vertices[i].u2.y *= sy;
1597  mesh_builder->vertices[i].u3.z *= sz;
1598  }
1599 
1600  /* Normals are not affected by Scale */
1601 
1602  return D3DRM_OK;
1603 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
unsigned long DWORD
Definition: ntddk_ex.h:95
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_SetAppData()

static HRESULT WINAPI d3drm_mesh_builder3_SetAppData ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  data 
)
static

Definition at line 430 of file meshbuilder.c.

431 {
433 
434  TRACE("iface %p, data %#x.\n", iface, data);
435 
436  mesh_builder->obj.appdata = data;
437 
438  return D3DRM_OK;
439 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

Referenced by d3drm_mesh_builder2_SetAppData().

◆ d3drm_mesh_builder3_SetColor()

static HRESULT WINAPI d3drm_mesh_builder3_SetColor ( IDirect3DRMMeshBuilder3 *  iface,
D3DCOLOR  color 
)
static

Definition at line 1703 of file meshbuilder.c.

1704 {
1706 
1707  TRACE("iface %p, color 0x%08x.\n", iface, color);
1708 
1709  mesh_builder->color = color;
1710 
1711  return D3DRM_OK;
1712 }
GLuint color
Definition: glext.h:6243
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330

◆ d3drm_mesh_builder3_SetColorRGB()

static HRESULT WINAPI d3drm_mesh_builder3_SetColorRGB ( IDirect3DRMMeshBuilder3 *  iface,
D3DVALUE  red,
D3DVALUE  green,
D3DVALUE  blue 
)
static

Definition at line 1691 of file meshbuilder.c.

1693 {
1695 
1696  TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface, red, green, blue);
1697 
1698  d3drm_set_color(&mesh_builder->color, red, green, blue, 1.0f);
1699 
1700  return D3DRM_OK;
1701 }
GLclampf GLclampf blue
Definition: gl.h:1740
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
GLclampf green
Definition: gl.h:1740
#define red
Definition: linetest.c:67
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
static void d3drm_set_color(D3DCOLOR *color, float r, float g, float b, float a)

◆ d3drm_mesh_builder3_SetColorSource()

static HRESULT WINAPI d3drm_mesh_builder3_SetColorSource ( IDirect3DRMMeshBuilder3 *  iface,
D3DRMCOLORSOURCE  source 
)
static

Definition at line 1613 of file meshbuilder.c.

1615 {
1616  FIXME("iface %p, source %#x stub!\n", iface, source);
1617 
1618  return E_NOTIMPL;
1619 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_SetMaterial()

static HRESULT WINAPI d3drm_mesh_builder3_SetMaterial ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMMaterial2 *  material 
)
static

Definition at line 1730 of file meshbuilder.c.

1732 {
1734 
1735  TRACE("iface %p, material %p.\n", iface, material);
1736 
1737  if (material)
1739  if (mesh_builder->material)
1741  mesh_builder->material = material;
1742 
1743  return D3DRM_OK;
1744 }
IDirect3DRMMaterial2 * material
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMTexture2_Release(p)
Definition: d3drmobj.h:3348
#define IDirect3DRMTexture2_AddRef(p)
Definition: d3drmobj.h:3347

◆ d3drm_mesh_builder3_SetName()

static HRESULT WINAPI d3drm_mesh_builder3_SetName ( IDirect3DRMMeshBuilder3 *  iface,
const char name 
)
static

Definition at line 990 of file meshbuilder.c.

991 {
993 
994  TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
995 
996  return d3drm_object_set_name(&mesh_builder->obj, name);
997 }
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
Definition: name.c:38
HRESULT d3drm_object_set_name(struct d3drm_object *object, const char *name)
Definition: d3drm_main.c:135

◆ d3drm_mesh_builder3_SetNormal()

static HRESULT WINAPI d3drm_mesh_builder3_SetNormal ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 1778 of file meshbuilder.c.

1780 {
1781  FIXME("iface %p, index %u, x %.8e, y %.8e, z %.8e stub!\n", iface, index, x, y, z);
1782 
1783  return E_NOTIMPL;
1784 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define FIXME(fmt,...)
Definition: debug.h:110
GLdouble GLdouble z
Definition: glext.h:5874
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder3_SetNormals()

static HRESULT WINAPI d3drm_mesh_builder3_SetNormals ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  start_idx,
DWORD  count,
D3DVECTOR vector 
)
static

Definition at line 2225 of file meshbuilder.c.

2227 {
2228  FIXME("iface %p, start_idx %u, count %u, vector %p stub!\n",
2229  iface, start_idx, count, vector);
2230 
2231  return E_NOTIMPL;
2232 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_SetPerspective()

static HRESULT WINAPI d3drm_mesh_builder3_SetPerspective ( IDirect3DRMMeshBuilder3 *  iface,
BOOL  enable 
)
static

Definition at line 1762 of file meshbuilder.c.

1764 {
1765  FIXME("iface %p, enable %#x stub!\n", iface, enable);
1766 
1767  return E_NOTIMPL;
1768 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLboolean enable
Definition: glext.h:11120
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_SetQuality()

static HRESULT WINAPI d3drm_mesh_builder3_SetQuality ( IDirect3DRMMeshBuilder3 *  iface,
D3DRMRENDERQUALITY  quality 
)
static

Definition at line 1754 of file meshbuilder.c.

1756 {
1757  FIXME("iface %p, quality %#x stub!\n", iface, quality);
1758 
1759  return E_NOTIMPL;
1760 }
#define FIXME(fmt,...)
Definition: debug.h:110
int quality
Definition: jpeglib.h:991
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_SetTexture()

static HRESULT WINAPI d3drm_mesh_builder3_SetTexture ( IDirect3DRMMeshBuilder3 *  iface,
IDirect3DRMTexture3 *  texture 
)
static

Definition at line 1714 of file meshbuilder.c.

1716 {
1718 
1719  TRACE("iface %p, texture %p.\n", iface, texture);
1720 
1721  if (texture)
1723  if (mesh_builder->texture)
1725  mesh_builder->texture = texture;
1726 
1727  return D3DRM_OK;
1728 }
#define IDirect3DRMTexture3_AddRef(p)
Definition: d3drmobj.h:3475
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
GLenum GLuint texture
Definition: glext.h:6295
#define D3DRM_OK
Definition: d3drm.h:486
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define IDirect3DRMTexture3_Release(p)
Definition: d3drmobj.h:3476

◆ d3drm_mesh_builder3_SetTextureCoordinates()

static HRESULT WINAPI d3drm_mesh_builder3_SetTextureCoordinates ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DVALUE  u,
D3DVALUE  v 
)
static

Definition at line 1786 of file meshbuilder.c.

1788 {
1790 
1791  TRACE("iface %p, index %u, u %.8e, v %.8e.\n", iface, index, u, v);
1792 
1793  if (index >= mesh_builder->nb_coords2d)
1794  return D3DRMERR_BADVALUE;
1795 
1796  mesh_builder->pCoords2d[index].u = u;
1797  mesh_builder->pCoords2d[index].v = v;
1798 
1799  return D3DRM_OK;
1800 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
GLuint index
Definition: glext.h:6031
static struct d3drm_mesh_builder * impl_from_IDirect3DRMMeshBuilder3(IDirect3DRMMeshBuilder3 *iface)
Definition: meshbuilder.c:297
#define TRACE(s)
Definition: solgame.cpp:4
#define D3DRM_OK
Definition: d3drm.h:486
#define index(s, c)
Definition: various.h:29
#define D3DRMERR_BADVALUE
Definition: d3drm.h:496
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
const GLdouble * v
Definition: gl.h:2040

◆ d3drm_mesh_builder3_SetTextureTopology()

static HRESULT WINAPI d3drm_mesh_builder3_SetTextureTopology ( IDirect3DRMMeshBuilder3 *  iface,
BOOL  wrap_u,
BOOL  wrap_v 
)
static

Definition at line 1746 of file meshbuilder.c.

1748 {
1749  FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface, wrap_u, wrap_v);
1750 
1751  return E_NOTIMPL;
1752 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_SetVertex()

static HRESULT WINAPI d3drm_mesh_builder3_SetVertex ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DVALUE  x,
D3DVALUE  y,
D3DVALUE  z 
)
static

Definition at line 1770 of file meshbuilder.c.

1772 {
1773  FIXME("iface %p, index %u, x %.8e, y %.8e, z %.8e stub!\n", iface, index, x, y, z);
1774 
1775  return E_NOTIMPL;
1776 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define FIXME(fmt,...)
Definition: debug.h:110
GLdouble GLdouble z
Definition: glext.h:5874
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ d3drm_mesh_builder3_SetVertexColor()

static HRESULT WINAPI d3drm_mesh_builder3_SetVertexColor ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DCOLOR  color 
)
static

Definition at line 1802 of file meshbuilder.c.

1804 {
1805  FIXME("iface %p, index %u, color 0x%08x stub!\n", iface, index, color);
1806 
1807  return E_NOTIMPL;
1808 }
GLuint color
Definition: glext.h:6243
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_SetVertexColorRGB()

static HRESULT WINAPI d3drm_mesh_builder3_SetVertexColorRGB ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  index,
D3DVALUE  red,
D3DVALUE  green,
D3DVALUE  blue 
)
static

Definition at line 1810 of file meshbuilder.c.

1812 {
1813  FIXME("iface %p, index %u, red %.8e, green %.8e, blue %.8e stub!\n",
1814  iface, index, red, green, blue);
1815 
1816  return E_NOTIMPL;
1817 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLuint index
Definition: glext.h:6031
GLclampf GLclampf blue
Definition: gl.h:1740
GLclampf green
Definition: gl.h:1740
#define red
Definition: linetest.c:67
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_SetVertices()

static HRESULT WINAPI d3drm_mesh_builder3_SetVertices ( IDirect3DRMMeshBuilder3 *  iface,
DWORD  start_idx,
DWORD  count,
D3DVECTOR vector 
)
static

Definition at line 2200 of file meshbuilder.c.

2202 {
2203  FIXME("iface %p, start_idx %u, count %u, vector %p stub!\n", iface, start_idx, count, vector);
2204 
2205  return E_NOTIMPL;
2206 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_builder3_Translate()

static HRESULT WINAPI d3drm_mesh_builder3_Translate ( IDirect3DRMMeshBuilder3 *  iface,
D3DVALUE  tx,
D3DVALUE  ty,
D3DVALUE  tz 
)
static

Definition at line 1605 of file meshbuilder.c.

1607 {
1608  FIXME("iface %p, tx %.8e, ty %.8e, tz %.8e stub!\n", iface, tx, ty, tz);
1609 
1610  return E_NOTIMPL;
1611 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLbyte ty
Definition: glext.h:8756
#define E_NOTIMPL
Definition: ddrawi.h:99
GLbyte GLbyte tz
Definition: glext.h:8756

◆ d3drm_mesh_builder_create()

HRESULT d3drm_mesh_builder_create ( struct d3drm_mesh_builder **  mesh_builder,
IDirect3DRM *  d3drm 
)

Definition at line 2334 of file meshbuilder.c.

2335 {
2336  static const char classname[] = "Builder";
2337  struct d3drm_mesh_builder *object;
2338 
2339  TRACE("mesh_builder %p.\n", mesh_builder);
2340 
2341  if (!(object = heap_alloc_zero(sizeof(*object))))
2342  return E_OUTOFMEMORY;
2343 
2344  object->IDirect3DRMMeshBuilder2_iface.lpVtbl = &d3drm_mesh_builder2_vtbl;
2345  object->IDirect3DRMMeshBuilder3_iface.lpVtbl = &d3drm_mesh_builder3_vtbl;
2346  object->ref = 1;
2347  object->d3drm = d3drm;
2348  IDirect3DRM_AddRef(object->d3drm);
2349 
2351 
2352  *mesh_builder = object;
2353 
2354  return S_OK;
2355 }
WCHAR classname[128]
Definition: startup.c:15
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define IDirect3DRM_AddRef(p)
Definition: d3drm.h:110
IDirect3DRM * d3drm
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DRMMeshBuilder * mesh_builder
Definition: d3drm.c:3330
#define S_OK
Definition: intsafe.h:59
static const struct IDirect3DRMMeshBuilder3Vtbl d3drm_mesh_builder3_vtbl
Definition: meshbuilder.c:2260
static const struct IDirect3DRMMeshBuilder2Vtbl d3drm_mesh_builder2_vtbl
Definition: meshbuilder.c:880
void d3drm_object_init(struct d3drm_object *object, const char *classname)
Definition: d3drm_main.c:39
void * object
Definition: jmemsys.h:48

Referenced by d3drm2_CreateMeshBuilder(), d3drm3_CreateMeshBuilder(), and d3drm_create_mesh_builder_object().

◆ d3drm_mesh_Clone()

static HRESULT WINAPI d3drm_mesh_Clone ( IDirect3DRMMesh *  iface,
IUnknown outer,
REFIID  iid,
void **  out 
)
static

Definition at line 2416 of file meshbuilder.c.

2418 {
2419  FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
2420 
2421  return E_NOTIMPL;
2422 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static FILE * out
Definition: regtests2xml.c:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ d3drm_mesh_create()

HRESULT d3drm_mesh_create ( struct d3drm_mesh **  mesh,
IDirect3DRM *  d3drm 
)

Definition at line 2833 of file meshbuilder.c.

2834 {
2835  static const char classname[] = "Mesh";
2836  struct d3drm_mesh *object;
2837 
2838  TRACE("mesh %p, d3drm %p.\n", mesh, d3drm);
2839 
2840  if (!(object = heap_alloc_zero(sizeof(*object))))
2841  return E_OUTOFMEMORY;
2842 
2843  object->IDirect3DRMMesh_iface.lpVtbl = &d3drm_mesh_vtbl;
2844  object->ref = 1;
2845  object->d3drm = d3drm;
2846  IDirect3DRM_AddRef(object->d3drm);
2847 
2849 
2850  *mesh = object;
2851 
2852  return S_OK;
2853 }
IDirect3DRM * d3drm
WCHAR classname[128]
Definition: startup.c:15
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define IDirect3DRM_AddRef(p)
Definition: d3drm.h:110
#define TRACE(s)
Definition: solgame.cpp:4
Definition: d3drm.c:188
#define S_OK
Definition: intsafe.h:59
void d3drm_object_init(struct d3drm_object *object, const char *classname)
Definition: d3drm_main.c:39
static const struct IDirect3DRMMeshVtbl d3drm_mesh_vtbl
Definition: meshbuilder.c:2799
void * object
Definition: jmemsys.h:48

Referenced by d3drm3_CreateMesh(), and d3drm_create_mesh_object().

◆ d3drm_mesh_DeleteDestroyCallback()

static HRESULT WINAPI d3drm_mesh_DeleteDestroyCallback ( IDirect3DRMMesh *  iface,
D3DRMOBJECTCALLBACK  cb,
void ctx 
)
static

Definition at line 2434 of file meshbuilder.c.

2436 {
2437  struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
2438 
2439  TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
2440 
2441  return d3drm_object_delete_destroy_callback(&mesh->obj, cb, ctx);
2442 }
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT d3drm_object_delete_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:72
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
static struct d3drm_mesh * impl_from_IDirect3DRMMesh(IDirect3DRMMesh *iface)
Definition: meshbuilder.c:287
struct d3drm_object obj

◆ d3drm_mesh_GetAppData()

static DWORD WINAPI d3drm_mesh_GetAppData ( IDirect3DRMMesh *  iface)
static

Definition at line 2455 of file meshbuilder.c.

2456 {
2457  struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
2458 
2459  TRACE("iface %p.\n", iface);
2460 
2461  return mesh->obj.appdata;
2462 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3drm_mesh * impl_from_IDirect3DRMMesh(IDirect3DRMMesh *iface)
Definition: meshbuilder.c:287
struct d3drm_object obj

◆ d3drm_mesh_GetBox()

static HRESULT WINAPI d3drm_mesh_GetBox ( IDirect3DRMMesh *  iface,
D3DRMBOX box 
)
static

Definition at line 2507 of file meshbuilder.c.

2508 {
2509  FIXME("iface %p, box %p stub!\n", iface, box);
2510 
2511  return E_NOTIMPL;
2512 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: palette.c:467

◆ d3drm_mesh_GetClassName()

static HRESULT WINAPI d3drm_mesh_GetClassName ( IDirect3DRMMesh *  iface,
DWORD size,
char name 
)
static

Definition at line 2482 of file meshbuilder.c.

2483 {
2484  struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
2485 
2486  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
2487 
2488  return d3drm_object_get_class_name(&mesh->obj, size, name);
2489 }
HRESULT d3drm_object_get_class_name(struct d3drm_object *object, DWORD *size, char *name)
Definition: d3drm_main.c:92
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
Definition: name.c:38
static struct d3drm_mesh * impl_from_IDirect3DRMMesh(IDirect3DRMMesh *iface)
Definition: meshbuilder.c:287
struct d3drm_object obj

◆ d3drm_mesh_GetGroup()

static HRESULT WINAPI d3drm_mesh_GetGroup ( IDirect3DRMMesh *  iface,
D3DRMGROUPINDEX  id,
unsigned vertex_count,
unsigned face_count,
unsigned vertex_per_face,
DWORD face_data_size,
unsigned face_data 
)
static

Definition at line 2688 of file meshbuilder.c.

2690 {
2691  struct d3drm_mesh *mesh = impl_from_IDirect3DRMMesh(iface);
2692 
2693  TRACE("iface %p, id %#x, vertex_count %p, face_count %p, vertex_per_face %p, face_data_size %p, face_data %p.\n",
2694  iface, id, vertex_count, face_count, vertex_per_face, face_data_size,face_data);
2695 
2696  if (id >= mesh->nb_groups)
2697  return D3DRMERR_BADVALUE;
2698 
2699  if (vertex_count)
2700  *vertex_count = mesh->groups[id].nb_vertices;
2701  if (face_count)
2702  *face_count = mesh->groups[id].nb_faces;
2703  if (vertex_per_face)
2704  *vertex_per_face = mesh->groups[id].vertex_per_face;
2705  if (face_data_size)
2706  *face_data_size = mesh->groups[id].face_data_size;
2707  if (face_data)
2708  memcpy(face_data, mesh->groups[id].face_data, mesh->groups[id].face_data_size * sizeof(*face_data));
2709 
2710  return D3DRM_OK;
2711 }
int vertex_count
Definition: d3drm.c:3367
int vertex_per_face
Definition: d3drm.c:3369
int face_data_size
Definition: d3drm.c:3370
#define TRACE(s)
Definition: solgame.cpp:4
struct mesh_group * groups
#define D3DRM_OK
Definition: d3drm.h:486
#define D3DRMERR_BADVALUE
Definition: d3drm.h:496
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
SIZE_T nb_groups
GLenum GLuint id
Definition: glext.h:5579