do clipping prior to XGetImage, just in case the image would extend beyond the screen...
[mesa.git] / src / mesa / drivers / x11 / xm_api.c
index 1a784c5fd85416a5494015f17a29087a2e083c19..6255c3b79421af9d054c9c24da0f4c384f2a9361 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.1
+ * Version:  6.3
  *
  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
  *
@@ -794,8 +794,6 @@ noFaultXAllocColor( int client,
 static GLboolean setup_grayscale( int client, XMesaVisual v,
                                   XMesaBuffer buffer, XMesaColormap cmap )
 {
-   (void) DitherValues;                /* Muffle compiler */
-
    if (GET_VISUAL_DEPTH(v)<4 || GET_VISUAL_DEPTH(v)>16) {
       return GL_FALSE;
    }
@@ -1343,6 +1341,8 @@ static GLboolean initialize_visual_and_buffer( int client,
                                   32,                   /*bitmap_pad*/
                                   0                     /*bytes_per_line*/ );
 #endif
+      if (!b->rowimage)
+         return GL_FALSE;
    }
 
    return GL_TRUE;
@@ -1667,6 +1667,14 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
    _mesa_enable_1_3_extensions(mesaCtx);
    _mesa_enable_1_4_extensions(mesaCtx);
    _mesa_enable_1_5_extensions(mesaCtx);
+   _mesa_enable_2_0_extensions(mesaCtx);
+#if SWTC
+    if (c->Mesa_DXTn) {
+       _mesa_enable_extension(c, "GL_EXT_texture_compression_s3tc");
+       _mesa_enable_extension(c, "GL_S3_s3tc");
+    }
+    _mesa_enable_extension(c, "GL_3DFX_texture_compression_FXT1");
+#endif
 
    /* finish up xmesa context initializations */
    c->swapbytes = CHECK_BYTE_ORDER(v) ? GL_FALSE : GL_TRUE;