Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
e07f8242
Commit
e07f8242
authored
12 years ago
by
Christian Costa
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3drm: Implement IDirect3DRMMeshBuilderX_Scale method.
parent
4c7fb67f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/d3drm/meshbuilder.c
+18
-6
18 additions, 6 deletions
dlls/d3drm/meshbuilder.c
dlls/d3drm/tests/d3drm.c
+27
-0
27 additions, 0 deletions
dlls/d3drm/tests/d3drm.c
with
45 additions
and
6 deletions
dlls/d3drm/meshbuilder.c
+
18
−
6
View file @
e07f8242
/*
* Implementation of IDirect3DRMMeshBuilder
2 I
nterface
* Implementation of IDirect3DRMMeshBuilder
X and IDirect3DRMMesh i
nterface
s
*
* 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
);
FIXM
E
(
"(%p)->(%f,%f,%f)
: stub
\n
"
,
This
,
sx
,
sy
,
sz
);
TRAC
E
(
"(%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
;
FIXM
E
(
"(%p)->(%f,%f,%f)
: stub
\n
"
,
This
,
sx
,
sy
,
sz
);
TRAC
E
(
"(%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
,
...
...
This diff is collapsed.
Click to expand it.
dlls/d3drm/tests/d3drm.c
+
27
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment