From 7cc5522f86026a5058e4594a51685e96de2ca91a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 20 Nov 2006 15:14:35 +0000 Subject: fix glPopAttrib/color material bug #9091 --- src/mesa/main/attrib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/attrib.c') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index e22edc1bbc..9993a0021b 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.2 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -1009,9 +1009,6 @@ _mesa_PopAttrib(void) (GLfloat) light->Model.TwoSide); _mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, (GLfloat) light->Model.ColorControl); - /* materials */ - MEMCPY(&ctx->Light.Material, &light->Material, - sizeof(struct gl_material)); /* shade model */ _mesa_ShadeModel(light->ShadeModel); /* color material */ @@ -1019,6 +1016,9 @@ _mesa_PopAttrib(void) light->ColorMaterialMode); _mesa_set_enable(ctx, GL_COLOR_MATERIAL, light->ColorMaterialEnabled); + /* materials */ + MEMCPY(&ctx->Light.Material, &light->Material, + sizeof(struct gl_material)); } break; case GL_LINE_BIT: -- cgit v1.2.3 From 7da7404fdf1be778534d2d155072114e3f92226a Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 08:40:06 -0700 Subject: Fix glPush/PopClientAttrib() for VBO state (bug 9445). --- src/mesa/main/attrib.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/attrib.c') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 9993a0021b..2b1a35f3de 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1285,6 +1285,12 @@ _mesa_PushClientAttrib(GLbitfield mask) attr = MALLOC_STRUCT( gl_array_attrib ); obj = MALLOC_STRUCT( gl_array_object ); +#if FEATURE_ARB_vertex_buffer_object + /* increment ref counts since we're copying pointers to these objects */ + ctx->Array.ArrayBufferObj->RefCount++; + ctx->Array.ElementArrayBufferObj->RefCount++; +#endif + MEMCPY( attr, &ctx->Array, sizeof(struct gl_array_attrib) ); MEMCPY( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) ); @@ -1359,6 +1365,13 @@ _mesa_PopClientAttrib(void) _mesa_BindVertexArrayAPPLE( data->ArrayObj->Name ); +#if FEATURE_ARB_vertex_buffer_object + _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, + data->ArrayBufferObj->Name); + _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, + data->ElementArrayBufferObj->Name); +#endif + MEMCPY( ctx->Array.ArrayObj, data->ArrayObj, sizeof( struct gl_array_object ) ); -- cgit v1.2.3