aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
committermarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
commit14b1cb8d5a27ec9716d3f790fce95f0469e35605 (patch)
tree6c94dc9f37b19b995bec603141442b1b93e8c9d2 /mesalib/src/mesa/main/attrib.c
parent93c85587c691f9b91e7c2d8bda50f453e0f6674d (diff)
downloadvcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.gz
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.bz2
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.zip
Updated to Mesa 7.7
Diffstat (limited to 'mesalib/src/mesa/main/attrib.c')
-rw-r--r--mesalib/src/mesa/main/attrib.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c
index ab99ca1c6..246c5521b 100644
--- a/mesalib/src/mesa/main/attrib.c
+++ b/mesalib/src/mesa/main/attrib.c
@@ -57,6 +57,7 @@
#include "varray.h"
#include "viewport.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
/**
@@ -74,6 +75,7 @@ struct gl_enable_attrib
GLboolean Convolution2D;
GLboolean Separable2D;
GLboolean CullFace;
+ GLboolean DepthClamp;
GLboolean DepthTest;
GLboolean Dither;
GLboolean Fog;
@@ -173,6 +175,9 @@ struct texture_state
};
+#if FEATURE_attrib_stack
+
+
/**
* Allocate new attribute node of given type/kind. Attach payload data.
* Insert it into the linked list named by 'head'.
@@ -265,6 +270,7 @@ _mesa_PushAttrib(GLbitfield mask)
attr->Convolution2D = ctx->Pixel.Convolution2DEnabled;
attr->Separable2D = ctx->Pixel.Separable2DEnabled;
attr->CullFace = ctx->Polygon.CullFlag;
+ attr->DepthClamp = ctx->Transform.DepthClamp;
attr->DepthTest = ctx->Depth.Test;
attr->Dither = ctx->Color.DitherFlag;
attr->Fog = ctx->Fog.Enabled;
@@ -514,6 +520,8 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
enable->ColorTable[COLORTABLE_POSTCOLORMATRIX],
GL_POST_COLOR_MATRIX_COLOR_TABLE);
TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
+ TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp,
+ GL_DEPTH_CLAMP);
TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST);
TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER);
TEST_AND_UPDATE(ctx->Pixel.Convolution1DEnabled, enable->Convolution1D,
@@ -1221,6 +1229,9 @@ _mesa_PopAttrib(void)
if (xform->RescaleNormals != ctx->Transform.RescaleNormals)
_mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT,
ctx->Transform.RescaleNormals);
+ if (xform->DepthClamp != ctx->Transform.DepthClamp)
+ _mesa_set_enable(ctx, GL_DEPTH_CLAMP,
+ ctx->Transform.DepthClamp);
}
break;
case GL_TEXTURE_BIT:
@@ -1457,6 +1468,19 @@ _mesa_PopClientAttrib(void)
}
+void
+_mesa_init_attrib_dispatch(struct _glapi_table *disp)
+{
+ SET_PopAttrib(disp, _mesa_PopAttrib);
+ SET_PushAttrib(disp, _mesa_PushAttrib);
+ SET_PopClientAttrib(disp, _mesa_PopClientAttrib);
+ SET_PushClientAttrib(disp, _mesa_PushClientAttrib);
+}
+
+
+#endif /* FEATURE_attrib_stack */
+
+
/**
* Free any attribute state data that might be attached to the context.
*/