#include "macros.h"
#include "matrix.h"
#include "multisample.h"
+#include "pixelstore.h"
#include "points.h"
#include "polygon.h"
#include "shared.h"
}
}
+void GLAPIENTRY
+_mesa_ClientAttribDefaultEXT( GLbitfield mask )
+{
+ if (mask & GL_CLIENT_PIXEL_STORE_BIT) {
+ _mesa_PixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
+ _mesa_PixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
+ _mesa_PixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0);
+ _mesa_PixelStorei(GL_UNPACK_SKIP_IMAGES, 0);
+ _mesa_PixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+ _mesa_PixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+ _mesa_PixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+ _mesa_PixelStorei(GL_UNPACK_ALIGNMENT, 4);
+ _mesa_PixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE);
+ _mesa_PixelStorei(GL_PACK_LSB_FIRST, GL_FALSE);
+ _mesa_PixelStorei(GL_PACK_IMAGE_HEIGHT, 0);
+ _mesa_PixelStorei(GL_PACK_SKIP_IMAGES, 0);
+ _mesa_PixelStorei(GL_PACK_ROW_LENGTH, 0);
+ _mesa_PixelStorei(GL_PACK_SKIP_ROWS, 0);
+ _mesa_PixelStorei(GL_PACK_SKIP_PIXELS, 0);
+ _mesa_PixelStorei(GL_PACK_ALIGNMENT, 4);
+
+ _mesa_BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+ _mesa_BindBuffer(GL_PIXEL_PACK_BUFFER, 0);
+ }
+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
+ GET_CURRENT_CONTEXT(ctx);
+ int i;
+
+ _mesa_BindBuffer(GL_ARRAY_BUFFER, 0);
+ _mesa_BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+
+ _mesa_DisableClientState(GL_EDGE_FLAG_ARRAY);
+ _mesa_EdgeFlagPointer(0, 0);
+
+ _mesa_DisableClientState(GL_INDEX_ARRAY);
+ _mesa_IndexPointer(GL_FLOAT, 0, 0);
+
+ _mesa_DisableClientState(GL_SECONDARY_COLOR_ARRAY);
+ _mesa_SecondaryColorPointer(4, GL_FLOAT, 0, 0);
+
+ _mesa_DisableClientState(GL_FOG_COORD_ARRAY);
+ _mesa_FogCoordPointer(GL_FLOAT, 0, 0);
+
+ for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
+ _mesa_ClientActiveTexture(GL_TEXTURE0 + i);
+ _mesa_DisableClientState(GL_TEXTURE_COORD_ARRAY);
+ _mesa_TexCoordPointer(4, GL_FLOAT, 0, 0);
+ }
+
+ _mesa_DisableClientState(GL_COLOR_ARRAY);
+ _mesa_ColorPointer(4, GL_FLOAT, 0, 0);
+
+ _mesa_DisableClientState(GL_NORMAL_ARRAY);
+ _mesa_NormalPointer(GL_FLOAT, 0, 0);
+
+ _mesa_DisableClientState(GL_VERTEX_ARRAY);
+ _mesa_VertexPointer(4, GL_FLOAT, 0, 0);
+
+ for (i = 0; i < ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs; i++) {
+ _mesa_DisableVertexAttribArray(i);
+ _mesa_VertexAttribPointer(i, 4, GL_FLOAT, GL_FALSE, 0, 0);
+ }
+
+ _mesa_ClientActiveTexture(GL_TEXTURE0);
+ }
+}
+
+void GLAPIENTRY
+_mesa_PushClientAttribDefaultEXT( GLbitfield mask )
+{
+ _mesa_PushClientAttrib(mask);
+ _mesa_ClientAttribDefaultEXT(mask);
+}
+
/**
* Free any attribute state data that might be attached to the context.
{ "glMatrixPushEXT", 10, -1 },
{ "glMatrixPopEXT", 10, -1 },
/* GL_EXT_direct_state_access - GL 1.1 */
- //{ "glClientAttribDefaultEXT", 11, -1 },
- //{ "glPushClientAttribDefaultEXT", 11, -1 },
+ { "glClientAttribDefaultEXT", 11, -1 },
+ { "glPushClientAttribDefaultEXT", 11, -1 },
{ "glTextureParameteriEXT", 11, -1 },
{ "glTextureParameterivEXT", 11, -1 },
{ "glTextureParameterfEXT", 11, -1 },