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
d5f95961
Commit
d5f95961
authored
May 25, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fog fixes.
parent
40d3cc5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
device.c
dlls/wined3d/device.c
+20
-11
No files found.
dlls/wined3d/device.c
View file @
d5f95961
...
...
@@ -3591,7 +3591,13 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
{
glHint
(
GL_FOG_HINT
,
GL_NICEST
);
switch
(
Value
)
{
case
D3DFOG_NONE
:
/* I don't know what to do here */
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
break
;
case
D3DFOG_NONE
:
{
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGVERTEXMODE
]
==
D3DFOG_NONE
)
{
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
}
/* Otherwise leave the vertex fog value */
break
;
}
case
D3DFOG_EXP
:
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
break
;
case
D3DFOG_EXP2
:
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2"
);
break
;
case
D3DFOG_LINEAR
:
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
break
;
...
...
@@ -3607,16 +3613,19 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
case
WINED3DRS_FOGVERTEXMODE
:
{
glHint
(
GL_FOG_HINT
,
GL_FASTEST
);
switch
(
Value
)
{
case
D3DFOG_NONE
:
/* I don't know what to do here */
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
break
;
case
D3DFOG_EXP
:
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
break
;
case
D3DFOG_EXP2
:
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2"
);
break
;
case
D3DFOG_LINEAR
:
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
break
;
default:
FIXME
(
"Unsupported Value(%lu) for WINED3DRS_FOGTABLEMODE!
\n
"
,
Value
);
}
if
(
GL_SUPPORT
(
NV_FOG_DISTANCE
))
{
glFogi
(
GL_FOG_DISTANCE_MODE_NV
,
This
->
stateBlock
->
renderState
[
WINED3DRS_RANGEFOGENABLE
]
?
GL_EYE_RADIAL_NV
:
GL_EYE_PLANE_ABSOLUTE_NV
);
/* DX 7 sdk: "If both render states(vertex and table fog) are set to valid modes, the system will apply only pixel(=table) fog effects." */
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGTABLEMODE
]
==
D3DFOG_NONE
)
{
switch
(
Value
)
{
case
D3DFOG_EXP
:
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
break
;
case
D3DFOG_EXP2
:
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2"
);
break
;
case
D3DFOG_NONE
:
case
D3DFOG_LINEAR
:
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
break
;
default:
FIXME
(
"Unsupported Value(%lu) for WINED3DRS_FOGTABLEMODE!
\n
"
,
Value
);
}
if
(
GL_SUPPORT
(
NV_FOG_DISTANCE
))
{
glFogi
(
GL_FOG_DISTANCE_MODE_NV
,
This
->
stateBlock
->
renderState
[
WINED3DRS_RANGEFOGENABLE
]
?
GL_EYE_RADIAL_NV
:
GL_EYE_PLANE_ABSOLUTE_NV
);
}
}
}
break
;
...
...
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