|
|
|
|
|
|
|
|
if (!b) { |
|
|
if (!b) { |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
return b->drawable; |
|
|
|
|
|
|
|
|
return b->ws.drawable; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!b) { |
|
|
if (!b) { |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
return b->drawable; |
|
|
|
|
|
|
|
|
return b->ws.drawable; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (xmbuf) { |
|
|
if (xmbuf) { |
|
|
xmbuf->largestPbuffer = useLargest; |
|
|
xmbuf->largestPbuffer = useLargest; |
|
|
xmbuf->preservedContents = preserveContents; |
|
|
xmbuf->preservedContents = preserveContents; |
|
|
return (GLXPbuffer) xmbuf->drawable; |
|
|
|
|
|
|
|
|
return (GLXPbuffer) xmbuf->ws.drawable; |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
return 0; |
|
|
return 0; |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
XMesaVisual xmvis = (XMesaVisual) config; |
|
|
XMesaVisual xmvis = (XMesaVisual) config; |
|
|
XMesaBuffer xmbuf = XMesaCreatePixmapBuffer(xmvis, pixmap, 0); |
|
|
XMesaBuffer xmbuf = XMesaCreatePixmapBuffer(xmvis, pixmap, 0); |
|
|
return xmbuf->drawable; /* need to return an X ID */ |
|
|
|
|
|
|
|
|
return xmbuf->ws.drawable; /* need to return an X ID */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* A GLXPbuffer handle must be an X Drawable because that's what |
|
|
/* A GLXPbuffer handle must be an X Drawable because that's what |
|
|
* glXMakeCurrent takes. |
|
|
* glXMakeCurrent takes. |
|
|
*/ |
|
|
*/ |
|
|
return (GLXPbuffer) xmbuf->drawable; |
|
|
|
|
|
|
|
|
return (GLXPbuffer) xmbuf->ws.drawable; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|