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
a24d1479
Commit
a24d1479
authored
Oct 14, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove the useless "changed" and "enabledChanged" fields from struct wined3d_light_info.
parent
3bc9d189
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
37 deletions
+19
-37
device.c
dlls/wined3d/device.c
+0
-2
stateblock.c
dlls/wined3d/stateblock.c
+19
-33
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-2
No files found.
dlls/wined3d/device.c
View file @
a24d1479
...
...
@@ -2485,7 +2485,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD I
list_add_head
(
&
This
->
updateStateBlock
->
lightMap
[
Hi
],
&
object
->
entry
);
object
->
glIndex
=
-
1
;
object
->
OriginalIndex
=
Index
;
object
->
changed
=
TRUE
;
}
/* Initialize the object */
...
...
@@ -2636,7 +2635,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
}
}
lightInfo
->
enabledChanged
=
TRUE
;
if
(
!
Enable
)
{
if
(
lightInfo
->
glIndex
!=
-
1
)
{
if
(
!
This
->
isRecordingState
)
{
...
...
dlls/wined3d/stateblock.c
View file @
a24d1479
...
...
@@ -447,8 +447,6 @@ static void stateblock_init_lights(IWineD3DStateBlockImpl *stateblock, struct li
struct
wined3d_light_info
*
dst_light
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dst_light
));
*
dst_light
=
*
src_light
;
dst_light
->
changed
=
TRUE
;
dst_light
->
enabledChanged
=
TRUE
;
list_add_tail
(
&
stateblock
->
lightMap
[
i
],
&
dst_light
->
entry
);
}
}
...
...
@@ -561,42 +559,34 @@ static void record_lights(IWineD3DStateBlockImpl *This, const IWineD3DStateBlock
LIST_FOR_EACH
(
e
,
&
This
->
lightMap
[
i
])
{
BOOL
updated
=
FALSE
;
struct
wined3d_light_info
*
src
=
LIST_ENTRY
(
e
,
struct
wined3d_light_info
,
entry
),
*
realLight
;
if
(
!
src
->
changed
&&
!
src
->
enabledChanged
)
continue
;
/* Look up the light in the destination */
LIST_FOR_EACH
(
f
,
&
targetStateBlock
->
lightMap
[
i
])
{
realLight
=
LIST_ENTRY
(
f
,
struct
wined3d_light_info
,
entry
);
if
(
realLight
->
OriginalIndex
==
src
->
OriginalIndex
)
{
if
(
src
->
changed
)
{
src
->
OriginalParms
=
realLight
->
OriginalParms
;
if
(
realLight
->
OriginalIndex
==
src
->
OriginalIndex
)
{
src
->
OriginalParms
=
realLight
->
OriginalParms
;
if
(
realLight
->
glIndex
==
-
1
&&
src
->
glIndex
!=
-
1
)
{
/* Light disabled */
This
->
activeLights
[
src
->
glIndex
]
=
NULL
;
}
if
(
src
->
enabledChanged
)
{
/* Need to double check because enabledChanged does not catch enabled -> disabled -> enabled
* or disabled -> enabled -> disabled changes
*/
if
(
realLight
->
glIndex
==
-
1
&&
src
->
glIndex
!=
-
1
)
{
/* Light disabled */
This
->
activeLights
[
src
->
glIndex
]
=
NULL
;
}
else
if
(
realLight
->
glIndex
!=
-
1
&&
src
->
glIndex
==
-
1
){
/* Light enabled */
This
->
activeLights
[
realLight
->
glIndex
]
=
src
;
}
src
->
glIndex
=
realLight
->
glIndex
;
else
if
(
realLight
->
glIndex
!=
-
1
&&
src
->
glIndex
==
-
1
)
{
/* Light enabled */
This
->
activeLights
[
realLight
->
glIndex
]
=
src
;
}
src
->
glIndex
=
realLight
->
glIndex
;
updated
=
TRUE
;
break
;
}
}
if
(
updated
)
{
/* Found a light, all done, proceed with next hash entry */
continue
;
}
else
if
(
src
->
changed
)
{
/* Otherwise assign defaul params */
src
->
OriginalParms
=
WINED3D_default_light
;
}
else
{
/* Not enabled by default */
src
->
glIndex
=
-
1
;
if
(
!
updated
)
{
ERR
(
"Light %u in stateblock %p does not exist in device stateblock %p.
\n
"
,
src
->
OriginalIndex
,
This
,
targetStateBlock
);
}
}
}
...
...
@@ -987,12 +977,8 @@ static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl *
{
const
struct
wined3d_light_info
*
light
=
LIST_ENTRY
(
e
,
struct
wined3d_light_info
,
entry
);
if
(
light
->
changed
)
{
IWineD3DDevice_SetLight
(
pDevice
,
light
->
OriginalIndex
,
&
light
->
OriginalParms
);
}
if
(
light
->
enabledChanged
)
{
IWineD3DDevice_SetLightEnable
(
pDevice
,
light
->
OriginalIndex
,
light
->
glIndex
!=
-
1
);
}
IWineD3DDevice_SetLight
(
pDevice
,
light
->
OriginalIndex
,
&
light
->
OriginalParms
);
IWineD3DDevice_SetLightEnable
(
pDevice
,
light
->
OriginalIndex
,
light
->
glIndex
!=
-
1
);
}
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
a24d1479
...
...
@@ -1208,8 +1208,6 @@ struct wined3d_light_info
WINED3DLIGHT
OriginalParms
;
/* Note D3D8LIGHT == D3D9LIGHT */
DWORD
OriginalIndex
;
LONG
glIndex
;
BOOL
changed
;
BOOL
enabledChanged
;
BOOL
enabled
;
/* Converted parms to speed up swapping lights */
...
...
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