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
b55b683b
Commit
b55b683b
authored
Dec 11, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DLIGHTTYPE typedef.
parent
d806c37b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
21 deletions
+20
-21
device.c
dlls/wined3d/device.c
+9
-9
state.c
dlls/wined3d/state.c
+3
-3
wined3d.h
include/wine/wined3d.h
+8
-9
No files found.
dlls/wined3d/device.c
View file @
b55b683b
...
...
@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
/* Define the default light parameters as specified by MSDN. */
const
struct
wined3d_light
WINED3D_default_light
=
{
WINED3D
LIGHT_DIRECTIONAL
,
/* Type */
WINED3D
_LIGHT_DIRECTIONAL
,
/* Type */
{
1
.
0
f
,
1
.
0
f
,
1
.
0
f
,
0
.
0
f
},
/* Diffuse r,g,b,a */
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
/* Specular r,g,b,a */
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
/* Ambient r,g,b,a, */
...
...
@@ -1898,10 +1898,10 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
switch
(
light
->
type
)
{
case
WINED3DLIGHT_POINT
:
case
WINED3DLIGHT_SPOT
:
case
WINED3DLIGHT_PARALLELPOINT
:
case
WINED3DLIGHT_GLSPOT
:
case
WINED3D
_
LIGHT_POINT
:
case
WINED3D
_
LIGHT_SPOT
:
case
WINED3D
_
LIGHT_PARALLELPOINT
:
case
WINED3D
_
LIGHT_GLSPOT
:
/* Incorrect attenuation values can cause the gl driver to crash.
* Happens with Need for speed most wanted. */
if
(
light
->
attenuation0
<
0
.
0
f
||
light
->
attenuation1
<
0
.
0
f
||
light
->
attenuation2
<
0
.
0
f
)
...
...
@@ -1911,7 +1911,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
}
break
;
case
WINED3DLIGHT_DIRECTIONAL
:
case
WINED3D
_
LIGHT_DIRECTIONAL
:
/* Ignores attenuation */
break
;
...
...
@@ -1958,7 +1958,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
switch
(
light
->
type
)
{
case
WINED3DLIGHT_POINT
:
case
WINED3D
_
LIGHT_POINT
:
/* Position */
object
->
lightPosn
[
0
]
=
light
->
position
.
x
;
object
->
lightPosn
[
1
]
=
light
->
position
.
y
;
...
...
@@ -1968,7 +1968,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
/* FIXME: Range */
break
;
case
WINED3DLIGHT_DIRECTIONAL
:
case
WINED3D
_
LIGHT_DIRECTIONAL
:
/* Direction */
object
->
lightPosn
[
0
]
=
-
light
->
direction
.
x
;
object
->
lightPosn
[
1
]
=
-
light
->
direction
.
y
;
...
...
@@ -1978,7 +1978,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
object
->
cutoff
=
180
.
0
f
;
break
;
case
WINED3DLIGHT_SPOT
:
case
WINED3D
_
LIGHT_SPOT
:
/* Position */
object
->
lightPosn
[
0
]
=
light
->
position
.
x
;
object
->
lightPosn
[
1
]
=
light
->
position
.
y
;
...
...
dlls/wined3d/state.c
View file @
b55b683b
...
...
@@ -4688,7 +4688,7 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s
switch
(
lightInfo
->
OriginalParms
.
type
)
{
case
WINED3DLIGHT_POINT
:
case
WINED3D
_
LIGHT_POINT
:
/* Position */
glLightfv
(
GL_LIGHT0
+
Index
,
GL_POSITION
,
&
lightInfo
->
lightPosn
[
0
]);
checkGLcall
(
"glLightfv"
);
...
...
@@ -4706,7 +4706,7 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s
/* FIXME: Range */
break
;
case
WINED3DLIGHT_SPOT
:
case
WINED3D
_
LIGHT_SPOT
:
/* Position */
glLightfv
(
GL_LIGHT0
+
Index
,
GL_POSITION
,
&
lightInfo
->
lightPosn
[
0
]);
checkGLcall
(
"glLightfv"
);
...
...
@@ -4729,7 +4729,7 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s
/* FIXME: Range */
break
;
case
WINED3DLIGHT_DIRECTIONAL
:
case
WINED3D
_
LIGHT_DIRECTIONAL
:
/* Direction */
glLightfv
(
GL_LIGHT0
+
Index
,
GL_POSITION
,
&
lightInfo
->
lightPosn
[
0
]);
/* Note gl uses w position of 0 for direction! */
checkGLcall
(
"glLightfv"
);
...
...
include/wine/wined3d.h
View file @
b55b683b
...
...
@@ -65,15 +65,14 @@
#define WINEDDERR_NOCLIPLIST MAKE_WINED3DHRESULT(205)
#define WINEDDERR_OVERLAYNOTVISIBLE MAKE_WINED3DHRESULT(577)
typedef
enum
_WINED3DLIGHTTYPE
enum
wined3d_light_type
{
WINED3DLIGHT_POINT
=
1
,
WINED3DLIGHT_SPOT
=
2
,
WINED3DLIGHT_DIRECTIONAL
=
3
,
WINED3DLIGHT_PARALLELPOINT
=
4
,
/* D3D7 */
WINED3DLIGHT_GLSPOT
=
5
,
/* D3D7 */
WINED3DLIGHT_FORCE_DWORD
=
0x7fffffff
}
WINED3DLIGHTTYPE
;
WINED3D_LIGHT_POINT
=
1
,
WINED3D_LIGHT_SPOT
=
2
,
WINED3D_LIGHT_DIRECTIONAL
=
3
,
WINED3D_LIGHT_PARALLELPOINT
=
4
,
/* D3D7 */
WINED3D_LIGHT_GLSPOT
=
5
,
/* D3D7 */
};
typedef
enum
_WINED3DPRIMITIVETYPE
{
...
...
@@ -1553,7 +1552,7 @@ struct wined3d_matrix
struct
wined3d_light
{
WINED3DLIGHTTYPE
type
;
enum
wined3d_light_type
type
;
struct
wined3d_color
diffuse
;
struct
wined3d_color
specular
;
struct
wined3d_color
ambient
;
...
...
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