Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
3931338e
Commit
3931338e
authored
13 years ago
by
André Zwing
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3drm: Move Load implementation to IDirect3DRMMeshBuilder3.
parent
d16806e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/d3drm/meshbuilder.c
+212
-211
212 additions, 211 deletions
dlls/d3drm/meshbuilder.c
dlls/d3drm/tests/d3drm.c
+5
-5
5 additions, 5 deletions
dlls/d3drm/tests/d3drm.c
with
217 additions
and
216 deletions
dlls/d3drm/meshbuilder.c
+
212
−
211
View file @
3931338e
...
...
@@ -461,219 +461,14 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_GetClassName(IDirect3DRMMeshBu
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder2Impl_Load
(
IDirect3DRMMeshBuilder2
*
iface
,
LPVOID
filename
,
LPVOID
name
,
D3DRMLOADOPTIONS
loadflags
,
D3DRMLOADTEXTURECALLBACK
cb
,
LPVOID
pA
rg
)
D3DRMLOADTEXTURECALLBACK
cb
,
LPVOID
a
rg
)
{
IDirect3DRMMeshBuilderImpl
*
This
=
impl_from_IDirect3DRMMeshBuilder2
(
iface
);
DXFILELOADOPTIONS
load_options
;
LPDIRECTXFILE
pDXFile
=
NULL
;
LPDIRECTXFILEENUMOBJECT
pEnumObject
=
NULL
;
LPDIRECTXFILEDATA
pData
=
NULL
;
LPDIRECTXFILEOBJECT
pObject
=
NULL
;
LPDIRECTXFILEDATA
pData2
=
NULL
;
const
GUID
*
pGuid
;
DWORD
size
;
Header
*
pHeader
;
LPBYTE
ptr
;
HRESULT
hr
;
HRESULT
ret
=
D3DRMERR_BADOBJECT
;
FIXME
(
"(%p)->(%p,%p,%x,%p,%p): partial stub
\n
"
,
This
,
filename
,
name
,
loadflags
,
cb
,
pArg
);
/* First free allocated buffers of previous mesh data */
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pVertices
);
This
->
pVertices
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pNormals
);
This
->
pNormals
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pFaceData
);
This
->
pFaceData
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pCoords2d
);
This
->
pCoords2d
=
NULL
;
if
(
loadflags
==
D3DRMLOAD_FROMMEMORY
)
{
load_options
=
DXFILELOAD_FROMMEMORY
;
}
else
{
FIXME
(
"Load options %d not supported yet
\n
"
,
loadflags
);
return
E_NOTIMPL
;
}
hr
=
DirectXFileCreate
(
&
pDXFile
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFile_RegisterTemplates
(
pDXFile
,
templates
,
strlen
(
templates
));
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFile_CreateEnumObject
(
pDXFile
,
filename
,
load_options
,
&
pEnumObject
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
pEnumObject
,
&
pData
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileData_GetType
(
pData
,
&
pGuid
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pGuid
));
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_DXFILEHeader
))
{
ret
=
D3DRMERR_BADFILE
;
goto
end
;
}
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
pHeader
);
if
((
hr
!=
DXFILE_OK
)
||
(
size
!=
sizeof
(
Header
)))
goto
end
;
TRACE
(
"Version is %d %d %d
\n
"
,
pHeader
->
major
,
pHeader
->
minor
,
pHeader
->
flags
);
/* Version must be 1.0.x */
if
((
pHeader
->
major
!=
1
)
||
(
pHeader
->
minor
!=
0
))
{
ret
=
D3DRMERR_BADFILE
;
goto
end
;
}
IDirectXFileData_Release
(
pData
);
pData
=
NULL
;
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
pEnumObject
,
&
pData
);
if
(
hr
!=
DXFILE_OK
)
{
ret
=
D3DRMERR_NOTFOUND
;
goto
end
;
}
hr
=
IDirectXFileData_GetType
(
pData
,
&
pGuid
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pGuid
));
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMesh
))
{
ret
=
D3DRMERR_NOTFOUND
;
goto
end
;
}
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
ptr
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
This
->
nb_vertices
=
*
(
DWORD
*
)
ptr
;
This
->
nb_faces
=
*
(
DWORD
*
)(
ptr
+
sizeof
(
DWORD
)
+
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
));
This
->
face_data_size
=
size
-
sizeof
(
DWORD
)
-
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
)
-
sizeof
(
DWORD
);
TRACE
(
"Mesh: nb_vertices = %d, nb_faces = %d, face_data_size = %d
\n
"
,
This
->
nb_vertices
,
This
->
nb_faces
,
This
->
face_data_size
);
This
->
pVertices
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
));
memcpy
(
This
->
pVertices
,
ptr
+
sizeof
(
DWORD
),
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
));
This
->
pFaceData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
face_data_size
);
memcpy
(
This
->
pFaceData
,
ptr
+
sizeof
(
DWORD
)
+
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
)
+
sizeof
(
DWORD
),
This
->
face_data_size
);
while
(
1
)
{
hr
=
IDirectXFileData_GetNextObject
(
pData
,
&
pObject
);
if
(
hr
==
DXFILEERR_NOMOREOBJECTS
)
{
FIXME
(
"no more object
\n
"
);
break
;
}
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileObject_QueryInterface
(
pObject
,
&
IID_IDirectXFileData
,
(
void
**
)
&
pData2
);
IDirectXFileObject_Release
(
pObject
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileData_GetType
(
pData2
,
&
pGuid
);
if
(
hr
!=
DXFILE_OK
)
{
IDirectXFileData_Release
(
pData2
);
goto
end
;
}
FIXME
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pGuid
));
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMeshNormals
))
{
DWORD
tmp
;
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
ptr
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
This
->
nb_normals
=
*
(
DWORD
*
)
ptr
;
tmp
=
*
(
DWORD
*
)(
ptr
+
sizeof
(
DWORD
)
+
This
->
nb_normals
*
sizeof
(
D3DVECTOR
));
TRACE
(
"(%p)->(%p,%p,%x,%p,%p): partial stub
\n
"
,
This
,
filename
,
name
,
loadflags
,
cb
,
arg
);
FIXME
(
"MeshNormals: nb_normals = %d, nb_faces_normals = %d
\n
"
,
This
->
nb_normals
,
tmp
);
This
->
pNormals
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_normals
*
sizeof
(
D3DVECTOR
));
memcpy
(
This
->
pNormals
,
ptr
+
sizeof
(
DWORD
),
This
->
nb_normals
*
sizeof
(
D3DVECTOR
));
}
else
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMeshTextureCoords
))
{
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
ptr
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
This
->
nb_coords2d
=
*
(
DWORD
*
)
ptr
;
FIXME
(
"MeshTextureCoords: nb_coords2d = %d
\n
"
,
This
->
nb_coords2d
);
This
->
pCoords2d
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_coords2d
*
sizeof
(
Coords2d
));
memcpy
(
This
->
pCoords2d
,
ptr
+
sizeof
(
DWORD
),
This
->
nb_coords2d
*
sizeof
(
Coords2d
));
}
else
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMeshMaterialList
))
{
FIXME
(
"MeshMaterialList not supported yet, ignoring...
\n
"
);
}
else
{
FIXME
(
"Unknown GUID %s, ignoring...
\n
"
,
debugstr_guid
(
pGuid
));
}
IDirectXFileData_Release
(
pData2
);
}
ret
=
D3DRM_OK
;
end:
if
(
pData
)
IDirectXFileData_Release
(
pData
);
if
(
pEnumObject
)
IDirectXFileEnumObject_Release
(
pEnumObject
);
if
(
pDXFile
)
IDirectXFile_Release
(
pDXFile
);
if
(
ret
!=
D3DRM_OK
)
{
/* Clean mesh data */
This
->
nb_vertices
=
0
;
This
->
nb_normals
=
0
;
This
->
nb_faces
=
0
;
This
->
face_data_size
=
0
;
This
->
nb_coords2d
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pVertices
);
This
->
pVertices
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pNormals
);
This
->
pNormals
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pFaceData
);
This
->
pFaceData
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pCoords2d
);
This
->
pCoords2d
=
NULL
;
}
return
ret
;
return
IDirect3DRMMeshBuilder3_Load
(
&
This
->
IDirect3DRMMeshBuilder3_iface
,
filename
,
name
,
loadflags
,
(
D3DRMLOADTEXTURE3CALLBACK
)
cb
,
arg
);
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder2Impl_Save
(
IDirect3DRMMeshBuilder2
*
iface
,
...
...
@@ -1279,10 +1074,216 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3*
D3DRMLOADTEXTURE3CALLBACK
cb
,
LPVOID
arg
)
{
IDirect3DRMMeshBuilderImpl
*
This
=
impl_from_IDirect3DRMMeshBuilder3
(
iface
);
DXFILELOADOPTIONS
load_options
;
LPDIRECTXFILE
pDXFile
=
NULL
;
LPDIRECTXFILEENUMOBJECT
pEnumObject
=
NULL
;
LPDIRECTXFILEDATA
pData
=
NULL
;
LPDIRECTXFILEOBJECT
pObject
=
NULL
;
LPDIRECTXFILEDATA
pData2
=
NULL
;
const
GUID
*
pGuid
;
DWORD
size
;
Header
*
pHeader
;
LPBYTE
ptr
;
HRESULT
hr
;
HRESULT
ret
=
D3DRMERR_BADOBJECT
;
FIXME
(
"(%p)->(%p,%p,%
u
,%p,%p): stub
\n
"
,
This
,
filename
,
name
,
loadflags
,
cb
,
arg
);
FIXME
(
"(%p)->(%p,%p,%
x
,%p,%p):
partial
stub
\n
"
,
This
,
filename
,
name
,
loadflags
,
cb
,
arg
);
return
E_NOTIMPL
;
/* First free allocated buffers of previous mesh data */
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pVertices
);
This
->
pVertices
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pNormals
);
This
->
pNormals
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pFaceData
);
This
->
pFaceData
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pCoords2d
);
This
->
pCoords2d
=
NULL
;
if
(
loadflags
==
D3DRMLOAD_FROMMEMORY
)
{
load_options
=
DXFILELOAD_FROMMEMORY
;
}
else
{
FIXME
(
"Load options %d not supported yet
\n
"
,
loadflags
);
return
E_NOTIMPL
;
}
hr
=
DirectXFileCreate
(
&
pDXFile
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFile_RegisterTemplates
(
pDXFile
,
templates
,
strlen
(
templates
));
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFile_CreateEnumObject
(
pDXFile
,
filename
,
load_options
,
&
pEnumObject
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
pEnumObject
,
&
pData
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileData_GetType
(
pData
,
&
pGuid
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pGuid
));
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_DXFILEHeader
))
{
ret
=
D3DRMERR_BADFILE
;
goto
end
;
}
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
pHeader
);
if
((
hr
!=
DXFILE_OK
)
||
(
size
!=
sizeof
(
Header
)))
goto
end
;
TRACE
(
"Version is %d %d %d
\n
"
,
pHeader
->
major
,
pHeader
->
minor
,
pHeader
->
flags
);
/* Version must be 1.0.x */
if
((
pHeader
->
major
!=
1
)
||
(
pHeader
->
minor
!=
0
))
{
ret
=
D3DRMERR_BADFILE
;
goto
end
;
}
IDirectXFileData_Release
(
pData
);
pData
=
NULL
;
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
pEnumObject
,
&
pData
);
if
(
hr
!=
DXFILE_OK
)
{
ret
=
D3DRMERR_NOTFOUND
;
goto
end
;
}
hr
=
IDirectXFileData_GetType
(
pData
,
&
pGuid
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pGuid
));
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMesh
))
{
ret
=
D3DRMERR_NOTFOUND
;
goto
end
;
}
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
ptr
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
This
->
nb_vertices
=
*
(
DWORD
*
)
ptr
;
This
->
nb_faces
=
*
(
DWORD
*
)(
ptr
+
sizeof
(
DWORD
)
+
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
));
This
->
face_data_size
=
size
-
sizeof
(
DWORD
)
-
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
)
-
sizeof
(
DWORD
);
TRACE
(
"Mesh: nb_vertices = %d, nb_faces = %d, face_data_size = %d
\n
"
,
This
->
nb_vertices
,
This
->
nb_faces
,
This
->
face_data_size
);
This
->
pVertices
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
));
memcpy
(
This
->
pVertices
,
ptr
+
sizeof
(
DWORD
),
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
));
This
->
pFaceData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
face_data_size
);
memcpy
(
This
->
pFaceData
,
ptr
+
sizeof
(
DWORD
)
+
This
->
nb_vertices
*
sizeof
(
D3DVECTOR
)
+
sizeof
(
DWORD
),
This
->
face_data_size
);
while
(
1
)
{
hr
=
IDirectXFileData_GetNextObject
(
pData
,
&
pObject
);
if
(
hr
==
DXFILEERR_NOMOREOBJECTS
)
{
FIXME
(
"no more object
\n
"
);
break
;
}
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileObject_QueryInterface
(
pObject
,
&
IID_IDirectXFileData
,
(
void
**
)
&
pData2
);
IDirectXFileObject_Release
(
pObject
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileData_GetType
(
pData2
,
&
pGuid
);
if
(
hr
!=
DXFILE_OK
)
{
IDirectXFileData_Release
(
pData2
);
goto
end
;
}
FIXME
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pGuid
));
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMeshNormals
))
{
DWORD
tmp
;
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
ptr
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
This
->
nb_normals
=
*
(
DWORD
*
)
ptr
;
tmp
=
*
(
DWORD
*
)(
ptr
+
sizeof
(
DWORD
)
+
This
->
nb_normals
*
sizeof
(
D3DVECTOR
));
FIXME
(
"MeshNormals: nb_normals = %d, nb_faces_normals = %d
\n
"
,
This
->
nb_normals
,
tmp
);
This
->
pNormals
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_normals
*
sizeof
(
D3DVECTOR
));
memcpy
(
This
->
pNormals
,
ptr
+
sizeof
(
DWORD
),
This
->
nb_normals
*
sizeof
(
D3DVECTOR
));
}
else
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMeshTextureCoords
))
{
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
ptr
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
This
->
nb_coords2d
=
*
(
DWORD
*
)
ptr
;
FIXME
(
"MeshTextureCoords: nb_coords2d = %d
\n
"
,
This
->
nb_coords2d
);
This
->
pCoords2d
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_coords2d
*
sizeof
(
Coords2d
));
memcpy
(
This
->
pCoords2d
,
ptr
+
sizeof
(
DWORD
),
This
->
nb_coords2d
*
sizeof
(
Coords2d
));
}
else
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMeshMaterialList
))
{
FIXME
(
"MeshMaterialList not supported yet, ignoring...
\n
"
);
}
else
{
FIXME
(
"Unknown GUID %s, ignoring...
\n
"
,
debugstr_guid
(
pGuid
));
}
IDirectXFileData_Release
(
pData2
);
}
ret
=
D3DRM_OK
;
end:
if
(
pData
)
IDirectXFileData_Release
(
pData
);
if
(
pEnumObject
)
IDirectXFileEnumObject_Release
(
pEnumObject
);
if
(
pDXFile
)
IDirectXFile_Release
(
pDXFile
);
if
(
ret
!=
D3DRM_OK
)
{
/* Clean mesh data */
This
->
nb_vertices
=
0
;
This
->
nb_normals
=
0
;
This
->
nb_faces
=
0
;
This
->
face_data_size
=
0
;
This
->
nb_coords2d
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pVertices
);
This
->
pVertices
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pNormals
);
This
->
pNormals
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pFaceData
);
This
->
pFaceData
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pCoords2d
);
This
->
pCoords2d
=
NULL
;
}
return
ret
;
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder3Impl_Save
(
IDirect3DRMMeshBuilder3
*
iface
,
...
...
This diff is collapsed.
Click to expand it.
dlls/d3drm/tests/d3drm.c
+
5
−
5
View file @
3931338e
...
...
@@ -174,23 +174,23 @@ static void test_MeshBuilder3(void)
info
.
lpMemory
=
data_bad_version
;
info
.
dSize
=
strlen
(
data_bad_version
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DRMERR_BADFILE
,
"Should have returned D3DRMERR_BADFILE (hr = %x)
\n
"
,
hr
);
ok
(
hr
==
D3DRMERR_BADFILE
,
"Should have returned D3DRMERR_BADFILE (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_no_mesh
;
info
.
dSize
=
strlen
(
data_no_mesh
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DRMERR_NOTFOUND
,
"Should have returned D3DRMERR_NOTFOUND (hr = %x)
\n
"
,
hr
);
ok
(
hr
==
D3DRMERR_NOTFOUND
,
"Should have returned D3DRMERR_NOTFOUND (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_ok
;
info
.
dSize
=
strlen
(
data_ok
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder3
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot load mesh data (hr = %x)
\n
"
,
hr
);
ok
(
hr
==
D3DRM_OK
,
"Cannot load mesh data (hr = %x)
\n
"
,
hr
);
val
=
IDirect3DRMMeshBuilder_GetVertexCount
(
pMeshBuilder3
);
todo_wine
ok
(
val
==
4
,
"Wrong number of vertices %d (must be 4)
\n
"
,
val
);
ok
(
val
==
4
,
"Wrong number of vertices %d (must be 4)
\n
"
,
val
);
val
=
IDirect3DRMMeshBuilder_GetFaceCount
(
pMeshBuilder3
);
todo_wine
ok
(
val
==
3
,
"Wrong number of faces %d (must be 3)
\n
"
,
val
);
ok
(
val
==
3
,
"Wrong number of faces %d (must be 3)
\n
"
,
val
);
hr
=
IDirect3DRMMeshBuilder3_GetVertices
(
pMeshBuilder3
,
0
,
&
val1
,
NULL
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get vertices information (hr = %x)
\n
"
,
hr
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment