X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fx11%2Fglx_pbuffer.c;h=52dad65170fd3e8abb05b4c25ff97d5f435f1f6b;hb=fe23dc5ecae87de73f7b5a581868065a4c4ac09b;hp=472045e93d812d5f41056a89ec9296da2c05076f;hpb=c25eb99f95eec9f905a603079603fc6d4252575a;p=mesa.git diff --git a/src/glx/x11/glx_pbuffer.c b/src/glx/x11/glx_pbuffer.c index 472045e93d8..52dad65170f 100644 --- a/src/glx/x11/glx_pbuffer.c +++ b/src/glx/x11/glx_pbuffer.c @@ -40,18 +40,6 @@ #include "glcontextmodes.h" #include "glheader.h" -static void ChangeDrawableAttribute( Display * dpy, GLXDrawable drawable, - const CARD32 * attribs, size_t num_attribs ); - -static void DestroyPbuffer( Display * dpy, GLXDrawable drawable ); - -static GLXDrawable CreatePbuffer( Display *dpy, - const __GLcontextModes * fbconfig, unsigned int width, unsigned int height, - const int *attrib_list, GLboolean size_in_attribs ); - -static int GetDrawableAttribute( Display *dpy, GLXDrawable drawable, - int attribute, unsigned int *value ); - /** * Change a drawable's attribute. @@ -150,7 +138,7 @@ DestroyPbuffer( Display * dpy, GLXDrawable drawable ) if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { xGLXDestroyPbufferReq * req; - GetReqExtra( GLXDestroyPbuffer, 4, req ); + GetReq( GLXDestroyPbuffer, req ); req->reqType = opcode; req->glxCode = X_GLXDestroyPbuffer; req->pbuffer = (GLXPbuffer) drawable; @@ -472,8 +460,24 @@ glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, PUBLIC GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attrib_list) { + int i, width, height; + + width = 0; + height = 0; + + for (i = 0; attrib_list[i * 2]; i++) { + switch (attrib_list[i * 2]) { + case GLX_PBUFFER_WIDTH: + width = attrib_list[i * 2 + 1]; + break; + case GLX_PBUFFER_HEIGHT: + height = attrib_list[i * 2 + 1]; + break; + } + } + return (GLXPbuffer) CreatePbuffer( dpy, (__GLcontextModes *) config, - 0, 0, + width, height, attrib_list, GL_TRUE ); }