mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 01:08:03 +02:00
Fix glPush/PopClientAttrib() for VBO state (bug 9445).
This commit is contained in:
parent
8d287d0f5e
commit
7da7404fdf
1 changed files with 15 additions and 2 deletions
|
|
@ -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 ) );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue