Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4d53115c
Commit
4d53115c
authored
Mar 29, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Add support for frame with fake data in IDirect3DRMX:Load methods + tests.
parent
5763eb16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
d3drm.c
dlls/d3drm/d3drm.c
+14
-1
d3drm.c
dlls/d3drm/tests/d3drm.c
+10
-4
No files found.
dlls/d3drm/d3drm.c
View file @
4d53115c
...
@@ -1389,6 +1389,8 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3* iface, LPVOID ObjSourc
...
@@ -1389,6 +1389,8 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3* iface, LPVOID ObjSourc
else
if
(
IsEqualGUID
(
pGuid
,
&
TID_D3DRMFrame
))
else
if
(
IsEqualGUID
(
pGuid
,
&
TID_D3DRMFrame
))
{
{
BOOL
requested
=
FALSE
;
BOOL
requested
=
FALSE
;
HRESULT
hr
;
LPDIRECT3DRMFRAME3
frame
;
TRACE
(
"Found TID_D3DRMFrame
\n
"
);
TRACE
(
"Found TID_D3DRMFrame
\n
"
);
...
@@ -1400,7 +1402,18 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3* iface, LPVOID ObjSourc
...
@@ -1400,7 +1402,18 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3* iface, LPVOID ObjSourc
if
(
requested
)
if
(
requested
)
{
{
FIXME
(
"Processing frame not supported yet
\n
"
);
FIXME
(
"Fake frame data and notify application
\n
"
);
hr
=
IDirect3DRM3_CreateFrame
(
iface
,
NULL
,
&
frame
);
if
(
SUCCEEDED
(
hr
))
{
LoadProc
((
LPDIRECT3DRMOBJECT
)
frame
,
&
IID_IDirect3DRMFrame
,
ArgLP
);
IDirect3DRMFrame3_Release
(
frame
);
}
if
(
FAILED
(
hr
))
ERR
(
"Cannot process mesh
\n
"
);
}
}
}
}
else
if
(
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMaterial
))
else
if
(
IsEqualGUID
(
pGuid
,
&
TID_D3DRMMaterial
))
...
...
dlls/d3drm/tests/d3drm.c
View file @
4d53115c
...
@@ -153,6 +153,11 @@ static char data_d3drm_load[] =
...
@@ -153,6 +153,11 @@ static char data_d3drm_load[] =
" 0.1; 0.2; 0.3;,
\n
"
" 0.1; 0.2; 0.3;,
\n
"
" 1;
\n
"
" 1;
\n
"
" 3; 0, 1, 2;;
\n
"
" 3; 0, 1, 2;;
\n
"
"}
\n
"
"Frame Scene
\n
"
"{
\n
"
" {Object1}
\n
"
" {Object2}
\n
"
"}
\n
"
;
"}
\n
"
;
static
void
test_MeshBuilder
(
void
)
static
void
test_MeshBuilder
(
void
)
...
@@ -604,7 +609,8 @@ static int nb_objects = 0;
...
@@ -604,7 +609,8 @@ static int nb_objects = 0;
static
const
GUID
*
refiids
[]
=
static
const
GUID
*
refiids
[]
=
{
{
&
IID_IDirect3DRMMeshBuilder
,
&
IID_IDirect3DRMMeshBuilder
,
&
IID_IDirect3DRMMeshBuilder
&
IID_IDirect3DRMMeshBuilder
,
&
IID_IDirect3DRMFrame
};
};
void
__cdecl
object_load_callback
(
LPDIRECT3DRMOBJECT
object
,
REFIID
objectguid
,
LPVOID
arg
)
void
__cdecl
object_load_callback
(
LPDIRECT3DRMOBJECT
object
,
REFIID
objectguid
,
LPVOID
arg
)
...
@@ -620,16 +626,16 @@ static void test_d3drm_load(void)
...
@@ -620,16 +626,16 @@ static void test_d3drm_load(void)
HRESULT
hr
;
HRESULT
hr
;
LPDIRECT3DRM
pD3DRM
;
LPDIRECT3DRM
pD3DRM
;
D3DRMLOADMEMORY
info
;
D3DRMLOADMEMORY
info
;
const
GUID
*
req_refiids
[]
=
{
&
IID_IDirect3DRMMeshBuilder
};
const
GUID
*
req_refiids
[]
=
{
&
IID_IDirect3DRMMeshBuilder
,
&
IID_IDirect3DRMFrame
};
hr
=
pDirect3DRMCreate
(
&
pD3DRM
);
hr
=
pDirect3DRMCreate
(
&
pD3DRM
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_d3drm_load
;
info
.
lpMemory
=
data_d3drm_load
;
info
.
dSize
=
strlen
(
data_d3drm_load
);
info
.
dSize
=
strlen
(
data_d3drm_load
);
hr
=
IDirect3DRM_Load
(
pD3DRM
,
&
info
,
NULL
,
(
GUID
**
)
req_refiids
,
1
,
D3DRMLOAD_FROMMEMORY
,
object_load_callback
,
(
LPVOID
)
0xdeadbeef
,
NULL
,
NULL
,
NULL
);
hr
=
IDirect3DRM_Load
(
pD3DRM
,
&
info
,
NULL
,
(
GUID
**
)
req_refiids
,
2
,
D3DRMLOAD_FROMMEMORY
,
object_load_callback
,
(
LPVOID
)
0xdeadbeef
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3DRM_OK
,
"Cannot load data (hr = %x)
\n
"
,
hr
);
ok
(
hr
==
D3DRM_OK
,
"Cannot load data (hr = %x)
\n
"
,
hr
);
ok
(
nb_objects
==
2
,
"Should have loaded 2
objects (got %d)
\n
"
,
nb_objects
);
ok
(
nb_objects
==
3
,
"Should have loaded 3
objects (got %d)
\n
"
,
nb_objects
);
IDirect3DRM_Release
(
pD3DRM
);
IDirect3DRM_Release
(
pD3DRM
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment