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
a4224fe2
Commit
a4224fe2
authored
Dec 17, 2002
by
Jason Edmeades
Committed by
Alexandre Julliard
Dec 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The simple bits of fog.
parent
5caddc78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
6 deletions
+52
-6
device.c
dlls/d3d8/device.c
+52
-6
No files found.
dlls/d3d8/device.c
View file @
a4224fe2
...
...
@@ -535,7 +535,7 @@ void setupTextureStates(LPDIRECT3DDEVICE8 iface, DWORD Stage) {
float
col
[
4
];
/* Make appropriate texture active */
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
i
);
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
Stage
);
checkGLcall
(
"glActiveTextureARB"
);
TRACE
(
"-----------------------> Updating the texture at stage %ld to have new texture state information
\n
"
,
Stage
);
...
...
@@ -2060,16 +2060,62 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
}
break
;
/* Unhandled yet...! */
case
D3DRS_LINEPATTERN
:
case
D3DRS_LASTPIXEL
:
case
D3DRS_FOGENABLE
:
case
D3DRS_ZVISIBLE
:
{
if
(
Value
&&
This
->
StateBlock
.
renderstate
[
D3DRS_FOGTABLEMODE
]
!=
D3DFOG_NONE
)
{
glEnable
(
GL_FOG
);
checkGLcall
(
"glEnable GL_FOG
\n
"
);
}
else
{
glDisable
(
GL_FOG
);
checkGLcall
(
"glDisable GL_FOG
\n
"
);
}
}
break
;
case
D3DRS_FOGCOLOR
:
case
D3DRS_FOGTABLEMODE
:
{
float
col
[
4
];
col
[
0
]
=
((
Value
>>
16
)
&
0xFF
)
/
255
.
0
;
col
[
1
]
=
((
Value
>>
8
)
&
0xFF
)
/
255
.
0
;
col
[
2
]
=
((
Value
>>
0
)
&
0xFF
)
/
255
.
0
;
col
[
3
]
=
((
Value
>>
24
)
&
0xFF
)
/
255
.
0
;
/* Set the default alpha blend color */
glFogfv
(
GL_FOG_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glFog GL_FOG_COLOR"
);
}
break
;
case
D3DRS_FOGSTART
:
{
float
*
f
=
(
float
*
)
&
Value
;
glFogfv
(
GL_FOG_START
,
f
);
checkGLcall
(
"glFogf(GL_FOG_START, (float) Value)"
);
TRACE
(
"Fog Start == %f
\n
"
,
*
f
);
}
break
;
case
D3DRS_FOGEND
:
{
float
*
f
=
(
float
*
)
&
Value
;
glFogfv
(
GL_FOG_END
,
f
);
checkGLcall
(
"glFogf(GL_FOG_END, (float) Value)"
);
TRACE
(
"Fog End == %f
\n
"
,
*
f
);
}
break
;
case
D3DRS_FOGDENSITY
:
{
glFogf
(
GL_FOG_DENSITY
,
(
float
)
Value
);
checkGLcall
(
"glFogf(GL_FOG_DENSITY, (float) Value)"
);
}
break
;
/* Unhandled yet...! */
case
D3DRS_LINEPATTERN
:
case
D3DRS_LASTPIXEL
:
case
D3DRS_ZVISIBLE
:
case
D3DRS_FOGTABLEMODE
:
case
D3DRS_EDGEANTIALIAS
:
case
D3DRS_ZBIAS
:
case
D3DRS_RANGEFOGENABLE
:
...
...
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