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
242b4f3f
Commit
242b4f3f
authored
Jul 16, 2010
by
Misha Koshelev
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Add stub and basic test for D3DXCreateSphere.
parent
df898ea4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
1 deletion
+78
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
mesh.c
dlls/d3dx9_36/mesh.c
+8
-0
mesh.c
dlls/d3dx9_36/tests/mesh.c
+62
-0
d3dx9shape.h
include/d3dx9shape.h
+7
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
242b4f3f
...
...
@@ -87,7 +87,7 @@
@ stub D3DXCreateSkinInfo
@ stub D3DXCreateSkinInfoFromBlendedMesh
@ stub D3DXCreateSkinInfoFVF
@ st
ub D3DXCreateSphere
@ st
dcall D3DXCreateSphere(ptr long long long ptr ptr)
@ stdcall D3DXCreateSprite(ptr ptr)
@ stub D3DXCreateTeapot
@ stub D3DXCreateTextA
...
...
dlls/d3dx9_36/mesh.c
View file @
242b4f3f
...
...
@@ -335,3 +335,11 @@ HRESULT WINAPI D3DXCreateBox(LPDIRECT3DDEVICE9 device, FLOAT width, FLOAT height
return
E_NOTIMPL
;
}
HRESULT
WINAPI
D3DXCreateSphere
(
LPDIRECT3DDEVICE9
device
,
FLOAT
radius
,
UINT
slices
,
UINT
stacks
,
LPD3DXMESH
*
mesh
,
LPD3DXBUFFER
*
adjacency
)
{
FIXME
(
"(%p, %f, %d, %d, %p, %p): stub
\n
"
,
device
,
radius
,
slices
,
stacks
,
mesh
,
adjacency
);
return
E_NOTIMPL
;
}
dlls/d3dx9_36/tests/mesh.c
View file @
242b4f3f
...
...
@@ -479,6 +479,67 @@ static void D3DXIntersectTriTest(void)
ok
(
got_res
==
exp_res
,
"Expected result = %d, got %d
\n
"
,
exp_res
,
got_res
);
}
static
void
D3DXCreateSphereTest
(
void
)
{
HRESULT
hr
;
HWND
wnd
;
IDirect3D9
*
d3d
;
IDirect3DDevice9
*
device
;
D3DPRESENT_PARAMETERS
d3dpp
;
ID3DXMesh
*
sphere
=
NULL
;
hr
=
D3DXCreateSphere
(
NULL
,
0
.
0
f
,
0
,
0
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateSphere
(
NULL
,
0
.
1
f
,
0
,
0
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateSphere
(
NULL
,
0
.
0
f
,
1
,
0
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateSphere
(
NULL
,
0
.
0
f
,
0
,
1
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
wnd
=
CreateWindow
(
"static"
,
"d3dx9_test"
,
0
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
d3d
=
Direct3DCreate9
(
D3D_SDK_VERSION
);
if
(
!
wnd
)
{
skip
(
"Couldn't create application window
\n
"
);
return
;
}
if
(
!
d3d
)
{
skip
(
"Couldn't create IDirect3D9 object
\n
"
);
DestroyWindow
(
wnd
);
return
;
}
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
));
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
hr
=
IDirect3D9_CreateDevice
(
d3d
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
wnd
,
D3DCREATE_MIXED_VERTEXPROCESSING
,
&
d3dpp
,
&
device
);
if
(
FAILED
(
hr
))
{
skip
(
"Failed to create IDirect3DDevice9 object %#x
\n
"
,
hr
);
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
wnd
);
return
;
}
hr
=
D3DXCreateSphere
(
device
,
1
.
0
f
,
1
,
1
,
&
sphere
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateSphere
(
device
,
1
.
0
f
,
2
,
2
,
&
sphere
,
NULL
);
todo_wine
ok
(
hr
==
D3D_OK
,
"Got result %x, expected 0 (D3D_OK)
\n
"
,
hr
);
if
(
sphere
)
sphere
->
lpVtbl
->
Release
(
sphere
);
IDirect3DDevice9_Release
(
device
);
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
wnd
);
}
static
void
test_get_decl_vertex_size
(
void
)
{
static
const
D3DVERTEXELEMENT9
declaration1
[]
=
...
...
@@ -559,5 +620,6 @@ START_TEST(mesh)
D3DXDeclaratorFromFVFTest
();
D3DXGetFVFVertexSizeTest
();
D3DXIntersectTriTest
();
D3DXCreateSphereTest
();
test_get_decl_vertex_size
();
}
include/d3dx9shape.h
View file @
242b4f3f
...
...
@@ -32,6 +32,13 @@ HRESULT WINAPI D3DXCreateBox(LPDIRECT3DDEVICE9 device,
LPD3DXMESH
*
mesh
,
LPD3DXBUFFER
*
adjacency
);
HRESULT
WINAPI
D3DXCreateSphere
(
LPDIRECT3DDEVICE9
device
,
FLOAT
radius
,
UINT
slices
,
UINT
stacks
,
LPD3DXMESH
*
mesh
,
LPD3DXBUFFER
*
adjacency
);
#ifdef __cplusplus
}
#endif
...
...
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