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
5ba50508
Commit
5ba50508
authored
May 06, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
May 06, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for MultiplyTransform (helps make the SkimmedMesh SDK
sample look better).
parent
cb677f63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
+40
-2
device.c
dlls/d3d8/device.c
+40
-2
No files found.
dlls/d3d8/device.c
View file @
5ba50508
...
@@ -1765,7 +1765,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(LPDIRECT3DDEVICE8 iface, D3DT
...
@@ -1765,7 +1765,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(LPDIRECT3DDEVICE8 iface, D3DT
to the other so that if I ever find out that I need to transpose them, I
to the other so that if I ever find out that I need to transpose them, I
will able to do it quickly, only by changing the macro conv_mat. */
will able to do it quickly, only by changing the macro conv_mat. */
if
(
d3dts
<
256
)
{
if
(
d3dts
<
=
256
)
{
/* WORLDMATRIX(0) == 256! */
switch
(
d3dts
)
{
switch
(
d3dts
)
{
case
D3DTS_WORLDMATRIX
(
0
):
case
D3DTS_WORLDMATRIX
(
0
):
conv_mat
(
lpmatrix
,
&
This
->
StateBlock
->
transforms
[
D3DTS_WORLDMATRIX
(
0
)]);
conv_mat
(
lpmatrix
,
&
This
->
StateBlock
->
transforms
[
D3DTS_WORLDMATRIX
(
0
)]);
...
@@ -1991,8 +1991,46 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(LPDIRECT3DDEVICE8 iface, D3DT
...
@@ -1991,8 +1991,46 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(LPDIRECT3DDEVICE8 iface, D3DT
}
}
HRESULT
WINAPI
IDirect3DDevice8Impl_MultiplyTransform
(
LPDIRECT3DDEVICE8
iface
,
D3DTRANSFORMSTATETYPE
State
,
CONST
D3DMATRIX
*
pMatrix
)
{
HRESULT
WINAPI
IDirect3DDevice8Impl_MultiplyTransform
(
LPDIRECT3DDEVICE8
iface
,
D3DTRANSFORMSTATETYPE
State
,
CONST
D3DMATRIX
*
pMatrix
)
{
D3DMATRIX
*
mat
=
NULL
;
D3DMATRIX
temp
;
/* Note: Using UpdateStateBlock means it would be recorded in a state block change,
but works regardless of recording being on.
If this is found to be wrong, change to StateBlock. */
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
FIXME
(
"(%p) : stub
\n
"
,
This
);
return
D3D_OK
;
TRACE
(
"(%p) : For state %u
\n
"
,
This
,
State
);
if
(
State
<
HIGHEST_TRANSFORMSTATE
)
{
mat
=
&
This
->
UpdateStateBlock
->
transforms
[
State
];
}
else
{
FIXME
(
"Unhandled transform state!!
\n
"
);
}
/* Copied from ddraw code: */
temp
.
u
.
s
.
_11
=
(
mat
->
u
.
s
.
_11
*
pMatrix
->
u
.
s
.
_11
)
+
(
mat
->
u
.
s
.
_21
*
pMatrix
->
u
.
s
.
_12
)
+
(
mat
->
u
.
s
.
_31
*
pMatrix
->
u
.
s
.
_13
)
+
(
mat
->
u
.
s
.
_41
*
pMatrix
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_21
=
(
mat
->
u
.
s
.
_11
*
pMatrix
->
u
.
s
.
_21
)
+
(
mat
->
u
.
s
.
_21
*
pMatrix
->
u
.
s
.
_22
)
+
(
mat
->
u
.
s
.
_31
*
pMatrix
->
u
.
s
.
_23
)
+
(
mat
->
u
.
s
.
_41
*
pMatrix
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_31
=
(
mat
->
u
.
s
.
_11
*
pMatrix
->
u
.
s
.
_31
)
+
(
mat
->
u
.
s
.
_21
*
pMatrix
->
u
.
s
.
_32
)
+
(
mat
->
u
.
s
.
_31
*
pMatrix
->
u
.
s
.
_33
)
+
(
mat
->
u
.
s
.
_41
*
pMatrix
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_41
=
(
mat
->
u
.
s
.
_11
*
pMatrix
->
u
.
s
.
_41
)
+
(
mat
->
u
.
s
.
_21
*
pMatrix
->
u
.
s
.
_42
)
+
(
mat
->
u
.
s
.
_31
*
pMatrix
->
u
.
s
.
_43
)
+
(
mat
->
u
.
s
.
_41
*
pMatrix
->
u
.
s
.
_44
);
temp
.
u
.
s
.
_12
=
(
mat
->
u
.
s
.
_12
*
pMatrix
->
u
.
s
.
_11
)
+
(
mat
->
u
.
s
.
_22
*
pMatrix
->
u
.
s
.
_12
)
+
(
mat
->
u
.
s
.
_32
*
pMatrix
->
u
.
s
.
_13
)
+
(
mat
->
u
.
s
.
_42
*
pMatrix
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_22
=
(
mat
->
u
.
s
.
_12
*
pMatrix
->
u
.
s
.
_21
)
+
(
mat
->
u
.
s
.
_22
*
pMatrix
->
u
.
s
.
_22
)
+
(
mat
->
u
.
s
.
_32
*
pMatrix
->
u
.
s
.
_23
)
+
(
mat
->
u
.
s
.
_42
*
pMatrix
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_32
=
(
mat
->
u
.
s
.
_12
*
pMatrix
->
u
.
s
.
_31
)
+
(
mat
->
u
.
s
.
_22
*
pMatrix
->
u
.
s
.
_32
)
+
(
mat
->
u
.
s
.
_32
*
pMatrix
->
u
.
s
.
_33
)
+
(
mat
->
u
.
s
.
_42
*
pMatrix
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_42
=
(
mat
->
u
.
s
.
_12
*
pMatrix
->
u
.
s
.
_41
)
+
(
mat
->
u
.
s
.
_22
*
pMatrix
->
u
.
s
.
_42
)
+
(
mat
->
u
.
s
.
_32
*
pMatrix
->
u
.
s
.
_43
)
+
(
mat
->
u
.
s
.
_42
*
pMatrix
->
u
.
s
.
_44
);
temp
.
u
.
s
.
_13
=
(
mat
->
u
.
s
.
_13
*
pMatrix
->
u
.
s
.
_11
)
+
(
mat
->
u
.
s
.
_23
*
pMatrix
->
u
.
s
.
_12
)
+
(
mat
->
u
.
s
.
_33
*
pMatrix
->
u
.
s
.
_13
)
+
(
mat
->
u
.
s
.
_43
*
pMatrix
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_23
=
(
mat
->
u
.
s
.
_13
*
pMatrix
->
u
.
s
.
_21
)
+
(
mat
->
u
.
s
.
_23
*
pMatrix
->
u
.
s
.
_22
)
+
(
mat
->
u
.
s
.
_33
*
pMatrix
->
u
.
s
.
_23
)
+
(
mat
->
u
.
s
.
_43
*
pMatrix
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_33
=
(
mat
->
u
.
s
.
_13
*
pMatrix
->
u
.
s
.
_31
)
+
(
mat
->
u
.
s
.
_23
*
pMatrix
->
u
.
s
.
_32
)
+
(
mat
->
u
.
s
.
_33
*
pMatrix
->
u
.
s
.
_33
)
+
(
mat
->
u
.
s
.
_43
*
pMatrix
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_43
=
(
mat
->
u
.
s
.
_13
*
pMatrix
->
u
.
s
.
_41
)
+
(
mat
->
u
.
s
.
_23
*
pMatrix
->
u
.
s
.
_42
)
+
(
mat
->
u
.
s
.
_33
*
pMatrix
->
u
.
s
.
_43
)
+
(
mat
->
u
.
s
.
_43
*
pMatrix
->
u
.
s
.
_44
);
temp
.
u
.
s
.
_14
=
(
mat
->
u
.
s
.
_14
*
pMatrix
->
u
.
s
.
_11
)
+
(
mat
->
u
.
s
.
_24
*
pMatrix
->
u
.
s
.
_12
)
+
(
mat
->
u
.
s
.
_34
*
pMatrix
->
u
.
s
.
_13
)
+
(
mat
->
u
.
s
.
_44
*
pMatrix
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_24
=
(
mat
->
u
.
s
.
_14
*
pMatrix
->
u
.
s
.
_21
)
+
(
mat
->
u
.
s
.
_24
*
pMatrix
->
u
.
s
.
_22
)
+
(
mat
->
u
.
s
.
_34
*
pMatrix
->
u
.
s
.
_23
)
+
(
mat
->
u
.
s
.
_44
*
pMatrix
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_34
=
(
mat
->
u
.
s
.
_14
*
pMatrix
->
u
.
s
.
_31
)
+
(
mat
->
u
.
s
.
_24
*
pMatrix
->
u
.
s
.
_32
)
+
(
mat
->
u
.
s
.
_34
*
pMatrix
->
u
.
s
.
_33
)
+
(
mat
->
u
.
s
.
_44
*
pMatrix
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_44
=
(
mat
->
u
.
s
.
_14
*
pMatrix
->
u
.
s
.
_41
)
+
(
mat
->
u
.
s
.
_24
*
pMatrix
->
u
.
s
.
_42
)
+
(
mat
->
u
.
s
.
_34
*
pMatrix
->
u
.
s
.
_43
)
+
(
mat
->
u
.
s
.
_44
*
pMatrix
->
u
.
s
.
_44
);
/* Apply change via set transform - will reapply to eg. lights this way */
IDirect3DDevice8Impl_SetTransform
(
iface
,
State
,
&
temp
);
return
D3D_OK
;
}
}
HRESULT
WINAPI
IDirect3DDevice8Impl_SetViewport
(
LPDIRECT3DDEVICE8
iface
,
CONST
D3DVIEWPORT8
*
pViewport
)
{
HRESULT
WINAPI
IDirect3DDevice8Impl_SetViewport
(
LPDIRECT3DDEVICE8
iface
,
CONST
D3DVIEWPORT8
*
pViewport
)
{
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
...
...
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