VirtualBox

Ignore:
Timestamp:
Nov 20, 2009 9:59:01 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: integrate fix for non ARGB textures and compiz

Location:
trunk/src/VBox/Additions/common/crOpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/glx.c

    r18882 r24816  
    18691869    pGlxPixmap->depth = depth;
    18701870    pGlxPixmap->root = root;
     1871    pGlxPixmap->format = pGlxPixmap->depth==24 ? GL_RGB : GL_RGBA;
    18711872
    18721873    /* Try to allocate shared memory
     
    19221923    if (CR_MAX_TRANSFER_SIZE < 4*pGlxPixmap->w*pGlxPixmap->h)
    19231924    {
    1924         stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pGlxPixmap->w, pGlxPixmap->h, 0,
     1925        stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, pGlxPixmap->format, pGlxPixmap->w, pGlxPixmap->h, 0,
    19251926                                            GL_BGRA, GL_UNSIGNED_BYTE, NULL);
    19261927    }
     
    19671968        /* Have to make sure XCopyArea is processed */
    19681969        XSync(dpy, False);
    1969         stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pGlxPixmap->w, pGlxPixmap->h, 0,
     1970        stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, pGlxPixmap->format, pGlxPixmap->w, pGlxPixmap->h, 0,
    19701971                                            GL_BGRA, GL_UNSIGNED_BYTE, stub.xshmSI.shmaddr);
    19711972        /*crDebug("Sync texture for drawable 0x%x(dmg handle 0x%x) [%i,%i,%i,%i]",
     
    21262127        }
    21272128
    2128         stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pxim->width, pxim->height, 0,
     2129        stub.spu->dispatch_table.TexImage2D(GL_TEXTURE_2D, 0, pGlxPixmap->format, pxim->width, pxim->height, 0,
    21292130                                            GL_BGRA, GL_UNSIGNED_BYTE, (void*)(&(pxim->data[0])));
    21302131        XDestroyImage(pxim);
  • trunk/src/VBox/Additions/common/crOpenGL/stub.h

    r20616 r24816  
    7373    int x, y;
    7474    unsigned int w, h, border, depth;
     75    GLenum format;
    7576    Window root;
    7677    GC gc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette