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
acadf3f2
Commit
acadf3f2
authored
Feb 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Replace the light chain with a hashmap.
parent
5fce682f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
54 deletions
+108
-54
device.c
dlls/wined3d/device.c
+0
-0
state.c
dlls/wined3d/state.c
+6
-6
stateblock.c
dlls/wined3d/stateblock.c
+96
-43
wined3d_private.h
dlls/wined3d/wined3d_private.h
+6
-5
No files found.
dlls/wined3d/device.c
View file @
acadf3f2
This diff is collapsed.
Click to expand it.
dlls/wined3d/state.c
View file @
acadf3f2
...
...
@@ -1987,7 +1987,7 @@ static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
* NOTE2: Apparently texture transforms do NOT need reapplying
*/
PLIGHTINFOEL
*
light
Chain
=
NULL
;
PLIGHTINFOEL
*
light
=
NULL
;
glMatrixMode
(
GL_MODELVIEW
);
checkGLcall
(
"glMatrixMode(GL_MODELVIEW)"
);
...
...
@@ -1995,13 +1995,13 @@ static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
checkGLcall
(
"glLoadMatrixf(...)"
);
/* Reset lights. TODO: Call light apply func */
lightChain
=
stateblock
->
lights
;
while
(
lightChain
&&
lightChain
->
glIndex
!=
-
1
)
{
glLightfv
(
GL_LIGHT0
+
lightChain
->
glIndex
,
GL_POSITION
,
lightChain
->
lightPosn
);
for
(
k
=
0
;
k
<
stateblock
->
wineD3DDevice
->
maxConcurrentLights
;
k
++
)
{
light
=
stateblock
->
activeLights
[
k
];
if
(
!
light
)
continue
;
glLightfv
(
GL_LIGHT0
+
light
->
glIndex
,
GL_POSITION
,
light
->
lightPosn
);
checkGLcall
(
"glLightfv posn"
);
glLightfv
(
GL_LIGHT0
+
light
Chain
->
glIndex
,
GL_SPOT_DIRECTION
,
lightChain
->
lightDirn
);
glLightfv
(
GL_LIGHT0
+
light
->
glIndex
,
GL_SPOT_DIRECTION
,
light
->
lightDirn
);
checkGLcall
(
"glLightfv dirn"
);
lightChain
=
lightChain
->
next
;
}
/* Reset Clipping Planes if clipping is enabled. TODO: Call clipplane apply func */
...
...
dlls/wined3d/stateblock.c
View file @
acadf3f2
This diff is collapsed.
Click to expand it.
dlls/wined3d/wined3d_private.h
View file @
acadf3f2
...
...
@@ -517,7 +517,6 @@ struct PLIGHTINFOEL {
WINED3DLIGHT
OriginalParms
;
/* Note D3D8LIGHT == D3D9LIGHT */
DWORD
OriginalIndex
;
LONG
glIndex
;
BOOL
lightEnabled
;
BOOL
changed
;
BOOL
enabledChanged
;
...
...
@@ -527,8 +526,7 @@ struct PLIGHTINFOEL {
float
exponent
;
float
cutoff
;
PLIGHTINFOEL
*
next
;
PLIGHTINFOEL
*
prev
;
struct
list
entry
;
};
/* The default light parameters */
...
...
@@ -1204,8 +1202,11 @@ struct IWineD3DStateBlockImpl
/* Transform */
WINED3DMATRIX
transforms
[
HIGHEST_TRANSFORMSTATE
+
1
];
/* Lights */
PLIGHTINFOEL
*
lights
;
/* NOTE: active GL lights must be front of the chain */
/* Light hashmap . Collisions are handled using standard wine double linked lists */
#define LIGHTMAP_SIZE 43
/* Use of a prime number recommended. Set to 1 for a linked list! */
#define LIGHTMAP_HASHFUNC(x) ((x) % LIGHTMAP_SIZE)
/* Primitive and simple function */
struct
list
lightMap
[
LIGHTMAP_SIZE
];
/* Mashmap containing the lights */
PLIGHTINFOEL
*
activeLights
[
MAX_ACTIVE_LIGHTS
];
/* Map of opengl lights to d3d lights */
/* Clipping */
double
clipplane
[
MAX_CLIPPLANES
][
4
];
...
...
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