diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-03 15:40:38 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-03 15:40:38 -0600 |
commit | 3dc6591a7c85b6a05551ce91b69e57d23148bf57 (patch) | |
tree | 210e97bacd4d8f9755611aff6bbd221ae1814af8 /src/mesa | |
parent | 7acb7c1ac058d11d649b615bfcabf29b5a74a801 (diff) |
mesa: fix problem freeing framebuffer/renderbuffer objects
Basically, set up no-op Delete() methods for the DummyFrame/Renderbuffer objects.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/context.c | 1 | ||||
-rw-r--r-- | src/mesa/main/fbobject.c | 25 | ||||
-rw-r--r-- | src/mesa/main/fbobject.h | 7 |
3 files changed, 29 insertions, 4 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 2c387d8e2c..3dec27b6bd 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -983,6 +983,7 @@ init_attrib_groups(GLcontext *ctx) _mesa_init_debug( ctx ); _mesa_init_display_list( ctx ); _mesa_init_eval( ctx ); + _mesa_init_fbobjects( ctx ); _mesa_init_feedback( ctx ); _mesa_init_fog( ctx ); _mesa_init_histogram( ctx ); diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 8e9948cb45..6ef90578c1 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 7.1 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 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"), @@ -66,6 +66,27 @@ static struct gl_renderbuffer DummyRenderbuffer; (TARGET) <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) +static void +delete_dummy_renderbuffer(struct gl_renderbuffer *rb) +{ + /* no op */ +} + +static void +delete_dummy_framebuffer(struct gl_framebuffer *fb) +{ + /* no op */ +} + + +void +_mesa_init_fbobjects(GLcontext *ctx) +{ + DummyFramebuffer.Delete = delete_dummy_framebuffer; + DummyRenderbuffer.Delete = delete_dummy_renderbuffer; +} + + /** * Helper routine for getting a gl_renderbuffer. */ diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 782ad8cb18..b6154719ab 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 7.1 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 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"), @@ -27,6 +27,9 @@ #define FBOBJECT_H +extern void +_mesa_init_fbobjects(GLcontext *ctx); + extern struct gl_renderbuffer * _mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id); |