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
6dc78d5c
Commit
6dc78d5c
authored
Mar 14, 2018
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Cleanup D3DXVec3Unproject() implementation a bit.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
972dc565
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
math.c
dlls/d3dx9_36/math.c
+18
-12
No files found.
dlls/d3dx9_36/math.c
View file @
6dc78d5c
...
@@ -1987,27 +1987,33 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformNormalArray(D3DXVECTOR3* out, UINT outstrid
...
@@ -1987,27 +1987,33 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformNormalArray(D3DXVECTOR3* out, UINT outstrid
return
out
;
return
out
;
}
}
D3DXVECTOR3
*
WINAPI
D3DXVec3Unproject
(
D3DXVECTOR3
*
pout
,
const
D3DXVECTOR3
*
pv
,
const
D3DVIEWPORT9
*
pviewport
,
const
D3DXMATRIX
*
pprojection
,
const
D3DXMATRIX
*
pview
,
const
D3DXMATRIX
*
pworld
)
D3DXVECTOR3
*
WINAPI
D3DXVec3Unproject
(
D3DXVECTOR3
*
out
,
const
D3DXVECTOR3
*
v
,
const
D3DVIEWPORT9
*
viewport
,
const
D3DXMATRIX
*
projection
,
const
D3DXMATRIX
*
view
,
const
D3DXMATRIX
*
world
)
{
{
D3DXMATRIX
m
;
D3DXMATRIX
m
;
TRACE
(
"pout %p, pv %p, pviewport %p, pprojection %p, pview %p, pworlds %p
\n
"
,
pout
,
pv
,
pviewport
,
pprojection
,
pview
,
pworld
);
TRACE
(
"out %p, v %p, viewport %p, projection %p, view %p, world %p.
\n
"
,
out
,
v
,
viewport
,
projection
,
view
,
world
);
D3DXMatrixIdentity
(
&
m
);
D3DXMatrixIdentity
(
&
m
);
if
(
pworld
)
D3DXMatrixMultiply
(
&
m
,
&
m
,
pworld
);
if
(
world
)
if
(
pview
)
D3DXMatrixMultiply
(
&
m
,
&
m
,
pview
);
D3DXMatrixMultiply
(
&
m
,
&
m
,
world
);
if
(
pprojection
)
D3DXMatrixMultiply
(
&
m
,
&
m
,
pprojection
);
if
(
view
)
D3DXMatrixMultiply
(
&
m
,
&
m
,
view
);
if
(
projection
)
D3DXMatrixMultiply
(
&
m
,
&
m
,
projection
);
D3DXMatrixInverse
(
&
m
,
NULL
,
&
m
);
D3DXMatrixInverse
(
&
m
,
NULL
,
&
m
);
*
pout
=
*
p
v
;
*
out
=
*
v
;
if
(
p
viewport
)
if
(
viewport
)
{
{
pout
->
x
=
2
.
0
f
*
(
pout
->
x
-
pviewport
->
X
)
/
p
viewport
->
Width
-
1
.
0
f
;
out
->
x
=
2
.
0
f
*
(
out
->
x
-
viewport
->
X
)
/
viewport
->
Width
-
1
.
0
f
;
pout
->
y
=
1
.
0
f
-
2
.
0
f
*
(
pout
->
y
-
pviewport
->
Y
)
/
p
viewport
->
Height
;
out
->
y
=
1
.
0
f
-
2
.
0
f
*
(
out
->
y
-
viewport
->
Y
)
/
viewport
->
Height
;
pout
->
z
=
(
pout
->
z
-
pviewport
->
MinZ
)
/
(
pviewport
->
MaxZ
-
pviewport
->
MinZ
);
out
->
z
=
(
out
->
z
-
viewport
->
MinZ
)
/
(
viewport
->
MaxZ
-
viewport
->
MinZ
);
}
}
D3DXVec3TransformCoord
(
pout
,
p
out
,
&
m
);
D3DXVec3TransformCoord
(
out
,
out
,
&
m
);
return
p
out
;
return
out
;
}
}
D3DXVECTOR3
*
WINAPI
D3DXVec3UnprojectArray
(
D3DXVECTOR3
*
out
,
UINT
outstride
,
const
D3DXVECTOR3
*
in
,
UINT
instride
,
const
D3DVIEWPORT9
*
viewport
,
const
D3DXMATRIX
*
projection
,
const
D3DXMATRIX
*
view
,
const
D3DXMATRIX
*
world
,
UINT
elements
)
D3DXVECTOR3
*
WINAPI
D3DXVec3UnprojectArray
(
D3DXVECTOR3
*
out
,
UINT
outstride
,
const
D3DXVECTOR3
*
in
,
UINT
instride
,
const
D3DVIEWPORT9
*
viewport
,
const
D3DXMATRIX
*
projection
,
const
D3DXMATRIX
*
view
,
const
D3DXMATRIX
*
world
,
UINT
elements
)
...
...
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