summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-04-06 13:00:14 -0600
committerBrian Paul <[email protected]>2011-04-06 13:00:14 -0600
commit122275760dcc9dfa6b2e377cae657aeeb121556a (patch)
treeca11d9bff1feeb0c36c1d3c636b0835a9db86c8a /src
parent53245fffc022e5fc18c847e799f65c6b91e7378a (diff)
mesa: init/release the default texture buffer object
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texstate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 72f80508db7..82e69ae11b5 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -30,6 +30,7 @@
#include "glheader.h"
#include "mfeatures.h"
+#include "bufferobj.h"
#include "colormac.h"
#include "colortab.h"
#include "context.h"
@@ -794,6 +795,10 @@ _mesa_init_texture(struct gl_context *ctx)
if (!alloc_proxy_textures( ctx ))
return GL_FALSE;
+ /* GL_ARB_texture_buffer_object */
+ _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject,
+ ctx->Shared->NullBufferObj);
+
return GL_TRUE;
}
@@ -819,6 +824,9 @@ _mesa_free_texture_data(struct gl_context *ctx)
/* Free proxy texture objects */
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
+
+ /* GL_ARB_texture_buffer_object */
+ _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, NULL);
}