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
e07f8242
Commit
e07f8242
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: Implement IDirect3DRMMeshBuilderX_Scale method.
parent
4c7fb67f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
6 deletions
+45
-6
meshbuilder.c
dlls/d3drm/meshbuilder.c
+18
-6
d3drm.c
dlls/d3drm/tests/d3drm.c
+27
-0
No files found.
dlls/d3drm/meshbuilder.c
View file @
e07f8242
/*
* Implementation of IDirect3DRMMeshBuilder
2 Interface
* Implementation of IDirect3DRMMeshBuilder
X and IDirect3DRMMesh interfaces
*
* Copyright 2010, 2012 Christian Costa
* Copyright 2011 André Hentschel
...
...
@@ -19,10 +19,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#
include "wine/debug.h"
#
define NONAMELESSUNION
#define COBJMACROS
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "dxfile.h"
...
...
@@ -472,9 +474,9 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_Scale(IDirect3DRMMeshBuilder2*
{
IDirect3DRMMeshBuilderImpl
*
This
=
impl_from_IDirect3DRMMeshBuilder2
(
iface
);
FIXME
(
"(%p)->(%f,%f,%f): stub
\n
"
,
This
,
sx
,
sy
,
sz
);
TRACE
(
"(%p)->(%f,%f,%f)
\n
"
,
This
,
sx
,
sy
,
sz
);
return
D3DRM_OK
;
return
IDirect3DRMMeshBuilder3_Scale
(
&
This
->
IDirect3DRMMeshBuilder3_iface
,
sx
,
sy
,
sz
)
;
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder2Impl_Translate
(
IDirect3DRMMeshBuilder2
*
iface
,
...
...
@@ -1415,10 +1417,20 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Scale(IDirect3DRMMeshBuilder3*
D3DVALUE
sx
,
D3DVALUE
sy
,
D3DVALUE
sz
)
{
IDirect3DRMMeshBuilderImpl
*
This
=
impl_from_IDirect3DRMMeshBuilder3
(
iface
);
int
i
;
FIXME
(
"(%p)->(%f,%f,%f): stub
\n
"
,
This
,
sx
,
sy
,
sz
);
TRACE
(
"(%p)->(%f,%f,%f)
\n
"
,
This
,
sx
,
sy
,
sz
);
return
E_NOTIMPL
;
for
(
i
=
0
;
i
<
This
->
nb_vertices
;
i
++
)
{
This
->
pVertices
[
i
].
u1
.
x
*=
sx
;
This
->
pVertices
[
i
].
u2
.
y
*=
sy
;
This
->
pVertices
[
i
].
u3
.
z
*=
sz
;
}
/* Normals are not affected by Scale */
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder3Impl_Translate
(
IDirect3DRMMeshBuilder3
*
iface
,
...
...
dlls/d3drm/tests/d3drm.c
View file @
e07f8242
...
...
@@ -325,6 +325,33 @@ static void test_MeshBuilder(void)
ok
(
f
[
6
]
==
2
,
"Wrong component f[6] = %d (expected 2)
\n
"
,
f
[
6
]);
ok
(
f
[
7
]
==
0
,
"Wrong component f[7] = %d (expected 0)
\n
"
,
f
[
7
]);
hr
=
IDirect3DRMMeshBuilder_Scale
(
pMeshBuilder
,
2
,
3
,
4
);
ok
(
hr
==
D3DRM_OK
,
"Scale failed returning hr = %x
\n
"
,
hr
);
hr
=
IDirect3DRMMeshBuilder_GetVertices
(
pMeshBuilder
,
&
val1
,
v
,
&
val2
,
n
,
&
val3
,
f
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get vertices information (hr = %x)
\n
"
,
hr
);
ok
(
val2
==
3
,
"Wrong number of normals %d (must be 3)
\n
"
,
val2
);
ok
(
val1
==
3
,
"Wrong number of vertices %d (must be 3)
\n
"
,
val1
);
ok
(
U1
(
v
[
0
]).
x
==
0
.
1
f
*
2
,
"Wrong component v[0].x = %f (expected %f)
\n
"
,
U1
(
v
[
0
]).
x
,
0
.
1
f
*
2
);
ok
(
U2
(
v
[
0
]).
y
==
0
.
2
f
*
3
,
"Wrong component v[0].y = %f (expected %f)
\n
"
,
U2
(
v
[
0
]).
y
,
0
.
2
f
*
3
);
ok
(
U3
(
v
[
0
]).
z
==
0
.
3
f
*
4
,
"Wrong component v[0].z = %f (expected %f)
\n
"
,
U3
(
v
[
0
]).
z
,
0
.
3
f
*
4
);
ok
(
U1
(
v
[
1
]).
x
==
0
.
4
f
*
2
,
"Wrong component v[1].x = %f (expected %f)
\n
"
,
U1
(
v
[
1
]).
x
,
0
.
4
f
*
2
);
ok
(
U2
(
v
[
1
]).
y
==
0
.
5
f
*
3
,
"Wrong component v[1].y = %f (expected %f)
\n
"
,
U2
(
v
[
1
]).
y
,
0
.
5
f
*
3
);
ok
(
U3
(
v
[
1
]).
z
==
0
.
6
f
*
4
,
"Wrong component v[1].z = %f (expected %f)
\n
"
,
U3
(
v
[
1
]).
z
,
0
.
6
f
*
4
);
ok
(
U1
(
v
[
2
]).
x
==
0
.
7
f
*
2
,
"Wrong component v[2].x = %f (expected %f)
\n
"
,
U1
(
v
[
2
]).
x
,
0
.
7
f
*
2
);
ok
(
U2
(
v
[
2
]).
y
==
0
.
8
f
*
3
,
"Wrong component v[2].y = %f (expected %f)
\n
"
,
U2
(
v
[
2
]).
y
,
0
.
8
f
*
3
);
ok
(
U3
(
v
[
2
]).
z
==
0
.
9
f
*
4
,
"Wrong component v[2].z = %f (expected %f)
\n
"
,
U3
(
v
[
2
]).
z
,
0
.
9
f
*
4
);
/* Normals are not affected by Scale */
ok
(
U1
(
n
[
0
]).
x
==
1
.
1
f
,
"Wrong component n[0].x = %f (expected %f)
\n
"
,
U1
(
n
[
0
]).
x
,
1
.
1
f
);
ok
(
U2
(
n
[
0
]).
y
==
1
.
2
f
,
"Wrong component n[0].y = %f (expected %f)
\n
"
,
U2
(
n
[
0
]).
y
,
1
.
2
f
);
ok
(
U3
(
n
[
0
]).
z
==
1
.
3
f
,
"Wrong component n[0].z = %f (expected %f)
\n
"
,
U3
(
n
[
0
]).
z
,
1
.
3
f
);
ok
(
U1
(
n
[
1
]).
x
==
1
.
4
f
,
"Wrong component n[1].x = %f (expected %f)
\n
"
,
U1
(
n
[
1
]).
x
,
1
.
4
f
);
ok
(
U2
(
n
[
1
]).
y
==
1
.
5
f
,
"Wrong component n[1].y = %f (expected %f)
\n
"
,
U2
(
n
[
1
]).
y
,
1
.
5
f
);
ok
(
U3
(
n
[
1
]).
z
==
1
.
6
f
,
"Wrong component n[1].z = %f (expected %f)
\n
"
,
U3
(
n
[
1
]).
z
,
1
.
6
f
);
ok
(
U1
(
n
[
2
]).
x
==
1
.
7
f
,
"Wrong component n[2].x = %f (expected %f)
\n
"
,
U1
(
n
[
2
]).
x
,
1
.
7
f
);
ok
(
U2
(
n
[
2
]).
y
==
1
.
8
f
,
"Wrong component n[2].y = %f (expected %f)
\n
"
,
U2
(
n
[
2
]).
y
,
1
.
8
f
);
ok
(
U3
(
n
[
2
]).
z
==
1
.
9
f
,
"Wrong component n[2].z = %f (expected %f)
\n
"
,
U3
(
n
[
2
]).
z
,
1
.
9
f
);
IDirect3DRMMeshBuilder_Release
(
pMeshBuilder
);
IDirect3DRM_Release
(
pD3DRM
);
...
...
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