ARB prog lexer: Fix lexer to eat both DOS and Unix line endings
[mesa.git] / src / mesa / main / renderbuffer.c
index 6f1d7c39605697225d67a94eebff21bf447a9777..38be8266e05c5bd6df0fa3e83e3f7525bbb0af84 100644 (file)
@@ -1199,7 +1199,8 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
 
    if (width > 0 && height > 0) {
       /* allocate new buffer storage */
-      rb->Data = _mesa_malloc(width * height * pixelSize);
+      rb->Data = malloc(width * height * pixelSize);
+
       if (rb->Data == NULL) {
          rb->Width = 0;
          rb->Height = 0;
@@ -1487,11 +1488,16 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
    rb->InternalFormat = GL_NONE;
    rb->_ActualFormat = GL_NONE;
    rb->_BaseFormat = GL_NONE;
-   rb->DataType = GL_NONE;
+
+   rb->ComponentType = GL_UNSIGNED_NORMALIZED; /* ARB_fbo */
+   rb->ColorEncoding = GL_LINEAR; /* ARB_fbo */
+
    rb->RedBits = rb->GreenBits = rb->BlueBits = rb->AlphaBits = 0;
    rb->IndexBits = 0;
    rb->DepthBits = 0;
    rb->StencilBits = 0;
+
+   rb->DataType = GL_NONE;
    rb->Data = NULL;
 
    /* Point back to ourself so that we don't have to check for Wrapped==NULL