aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fog.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-04 09:28:39 +0100
committermarha <marha@users.sourceforge.net>2011-11-04 09:28:39 +0100
commit23e2767dc3e6b8891d4b55b711c70c6bc85a6f85 (patch)
tree04c538697c3afbd401afb1bb614460b16be28844 /mesalib/src/mesa/main/fog.c
parent125500b44d0253d7fd7a59905ab730151d4f66e2 (diff)
parent02f377d5e2dd18537d0807ad63675a0970b5a37d (diff)
downloadvcxsrv-23e2767dc3e6b8891d4b55b711c70c6bc85a6f85.tar.gz
vcxsrv-23e2767dc3e6b8891d4b55b711c70c6bc85a6f85.tar.bz2
vcxsrv-23e2767dc3e6b8891d4b55b711c70c6bc85a6f85.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h xorg-server/hw/xwin/InitOutput.c xorg-server/hw/xwin/ddraw.h xorg-server/hw/xwin/winclipboardwndproc.c xorg-server/hw/xwin/winglobals.c xorg-server/hw/xwin/winmonitors.c xorg-server/hw/xwin/winprocarg.c xorg-server/hw/xwin/winwin32rootlesswndproc.c xorg-server/include/scrnintstr.h xorg-server/xkb/ddxList.c xorg-server/xkb/ddxLoad.c
Diffstat (limited to 'mesalib/src/mesa/main/fog.c')
-rw-r--r--mesalib/src/mesa/main/fog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/fog.c b/mesalib/src/mesa/main/fog.c
index 88aa31a7f..d65add930 100644
--- a/mesalib/src/mesa/main/fog.c
+++ b/mesalib/src/mesa/main/fog.c
@@ -172,6 +172,19 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
ctx->Fog.FogCoordinateSource = p;
break;
}
+ case GL_FOG_DISTANCE_MODE_NV: {
+ GLenum p = (GLenum) (GLint) *params;
+ if (!ctx->Extensions.NV_fog_distance ||
+ (p != GL_EYE_RADIAL_NV && p != GL_EYE_PLANE && p != GL_EYE_PLANE_ABSOLUTE_NV)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glFog");
+ return;
+ }
+ if (ctx->Fog.FogDistanceMode == p)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_FOG);
+ ctx->Fog.FogDistanceMode = p;
+ break;
+ }
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glFog" );
return;
@@ -201,4 +214,5 @@ void _mesa_init_fog( struct gl_context * ctx )
ctx->Fog.ColorSumEnabled = GL_FALSE;
ctx->Fog.FogCoordinateSource = GL_FRAGMENT_DEPTH_EXT;
ctx->Fog._Scale = 1.0f;
+ ctx->Fog.FogDistanceMode = GL_EYE_PLANE_ABSOLUTE_NV;
}