Commit d298b68f authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

winex11: Use the specified format for GL Bitmaps.

parent fa6598a2
...@@ -984,21 +984,19 @@ Drawable create_glxpixmap(Display *display, XVisualInfo *vis, Pixmap parent) ...@@ -984,21 +984,19 @@ Drawable create_glxpixmap(Display *display, XVisualInfo *vis, Pixmap parent)
} }
static XID create_bitmap_glxpixmap(X11DRV_PDEVICE *physDev) static XID create_bitmap_glxpixmap(X11DRV_PDEVICE *physDev, WineGLPixelFormat *fmt)
{ {
GLXPixmap ret; GLXPixmap ret = 0;
XVisualInfo *vis; XVisualInfo *vis;
XVisualInfo template;
int num;
wine_tsx11_lock(); wine_tsx11_lock();
/* Retrieve the visualid from our main visual which is the only visual we can use */ vis = pglXGetVisualFromFBConfig(gdi_display, fmt->fbconfig);
template.visualid = XVisualIDFromVisual(visual); if(vis) {
vis = XGetVisualInfo(gdi_display, VisualIDMask, &template, &num); if(vis->depth == physDev->bitmap->pixmap_depth)
ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap);
ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap); XFree(vis);
XFree(vis); }
wine_tsx11_unlock(); wine_tsx11_unlock();
TRACE("return %lx\n", ret); TRACE("return %lx\n", ret);
return ret; return ret;
...@@ -1466,7 +1464,7 @@ BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev, ...@@ -1466,7 +1464,7 @@ BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
return FALSE; return FALSE;
} }
physDev->bitmap->glxpixmap = create_bitmap_glxpixmap(physDev); physDev->bitmap->glxpixmap = create_bitmap_glxpixmap(physDev, fmt);
if(!physDev->bitmap->glxpixmap) { if(!physDev->bitmap->glxpixmap) {
WARN("Couldn't create glxpixmap for pixel format %d\n", iPixelFormat); WARN("Couldn't create glxpixmap for pixel format %d\n", iPixelFormat);
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment