Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b65e790b
Commit
b65e790b
authored
Jun 07, 2005
by
Antoine Chavasse
Committed by
Alexandre Julliard
Jun 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrote the light management API to allow for an unlimited amount of
lights to be set, and only a subset of them to be enabled.
parent
20806c73
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
d3d_private.h
dlls/ddraw/d3d_private.h
+4
-2
device_main.c
dlls/ddraw/device_main.c
+25
-4
device_opengl.c
dlls/ddraw/device_opengl.c
+0
-0
No files found.
dlls/ddraw/d3d_private.h
View file @
b65e790b
...
...
@@ -225,8 +225,10 @@ struct IDirect3DDeviceImpl
DWORD
material
;
/* Light parameters */
DWORD
active_lights
,
set_lights
;
D3DLIGHT7
light_parameters
[
MAX_LIGHTS
];
DWORD
num_set_lights
;
DWORD
max_active_lights
;
LPD3DLIGHT7
light_parameters
;
DWORD
*
active_lights
;
/* clipping planes */
DWORD
max_clipping_planes
;
...
...
dlls/ddraw/device_main.c
View file @
b65e790b
...
...
@@ -642,9 +642,17 @@ Main_IDirect3DDeviceImpl_7_GetLight(LPDIRECT3DDEVICE7 iface,
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
TRACE
(
"(%p/%p)->(%08lx,%p)
\n
"
,
This
,
iface
,
dwLightIndex
,
lpLight
);
if
(
dwLightIndex
>
MAX_LIGHTS
)
return
DDERR_INVALIDPARAMS
;
if
(
dwLightIndex
>=
This
->
num_set_lights
)
return
DDERR_INVALIDPARAMS
;
*
lpLight
=
This
->
light_parameters
[
dwLightIndex
];
/* If dltType is zero, then this light has never been set, either
by calling SetLight or implicitely by calling EnableLight without
calling SetLight first. */
if
(
lpLight
->
dltType
==
0
)
return
DDERR_INVALIDPARAMS
;
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" returning light :
\n
"
);
dump_D3DLIGHT7
(
lpLight
);
...
...
@@ -950,12 +958,25 @@ Main_IDirect3DDeviceImpl_7_GetLightEnable(LPDIRECT3DDEVICE7 iface,
DWORD
dwLightIndex
,
BOOL
*
pbEnable
)
{
int
i
;
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
TRACE
(
"(%p/%p)->(%08lx,%p)
\n
"
,
This
,
iface
,
dwLightIndex
,
pbEnable
);
if
(
dwLightIndex
>
MAX_LIGHTS
)
*
pbEnable
=
0
;
else
*
pbEnable
=
((
0x00000001
<<
dwLightIndex
)
&
This
->
active_lights
)
!=
0
;
*
pbEnable
=
0
;
if
(
dwLightIndex
>=
This
->
num_set_lights
)
return
DDERR_INVALIDPARAMS
;
/* If dltType is zero, then this light has never been set, either
by calling SetLight or implicitely by calling EnableLight without
calling SetLight first. */
if
(
This
->
light_parameters
[
dwLightIndex
].
dltType
==
0
)
return
DDERR_INVALIDPARAMS
;
for
(
i
=
0
;
i
<
This
->
max_active_lights
;
i
++
)
if
(
This
->
active_lights
[
i
]
==
dwLightIndex
)
*
pbEnable
=
TRUE
;
TRACE
(
" returning %d.
\n
"
,
*
pbEnable
);
return
DD_OK
;
...
...
dlls/ddraw/device_opengl.c
View file @
b65e790b
This diff is collapsed.
Click to expand it.
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