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
701ce97d
Commit
701ce97d
authored
Jun 16, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add and use GL_EXT_fog_coord defines.
parent
bdb4fab7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
20 deletions
+31
-20
device.c
dlls/wined3d/device.c
+14
-14
drawprim.c
dlls/wined3d/drawprim.c
+6
-6
wined3d_gl.h
include/wine/wined3d_gl.h
+11
-0
No files found.
dlls/wined3d/device.c
View file @
701ce97d
...
...
@@ -3830,8 +3830,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FRAGMENT_DEPTH
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FRAGMENT_DEPTH
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT
"
);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGSTART
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGSTART
]);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGEND
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGEND
]);
}
...
...
@@ -3843,8 +3843,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FRAGMENT_DEPTH
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FRAGMENT_DEPTH
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT
"
);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGSTART
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGSTART
]);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGEND
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGEND
]);
}
...
...
@@ -3856,8 +3856,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FRAGMENT_DEPTH
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FRAGMENT_DEPTH
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT
"
);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGSTART
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGSTART
]);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGEND
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGEND
]);
}
...
...
@@ -3870,8 +3870,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
* Same happens with Vertexfog on transformed vertices
*/
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FOG_COORD
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FOG_COORD
)
\n
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FOG_COORDINATE_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT
)
\n
"
);
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR)"
);
glFogf
(
GL_FOG_START
,
(
float
)
0xff
);
...
...
@@ -3894,8 +3894,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case
D3DFOG_EXP
:
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FRAGMENT_DEPTH
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FRAGMENT_DEPTH
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT
"
);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGSTART
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGSTART
]);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGEND
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGEND
]);
}
...
...
@@ -3903,8 +3903,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case
D3DFOG_EXP2
:
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FRAGMENT_DEPTH
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FRAGMENT_DEPTH
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT
"
);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGSTART
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGSTART
]);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGEND
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGEND
]);
}
...
...
@@ -3912,8 +3912,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D
case
D3DFOG_LINEAR
:
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FRAGMENT_DEPTH
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FRAGMENT_DEPTH
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT
"
);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGSTART
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGSTART
]);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGEND
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGEND
]);
}
...
...
dlls/wined3d/drawprim.c
View file @
701ce97d
...
...
@@ -222,8 +222,8 @@ void d3ddevice_set_ortho(IWineD3DDeviceImpl *This) {
/* Vertex fog on transformed vertices? Use the calculated fog factor stored in the specular color */
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGENABLE
]
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGVERTEXMODE
]
!=
D3DFOG_NONE
)
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FOG_COORD
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FOG_COORD
)"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FOG_COORDINATE_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT
)"
);
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR)"
);
/* The dx fog range in this case is fixed to 0 - 255,
...
...
@@ -338,8 +338,8 @@ static BOOL primitiveInitState(IWineD3DDevice *iface, BOOL vtx_transformed, BOOL
/* Restore fogging */
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGENABLE
]
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGVERTEXMODE
]
!=
D3DFOG_NONE
)
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORD
_SRC
,
GL_FRAGMENT_DEPTH
);
checkGLcall
(
"glFogi(GL_FOG_COORD
_SRC, GL_FRAGMENT_DEPTH
)
\n
"
);
glFogi
(
GL_FOG_COORD
INATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORD
INATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT
)
\n
"
);
/* Reapply the fog range */
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGSTART
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGSTART
]);
IWineD3DDevice_SetRenderState
(
iface
,
WINED3DRS_FOGEND
,
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGEND
]);
...
...
@@ -1046,7 +1046,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
if (sd->u.s.fog.lpData != NULL) {
/* TODO: fog*/
if (GL_SUPPORT(EXT_FOG_COORD) {
glEnableClientState(GL_FOG_COORD_EXT);
glEnableClientState(GL_FOG_COORD
INATE
_EXT);
(GL_EXTCALL)(FogCoordPointerEXT)(WINED3D_ATR_GLTYPE(fog),
sd->u.s.fog.dwStride,
sd->u.s.fog.lpData);
...
...
@@ -1058,7 +1058,7 @@ static void loadVertexData(IWineD3DDevice *iface, WineDirect3DVertexStridedData
} else {
if (GL_SUPPRT(EXT_FOR_COORD) {
/* make sure fog is disabled */
glDisableClientState(GL_FOG_COORD_EXT);
glDisableClientState(GL_FOG_COORD
INATE
_EXT);
}
}
#endif
...
...
include/wine/wined3d_gl.h
View file @
701ce97d
...
...
@@ -647,6 +647,17 @@ typedef GLboolean (APIENTRY * PGLFNUNMAPBUFFERARBPROC) (GLenum target);
typedef
void
(
APIENTRY
*
PGLFNGETBUFFERPARAMETERIVARBPROC
)
(
GLenum
target
,
GLenum
pname
,
GLint
*
params
);
typedef
void
(
APIENTRY
*
PGLFNGETBUFFERPOINTERVARBPROC
)
(
GLenum
target
,
GLenum
pname
,
GLvoid
*
*
params
);
/* GL_EXT_fog_coord */
#ifndef GL_EXT_fog_coord
#define GL_EXT_fog_coord 1
#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
#define GL_FOG_COORDINATE_EXT 0x8451
#define GL_FRAGMENT_DEPTH_EXT 0x8452
#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
#endif
/* GL_EXT_fog_coord */
typedef
void
(
APIENTRY
*
PGLFNGLFOGCOORDFEXTPROC
)
(
GLfloat
intesity
);
typedef
void
(
APIENTRY
*
PGLFNGLFOGCOORDFVEXTPROC
)
(
GLfloat
intesity
);
typedef
void
(
APIENTRY
*
PGLFNGLFOGCOORDDEXTPROC
)
(
GLfloat
intesity
);
...
...
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