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
a7692beb
Commit
a7692beb
authored
Mar 12, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Mar 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Make D3DXVec3Unproject support omission of world matrix + test.
parent
a85957ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
math.c
dlls/d3dx9_36/math.c
+6
-2
math.c
dlls/d3dx9_36/tests/math.c
+7
-3
No files found.
dlls/d3dx9_36/math.c
View file @
a7692beb
...
...
@@ -1661,8 +1661,12 @@ D3DXVECTOR3* WINAPI D3DXVec3Unproject(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv,
D3DXMATRIX
m
;
D3DXVECTOR3
out
;
D3DXMatrixMultiply
(
&
m
,
pworld
,
pview
);
D3DXMatrixMultiply
(
&
m
,
&
m
,
pprojection
);
if
(
pworld
)
{
D3DXMatrixMultiply
(
&
m
,
pworld
,
pview
);
D3DXMatrixMultiply
(
&
m
,
&
m
,
pprojection
);
}
else
{
D3DXMatrixMultiply
(
&
m
,
pview
,
pprojection
);
}
D3DXMatrixInverse
(
&
m
,
NULL
,
&
m
);
out
.
x
=
2
.
0
f
*
(
pv
->
x
-
pviewport
->
X
)
/
pviewport
->
Width
-
1
.
0
f
;
out
.
y
=
1
.
0
f
-
2
.
0
f
*
(
pv
->
y
-
pviewport
->
Y
)
/
pviewport
->
Height
;
...
...
dlls/d3dx9_36/tests/math.c
View file @
a7692beb
...
...
@@ -1197,9 +1197,9 @@ static void D3DXVector3Test(void)
expect_vec3
(
expectedvec
,
gotvec
);
/*_______________D3DXVec3Length__________________________*/
expected
=
11
.
0
f
;
got
=
D3DXVec3Length
(
&
u
);
ok
(
relative_error
(
got
,
expected
)
<
admitted_error
,
"Expected: %f, Got: %f
\n
"
,
expected
,
got
);
expected
=
11
.
0
f
;
got
=
D3DXVec3Length
(
&
u
);
ok
(
relative_error
(
got
,
expected
)
<
admitted_error
,
"Expected: %f, Got: %f
\n
"
,
expected
,
got
);
/* Tests the case NULL */
expected
=
0
.
0
f
;
got
=
D3DXVec3Length
(
NULL
);
...
...
@@ -1299,6 +1299,10 @@ static void D3DXVector3Test(void)
D3DXMatrixPerspectiveFovLH
(
&
projection
,
D3DX_PI
/
4
.
0
f
,
20
.
0
f
/
17
.
0
f
,
1
.
0
f
,
1000
.
0
f
);
D3DXVec3Unproject
(
&
gotvec
,
&
u
,
&
viewport
,
&
projection
,
&
view
,
&
world
);
expect_vec3
(
expectedvec
,
gotvec
);
/* World matrix can be omitted */
D3DXMatrixMultiply
(
&
mat
,
&
world
,
&
view
);
D3DXVec3Unproject
(
&
gotvec
,
&
u
,
&
viewport
,
&
projection
,
&
mat
,
NULL
);
expect_vec3
(
expectedvec
,
gotvec
);
}
static
void
D3DXVector4Test
(
void
)
...
...
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