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
417534fd
Commit
417534fd
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: Implement ID3DXMesh::DrawSubset.
parent
e2d7fdf1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
mesh.c
dlls/d3dx9_36/mesh.c
+35
-2
No files found.
dlls/d3dx9_36/mesh.c
View file @
417534fd
...
...
@@ -113,10 +113,43 @@ static ULONG WINAPI ID3DXMeshImpl_Release(ID3DXMesh *iface)
static
HRESULT
WINAPI
ID3DXMeshImpl_DrawSubset
(
ID3DXMesh
*
iface
,
DWORD
attrib_id
)
{
ID3DXMeshImpl
*
This
=
impl_from_ID3DXMesh
(
iface
);
HRESULT
hr
;
DWORD
face_start
;
DWORD
face_end
=
0
;
DWORD
vertex_size
;
FIXME
(
"(%p)->(%u): stub
\n
"
,
This
,
attrib_id
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
attrib_id
);
return
E_NOTIMPL
;
vertex_size
=
iface
->
lpVtbl
->
GetNumBytesPerVertex
(
iface
);
hr
=
IDirect3DDevice9_SetVertexDeclaration
(
This
->
device
,
This
->
vertex_declaration
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDirect3DDevice9_SetStreamSource
(
This
->
device
,
0
,
This
->
vertex_buffer
,
0
,
vertex_size
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDirect3DDevice9_SetIndices
(
This
->
device
,
This
->
index_buffer
);
if
(
FAILED
(
hr
))
return
hr
;
while
(
face_end
<
This
->
numfaces
)
{
for
(
face_start
=
face_end
;
face_start
<
This
->
numfaces
;
face_start
++
)
{
if
(
This
->
attrib_buffer
[
face_start
]
==
attrib_id
)
break
;
}
if
(
face_start
>=
This
->
numfaces
)
break
;
for
(
face_end
=
face_start
+
1
;
face_end
<
This
->
numfaces
;
face_end
++
)
{
if
(
This
->
attrib_buffer
[
face_end
]
!=
attrib_id
)
break
;
}
hr
=
IDirect3DDevice9_DrawIndexedPrimitive
(
This
->
device
,
D3DPT_TRIANGLELIST
,
0
,
0
,
This
->
numvertices
,
face_start
*
3
,
face_end
-
face_start
);
if
(
FAILED
(
hr
))
return
hr
;
}
return
D3D_OK
;
}
static
DWORD
WINAPI
ID3DXMeshImpl_GetNumFaces
(
ID3DXMesh
*
iface
)
...
...
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