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
479c13b8
Commit
479c13b8
authored
Aug 06, 2004
by
Christian Costa
Committed by
Alexandre Julliard
Aug 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented IDirect3DDevice{2,3}::GetLightState.
Fixed traces in execute buffers. Updated copyright info.
parent
4604e660
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
7 deletions
+66
-7
d3d_private.h
dlls/ddraw/d3d_private.h
+6
-1
main.c
dlls/ddraw/d3ddevice/main.c
+2
-1
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+56
-3
d3dexecutebuffer.c
dlls/ddraw/d3dexecutebuffer.c
+2
-2
No files found.
dlls/ddraw/d3d_private.h
View file @
479c13b8
/* Direct3D private include file
* Copyright (c) 1998 Lionel ULMER
* Copyright (c) 1998-2004 Lionel ULMER
* Copyright (c) 2002-2004 Christian Costa
*
* This file contains all the structure that are not exported
* through d3d.h and all common macros.
...
...
@@ -195,6 +196,7 @@ struct IDirect3DDeviceImpl
ICOM_VFIELD_MULTI
(
IDirect3DDevice2
);
ICOM_VFIELD_MULTI
(
IDirect3DDevice
);
DWORD
ref
;
/* IDirect3DDevice fields */
IDirectDrawImpl
*
d3d
;
IDirectDrawSurfaceImpl
*
surface
;
...
...
@@ -216,6 +218,9 @@ struct IDirect3DDeviceImpl
/* Current material used in D3D7 mode */
D3DMATERIAL7
current_material
;
/* Light state */
DWORD
material
;
/* Light parameters */
DWORD
active_lights
,
set_lights
;
D3DLIGHT7
light_parameters
[
MAX_LIGHTS
];
...
...
dlls/ddraw/d3ddevice/main.c
View file @
479c13b8
/* Direct3D Device
* Copyright (c) 1998 Lionel ULMER
* Copyright (c) 1998-2004 Lionel ULMER
* Copyright (c) 2002-2004 Christian Costa
*
* This file contains all the common stuff for D3D devices.
*
...
...
dlls/ddraw/d3ddevice/mesa.c
View file @
479c13b8
/* Direct3D Device
* Copyright (c) 1998 Lionel ULMER
* Copyright (c) 1998-2004 Lionel ULMER
* Copyright (c) 2002-2004 Christian Costa
*
* This file contains the MESA implementation of all the D3D devices that
* Wine supports.
...
...
@@ -724,6 +725,57 @@ GL_IDirect3DDeviceImpl_7_3T_2T_GetRenderState(LPDIRECT3DDEVICE7 iface,
}
HRESULT
WINAPI
GL_IDirect3DDeviceImpl_3_2T_GetLightState
(
LPDIRECT3DDEVICE3
iface
,
D3DLIGHTSTATETYPE
dwLightStateType
,
LPDWORD
lpdwLightState
)
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice3
,
iface
);
TRACE
(
"(%p/%p)->(%08x,%p)
\n
"
,
This
,
iface
,
dwLightStateType
,
lpdwLightState
);
if
(
!
dwLightStateType
&&
(
dwLightStateType
>
D3DLIGHTSTATE_COLORVERTEX
))
{
TRACE
(
"Unexpected Light State Type
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
if
(
dwLightStateType
==
D3DLIGHTSTATE_MATERIAL
/* 1 */
)
{
*
lpdwLightState
=
This
->
material
;
}
else
if
(
dwLightStateType
==
D3DLIGHTSTATE_COLORMODEL
/* 3 */
)
{
*
lpdwLightState
=
D3DCOLOR_RGB
;
}
else
{
D3DRENDERSTATETYPE
rs
;
switch
(
dwLightStateType
)
{
case
D3DLIGHTSTATE_AMBIENT
:
/* 2 */
rs
=
D3DRENDERSTATE_AMBIENT
;
break
;
case
D3DLIGHTSTATE_FOGMODE
:
/* 4 */
rs
=
D3DRENDERSTATE_FOGVERTEXMODE
;
break
;
case
D3DLIGHTSTATE_FOGSTART
:
/* 5 */
rs
=
D3DRENDERSTATE_FOGSTART
;
break
;
case
D3DLIGHTSTATE_FOGEND
:
/* 6 */
rs
=
D3DRENDERSTATE_FOGEND
;
break
;
case
D3DLIGHTSTATE_FOGDENSITY
:
/* 7 */
rs
=
D3DRENDERSTATE_FOGDENSITY
;
break
;
case
D3DLIGHTSTATE_COLORVERTEX
:
/* 8 */
rs
=
D3DRENDERSTATE_COLORVERTEX
;
break
;
default:
ERR
(
"Unknown D3DLIGHTSTATETYPE %d.
\n
"
,
dwLightStateType
);
return
DDERR_INVALIDPARAMS
;
}
IDirect3DDevice7_GetRenderState
(
ICOM_INTERFACE
(
This
,
IDirect3DDevice7
),
rs
,
lpdwLightState
);
}
return
DD_OK
;
}
HRESULT
WINAPI
GL_IDirect3DDeviceImpl_3_2T_SetLightState
(
LPDIRECT3DDEVICE3
iface
,
D3DLIGHTSTATETYPE
dwLightStateType
,
DWORD
dwLightState
)
...
...
@@ -746,6 +798,7 @@ GL_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
}
else
{
FIXME
(
" D3DLIGHTSTATE_MATERIAL called with NULL material !!!
\n
"
);
}
This
->
material
=
dwLightState
;
}
else
if
(
dwLightStateType
==
D3DLIGHTSTATE_COLORMODEL
/* 3 */
)
{
switch
(
dwLightState
)
{
case
D3DCOLOR_MONO
:
...
...
@@ -1119,7 +1172,7 @@ inline static void handle_xyz(D3DVALUE *coords) {
glVertex3fv
(
coords
);
}
inline
static
void
handle_xyzrhw
(
D3DVALUE
*
coords
)
{
if
(
coords
[
3
]
<
1e-8
)
if
(
(
coords
[
3
]
<
1e-8
)
&&
(
coords
[
3
]
>
-
1e-8
)
)
glVertex3fv
(
coords
);
else
{
GLfloat
w
=
1
.
0
/
coords
[
3
];
...
...
@@ -2608,7 +2661,7 @@ ICOM_VTABLE(IDirect3DDevice3) VTABLE_IDirect3DDevice3 =
XCAST
(
End
)
Main_IDirect3DDeviceImpl_3_2T_End
,
XCAST
(
GetRenderState
)
Thunk_IDirect3DDeviceImpl_3_GetRenderState
,
XCAST
(
SetRenderState
)
Thunk_IDirect3DDeviceImpl_3_SetRenderState
,
XCAST
(
GetLightState
)
Main
_IDirect3DDeviceImpl_3_2T_GetLightState
,
XCAST
(
GetLightState
)
GL
_IDirect3DDeviceImpl_3_2T_GetLightState
,
XCAST
(
SetLightState
)
GL_IDirect3DDeviceImpl_3_2T_SetLightState
,
XCAST
(
SetTransform
)
Thunk_IDirect3DDeviceImpl_3_SetTransform
,
XCAST
(
GetTransform
)
Thunk_IDirect3DDeviceImpl_3_GetTransform
,
...
...
dlls/ddraw/d3dexecutebuffer.c
View file @
479c13b8
...
...
@@ -331,8 +331,8 @@ static void execute(IDirect3DExecuteBufferImpl *This,
dump_D3DMATRIX
(
lpDevice
->
proj_mat
);
TRACE
(
" View Matrix : (%p)
\n
"
,
lpDevice
->
view_mat
);
dump_D3DMATRIX
(
lpDevice
->
view_mat
);
TRACE
(
" World Matrix : (%p)
\n
"
,
&
mat
);
dump_D3DMATRIX
(
&
mat
);
TRACE
(
" World Matrix : (%p)
\n
"
,
lpDevice
->
world_
mat
);
dump_D3DMATRIX
(
lpDevice
->
world_
mat
);
}
multiply_matrix
(
&
mat
,
lpDevice
->
view_mat
,
lpDevice
->
world_mat
);
...
...
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