Index: src/VBox/Additions/common/crOpenGL/glx.c
===================================================================
--- src/VBox/Additions/common/crOpenGL/glx.c	(revision 24300)
+++ src/VBox/Additions/common/crOpenGL/glx.c	(working copy)
@@ -1921,8 +1921,12 @@
      * Note that we're making empty texture by passing NULL as pixels pointer, so there's no overhead transferring data to host.*/
     if (CR_MAX_TRANSFER_SIZE < 4*pGlxPixmap->w*pGlxPixmap->h)
     {
-        stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pGlxPixmap->w, pGlxPixmap->h, 0, 
-                                            GL_BGRA, GL_UNSIGNED_BYTE, NULL);
+        if (pGlxPixmap->depth == 24)
+            stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGB, pGlxPixmap->w, pGlxPixmap->h, 0, 
+                                                GL_BGRA, GL_UNSIGNED_BYTE, NULL);
+        else
+            stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pGlxPixmap->w, pGlxPixmap->h, 0, 
+                                                GL_BGRA, GL_UNSIGNED_BYTE, NULL);
     }
 
     crHashtableAdd(pContext->pGLXPixmapsHash, (unsigned int) draw, pGlxPixmap);
@@ -1966,8 +1970,12 @@
                   pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h, 0, 0);
         /* Have to make sure XCopyArea is processed */
         XSync(dpy, False);
-        stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pGlxPixmap->w, pGlxPixmap->h, 0, 
-                                            GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr);
+        if (pGlxPixmap->depth == 24)
+            stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGB, pGlxPixmap->w, pGlxPixmap->h, 0, 
+                                                GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr);
+        else
+            stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pGlxPixmap->w, pGlxPixmap->h, 0, 
+                                                GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr);
         /*crDebug("Sync texture for drawable 0x%x(dmg handle 0x%x) [%i,%i,%i,%i]", 
                   (unsigned int) draw, (unsigned int)pGlxPixmap->hDamage, 
                   pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h);*/
@@ -2125,8 +2133,12 @@
             return;
         }
 
-        stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pxim->width, pxim->height, 0, 
-                                            GL_BGRA, GL_UNSIGNED_BYTE, (void*)(&(pxim->data[0])));
+        if (pGlxPixmap->depth == 24)
+            stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGB, pxim->width, pxim->height, 0, 
+                                                GL_BGRA, GL_UNSIGNED_BYTE, (void*)(&(pxim->data[0])));
+        else
+            stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pxim->width, pxim->height, 0, 
+                                                GL_BGRA, GL_UNSIGNED_BYTE, (void*)(&(pxim->data[0])));
         XDestroyImage(pxim);
     }
     else /* Use shm to get pixmap data */
