summaryrefslogtreecommitdiff
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-03-15 17:48:00 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-03-15 17:48:00 +0000
commit59e0faaa5c601ace51608c6d03c57d17498f796b (patch)
tree2234cdb37654a1da3cb2a13521318407a7c2cd6b /src/mesa/main/fbobject.c
parenteccb6a0698ba86a6feb0a407a5391bd84a62aaf2 (diff)
sync with texmem branch
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 749115a799..8c428f8a25 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -653,11 +653,14 @@ _mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers)
/**
* Given an internal format token for a render buffer, return the
* corresponding base format.
+ * This is very similar to _mesa_base_tex_format() but the set of valid
+ * internal formats is somewhat different.
+ *
* \return one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT
* GL_DEPTH_STENCIL_EXT or zero if error.
*/
-static GLenum
-base_internal_format(GLcontext *ctx, GLenum internalFormat)
+GLenum
+_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat)
{
switch (internalFormat) {
case GL_RGB:
@@ -717,7 +720,7 @@ _mesa_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
return;
}
- baseFormat = base_internal_format(ctx, internalFormat);
+ baseFormat = _mesa_base_fbo_format(ctx, internalFormat);
if (baseFormat == 0) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glRenderbufferStorageEXT(internalFormat)");
@@ -973,6 +976,10 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
}
ctx->DrawBuffer = newFb;
}
+
+ if (ctx->Driver.BindFramebuffer) {
+ ctx->Driver.BindFramebuffer(ctx, target, newFb);
+ }
}