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
8bba7cd2
Commit
8bba7cd2
authored
May 21, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Improve IDirect3DRMMeshBuilder3_CreateMesh and forward…
d3drm: Improve IDirect3DRMMeshBuilder3_CreateMesh and forward IDirect3DRMMeshBuilder2_CreateMesh to it.
parent
43fed89d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
6 deletions
+50
-6
meshbuilder.c
dlls/d3drm/meshbuilder.c
+50
-6
No files found.
dlls/d3drm/meshbuilder.c
View file @
8bba7cd2
...
...
@@ -855,13 +855,13 @@ static D3DCOLOR WINAPI IDirect3DRMMeshBuilder2Impl_GetVertexColor(IDirect3DRMMes
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder2Impl_CreateMesh
(
IDirect3DRMMeshBuilder2
*
iface
,
LPDIRECT3DRMMESH
*
ppM
esh
)
LPDIRECT3DRMMESH
*
m
esh
)
{
IDirect3DRMMeshBuilderImpl
*
This
=
impl_from_IDirect3DRMMeshBuilder2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppM
esh
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
m
esh
);
return
Direct3DRMMesh_create
(
ppM
esh
);
return
IDirect3DRMMeshBuilder3_CreateMesh
(
&
This
->
IDirect3DRMMeshBuilder3_iface
,
m
esh
);
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder2Impl_GenerateNormals2
(
IDirect3DRMMeshBuilder2
*
iface
,
...
...
@@ -1812,13 +1812,57 @@ static D3DCOLOR WINAPI IDirect3DRMMeshBuilder3Impl_GetVertexColor(IDirect3DRMMes
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder3Impl_CreateMesh
(
IDirect3DRMMeshBuilder3
*
iface
,
LPDIRECT3DRMMESH
*
M
esh
)
LPDIRECT3DRMMESH
*
m
esh
)
{
IDirect3DRMMeshBuilderImpl
*
This
=
impl_from_IDirect3DRMMeshBuilder3
(
iface
);
HRESULT
hr
;
D3DRMGROUPINDEX
group
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
mesh
);
if
(
!
mesh
)
return
E_POINTER
;
hr
=
Direct3DRMMesh_create
(
mesh
);
if
(
FAILED
(
hr
))
return
hr
;
/* If there is mesh data, create a group and put data inside */
if
(
This
->
nb_vertices
)
{
unsigned
*
face_data
;
unsigned
*
out_ptr
;
DWORD
*
in_ptr
=
This
->
pFaceData
;
int
i
,
j
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Mesh
);
face_data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
face_data_size
*
sizeof
(
DWORD
));
if
(
!
face_data
)
{
IDirect3DRMMesh_Release
(
*
mesh
);
return
E_OUTOFMEMORY
;
}
out_ptr
=
face_data
;
/* Put only vertex indices */
for
(
i
=
0
;
i
<
This
->
nb_faces
;
i
++
)
{
DWORD
nb_indices
=
*
out_ptr
++
=
*
in_ptr
++
;
for
(
j
=
0
;
j
<
nb_indices
;
j
++
)
{
*
out_ptr
++
=
*
in_ptr
++
;
/* Skip normal index */
in_ptr
++
;
}
}
hr
=
IDirect3DRMMesh_AddGroup
(
*
mesh
,
This
->
nb_vertices
,
This
->
nb_faces
,
0
,
face_data
,
&
group
);
if
(
FAILED
(
hr
))
IDirect3DRMMesh_Release
(
*
mesh
);
HeapFree
(
GetProcessHeap
(),
0
,
face_data
);
}
return
Direct3DRMMesh_create
(
Mesh
)
;
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder3Impl_GetFace
(
IDirect3DRMMeshBuilder3
*
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