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
0dade720
Commit
0dade720
authored
Aug 21, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement range based fog and advertize it correctly.
parent
04d62b43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
directx.c
dlls/wined3d/directx.c
+3
-1
state.c
dlls/wined3d/state.c
+15
-3
No files found.
dlls/wined3d/directx.c
View file @
0dade720
...
...
@@ -1889,7 +1889,6 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DPRASTERCAPS_ZFOG
|
WINED3DPRASTERCAPS_FOGVERTEX
|
WINED3DPRASTERCAPS_FOGTABLE
|
WINED3DPRASTERCAPS_FOGRANGE
|
WINED3DPRASTERCAPS_STIPPLE
|
WINED3DPRASTERCAPS_SUBPIXEL
|
WINED3DPRASTERCAPS_ZTEST
|
...
...
@@ -1902,6 +1901,9 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DPRASTERCAPS_ZBIAS
|
WINED3DPRASTERCAPS_MIPMAPLODBIAS
;
}
if
(
GL_SUPPORT
(
NV_FOG_DISTANCE
))
{
*
pCaps
->
RasterCaps
|=
WINED3DPRASTERCAPS_FOGRANGE
;
}
/* FIXME Add:
WINED3DPRASTERCAPS_COLORPERSPECTIVE
WINED3DPRASTERCAPS_STRETCHBLTMULTISAMPLE
...
...
dlls/wined3d/state.c
View file @
0dade720
...
...
@@ -988,9 +988,21 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
checkGLcall
(
"glFogf(GL_FOG_END, fogend"
);
}
}
}
if
(
GL_SUPPORT
(
NV_FOG_DISTANCE
))
{
glFogi
(
GL_FOG_DISTANCE_MODE_NV
,
GL_EYE_PLANE_ABSOLUTE_NV
);
static
void
state_rangefog
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
if
(
stateblock
->
renderState
[
WINED3DRS_RANGEFOGENABLE
])
{
if
(
GL_SUPPORT
(
NV_FOG_DISTANCE
))
{
glFogi
(
GL_FOG_DISTANCE_MODE_NV
,
GL_EYE_RADIAL_NV
);
checkGLcall
(
"glFogi(GL_FOG_DISTANCE_MODE_NV, GL_EYE_RADIAL_NV)"
);
}
else
{
WARN
(
"Range fog enabled, but not supported by this opengl implementation
\n
"
);
}
}
else
{
if
(
GL_SUPPORT
(
NV_FOG_DISTANCE
))
{
glFogi
(
GL_FOG_DISTANCE_MODE_NV
,
GL_EYE_PLANE_ABSOLUTE_NV
);
checkGLcall
(
"glFogi(GL_FOG_DISTANCE_MODE_NV, GL_EYE_PLANE_ABSOLUTE_NV)"
);
}
}
}
...
...
@@ -3534,7 +3546,7 @@ const struct StateEntry StateTable[] =
{
/* 45, WINED3DRS_TEXTUREADDRESSV */
0
,
/* Handled in ddraw */
state_undefined
},
{
/* 46, WINED3DRS_MIPMAPLODBIAS */
STATE_RENDER
(
WINED3DRS_MIPMAPLODBIAS
),
state_mipmaplodbias
},
{
/* 47, WINED3DRS_ZBIAS */
STATE_RENDER
(
WINED3DRS_ZBIAS
),
state_zbias
},
{
/* 48, WINED3DRS_RANGEFOGENABLE */
0
,
state_nogl
},
{
/* 48, WINED3DRS_RANGEFOGENABLE */
STATE_RENDER
(
WINED3DRS_RANGEFOGENABLE
),
state_rangefog
},
{
/* 49, WINED3DRS_ANISOTROPY */
STATE_RENDER
(
WINED3DRS_ANISOTROPY
),
state_anisotropy
},
{
/* 50, WINED3DRS_FLUSHBATCH */
STATE_RENDER
(
WINED3DRS_FLUSHBATCH
),
state_flushbatch
},
{
/* 51, WINED3DRS_TRANSLUCENTSORTINDEPENDENT */
STATE_RENDER
(
WINED3DRS_TRANSLUCENTSORTINDEPENDENT
),
state_translucentsi
},
...
...
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