added viaRenderbufferStorage() function
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 6 Sep 2005 20:42:23 +0000 (20:42 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 6 Sep 2005 20:42:23 +0000 (20:42 +0000)
src/mesa/drivers/dri/unichrome/via_context.c

index 0dd787e..0f504ee 100644 (file)
@@ -129,11 +129,21 @@ buffer_align( unsigned width )
 
 
 static void
-nop_delete_renderbuffer(struct gl_renderbuffer *rb)
+viaDeleteRenderbuffer(struct gl_renderbuffer *rb)
 {
    /* Don't free() since we're contained in via_context struct. */
 }
 
+static GLboolean
+viaRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb,
+                       GLenum internalFormat, GLuint width, GLuint height)
+{
+   rb->Width = width;
+   rb->Height = height;
+   rb->InternalFormat = internalFormat;
+   return GL_TRUE;
+}
+
 
 static void
 viaInitRenderbuffer(struct gl_renderbuffer *rb, GLenum format)
@@ -171,7 +181,8 @@ viaInitRenderbuffer(struct gl_renderbuffer *rb, GLenum format)
       rb->DataType = GL_UNSIGNED_BYTE;
    }
 
-   rb->Delete = nop_delete_renderbuffer;
+   rb->Delete = viaDeleteRenderbuffer;
+   rb->AllocStorage = viaRenderbufferStorage;
 }