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
43d3ba36
Commit
43d3ba36
authored
Oct 31, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Oct 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Init vertices before creating group.
parent
908c2d44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
meshbuilder.c
dlls/d3drm/meshbuilder.c
+12
-18
No files found.
dlls/d3drm/meshbuilder.c
View file @
43d3ba36
...
...
@@ -2081,6 +2081,18 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_CreateMesh(IDirect3DRMMeshBuil
unsigned
*
out_ptr
;
DWORD
*
in_ptr
=
This
->
pFaceData
;
int
i
,
j
;
D3DRMVERTEX
*
vertices
;
vertices
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_vertices
*
sizeof
(
D3DRMVERTEX
));
if
(
!
vertices
)
{
IDirect3DRMMesh_Release
(
*
mesh
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
This
->
nb_vertices
;
i
++
)
vertices
[
i
].
position
=
This
->
pVertices
[
i
];
hr
=
IDirect3DRMMesh_SetVertices
(
*
mesh
,
0
,
0
,
This
->
nb_vertices
,
vertices
);
HeapFree
(
GetProcessHeap
(),
0
,
vertices
);
face_data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
face_data_size
*
sizeof
(
DWORD
));
if
(
!
face_data
)
...
...
@@ -2121,25 +2133,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_CreateMesh(IDirect3DRMMeshBuil
hr
=
IDirect3DRMMesh_AddGroup
(
*
mesh
,
This
->
nb_vertices
,
This
->
nb_faces
,
vertex_per_face
,
face_data
,
&
group
);
HeapFree
(
GetProcessHeap
(),
0
,
face_data
);
if
(
SUCCEEDED
(
hr
))
{
D3DRMVERTEX
*
vertices
;
vertices
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
nb_vertices
*
sizeof
(
D3DRMVERTEX
));
if
(
vertices
)
{
for
(
i
=
0
;
i
<
This
->
nb_vertices
;
i
++
)
{
vertices
[
i
].
position
=
This
->
pVertices
[
i
];
}
hr
=
IDirect3DRMMesh_SetVertices
(
*
mesh
,
0
,
0
,
This
->
nb_vertices
,
vertices
);
HeapFree
(
GetProcessHeap
(),
0
,
vertices
);
}
else
{
hr
=
E_OUTOFMEMORY
;
}
}
if
(
SUCCEEDED
(
hr
))
hr
=
IDirect3DRMMesh_SetGroupColor
(
*
mesh
,
0
,
This
->
color
);
if
(
SUCCEEDED
(
hr
))
...
...
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