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
3a386645
Commit
3a386645
authored
Dec 04, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the "colRGBA" variable in light().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8ba075a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
23 deletions
+3
-23
state.c
dlls/wined3d/state.c
+3
-23
No files found.
dlls/wined3d/state.c
View file @
3a386645
...
...
@@ -4152,35 +4152,15 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s
else
{
float
quad_att
;
float
colRGBA
[]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
/* Light settings are affected by the model view in OpenGL, the View transform in direct3d*/
gl_info
->
gl_ops
.
gl
.
p_glMatrixMode
(
GL_MODELVIEW
);
gl_info
->
gl_ops
.
gl
.
p_glPushMatrix
();
gl_info
->
gl_ops
.
gl
.
p_glLoadMatrixf
(
&
state
->
transforms
[
WINED3D_TS_VIEW
].
_11
);
/* Diffuse: */
colRGBA
[
0
]
=
lightInfo
->
OriginalParms
.
diffuse
.
r
;
colRGBA
[
1
]
=
lightInfo
->
OriginalParms
.
diffuse
.
g
;
colRGBA
[
2
]
=
lightInfo
->
OriginalParms
.
diffuse
.
b
;
colRGBA
[
3
]
=
lightInfo
->
OriginalParms
.
diffuse
.
a
;
gl_info
->
gl_ops
.
gl
.
p_glLightfv
(
GL_LIGHT0
+
Index
,
GL_DIFFUSE
,
colRGBA
);
checkGLcall
(
"glLightfv"
);
/* Specular */
colRGBA
[
0
]
=
lightInfo
->
OriginalParms
.
specular
.
r
;
colRGBA
[
1
]
=
lightInfo
->
OriginalParms
.
specular
.
g
;
colRGBA
[
2
]
=
lightInfo
->
OriginalParms
.
specular
.
b
;
colRGBA
[
3
]
=
lightInfo
->
OriginalParms
.
specular
.
a
;
gl_info
->
gl_ops
.
gl
.
p_glLightfv
(
GL_LIGHT0
+
Index
,
GL_SPECULAR
,
colRGBA
);
checkGLcall
(
"glLightfv"
);
/* Ambient */
colRGBA
[
0
]
=
lightInfo
->
OriginalParms
.
ambient
.
r
;
colRGBA
[
1
]
=
lightInfo
->
OriginalParms
.
ambient
.
g
;
colRGBA
[
2
]
=
lightInfo
->
OriginalParms
.
ambient
.
b
;
colRGBA
[
3
]
=
lightInfo
->
OriginalParms
.
ambient
.
a
;
gl_info
->
gl_ops
.
gl
.
p_glLightfv
(
GL_LIGHT0
+
Index
,
GL_AMBIENT
,
colRGBA
);
gl_info
->
gl_ops
.
gl
.
p_glLightfv
(
GL_LIGHT0
+
Index
,
GL_DIFFUSE
,
&
lightInfo
->
OriginalParms
.
diffuse
.
r
);
gl_info
->
gl_ops
.
gl
.
p_glLightfv
(
GL_LIGHT0
+
Index
,
GL_SPECULAR
,
&
lightInfo
->
OriginalParms
.
specular
.
r
);
gl_info
->
gl_ops
.
gl
.
p_glLightfv
(
GL_LIGHT0
+
Index
,
GL_AMBIENT
,
&
lightInfo
->
OriginalParms
.
ambient
.
r
);
checkGLcall
(
"glLightfv"
);
if
((
lightInfo
->
OriginalParms
.
range
*
lightInfo
->
OriginalParms
.
range
)
>=
FLT_MIN
)
...
...
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