Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
96d5d06f
Commit
96d5d06f
authored
Apr 27, 2011
by
Dylan Smith
Committed by
Alexandre Julliard
Apr 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: D3DXCreateMesh rejects declarations with non-zero streams.
parent
c5baf8f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
mesh.c
dlls/d3dx9_36/mesh.c
+4
-0
mesh.c
dlls/d3dx9_36/tests/mesh.c
+10
-0
No files found.
dlls/d3dx9_36/mesh.c
View file @
96d5d06f
...
...
@@ -1132,6 +1132,7 @@ HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options,
D3DFORMAT
index_format
=
D3DFMT_INDEX16
;
DWORD
vertex_usage
=
0
;
D3DPOOL
vertex_pool
=
D3DPOOL_DEFAULT
;
int
i
;
TRACE
(
"(%d, %d, %x, %p, %p, %p)
\n
"
,
numfaces
,
numvertices
,
options
,
declaration
,
device
,
mesh
);
...
...
@@ -1141,6 +1142,9 @@ HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options,
{
return
D3DERR_INVALIDCALL
;
}
for
(
i
=
0
;
declaration
[
i
].
Stream
!=
0xff
;
i
++
)
if
(
declaration
[
i
].
Stream
!=
0
)
return
D3DERR_INVALIDCALL
;
if
(
options
&
D3DXMESH_32BIT
)
index_format
=
D3DFMT_INDEX32
;
...
...
dlls/d3dx9_36/tests/mesh.c
View file @
96d5d06f
...
...
@@ -1036,6 +1036,12 @@ static void D3DXCreateMeshTest(void)
D3DDECL_END
(),
};
static
const
D3DVERTEXELEMENT9
decl3
[]
=
{
{
0
,
0
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
1
,
0
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_NORMAL
,
0
},
D3DDECL_END
(),
};
hr
=
D3DXCreateMesh
(
0
,
0
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
...
...
@@ -1213,6 +1219,10 @@ static void D3DXCreateMeshTest(void)
d3dxmesh
->
lpVtbl
->
Release
(
d3dxmesh
);
}
/* Test a declaration with multiple streams. */
hr
=
D3DXCreateMesh
(
1
,
3
,
D3DXMESH_MANAGED
,
decl3
,
device
,
&
d3dxmesh
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got result %x, expected %x (D3DERR_INVALIDCALL)
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
IDirect3DDevice9_Release
(
device
);
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
wnd
);
...
...
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