summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-05-22 13:56:30 +0200
committerMichel Dänzer <[email protected]>2007-05-22 13:56:30 +0200
commit24d965fab52f790188e5de6e67e7387809b1f145 (patch)
treed3fd1020f427f14b39eb64bc248ab000ea701cfd /src/mesa/drivers/x11
parent9e3e3883fa42ffee82e8e8ecbf75c153a2215acb (diff)
Fix xserver build after recent XMesa changes.
Only build tested.
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_api.c20
-rw-r--r--src/mesa/drivers/x11/xm_image.h7
2 files changed, 10 insertions, 17 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index edaa71508fc..cff64d17ade 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -63,6 +63,7 @@
#endif
#include "glxheader.h"
+#include "GL/glxtokens.h"
#include "GL/xmesa.h"
#include "xmesaP.h"
#include "context.h"
@@ -293,11 +294,9 @@ static GLboolean window_exists( XMesaDisplay *dpy, Window win )
XSetErrorHandler(old_handler);
return WindowExistsFlag;
}
-#endif
-
static Status
-get_drawable_size(Display *dpy, Drawable d, GLuint *width, GLuint *height)
+get_drawable_size( XMesaDisplay *dpy, Drawable d, GLuint *width, GLuint *height )
{
Window root;
Status stat;
@@ -308,6 +307,7 @@ get_drawable_size(Display *dpy, Drawable d, GLuint *width, GLuint *height)
*height = h;
return stat;
}
+#endif
/**
@@ -1703,7 +1703,7 @@ XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p,
return NULL;
/* get pixmap size, update framebuffer/renderbuffer dims */
- get_drawable_size(v->display, p, &width, &height);
+ xmesa_get_window_size(v->display, b, &width, &height);
_mesa_resize_framebuffer(NULL, &(b->mesa_buffer), width, height);
if (target == 0) {
@@ -2363,7 +2363,7 @@ xbuffer_to_renderbuffer(int buffer)
PUBLIC void
-XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
+XMesaBindTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer,
const int *attrib_list)
{
#if 0
@@ -2375,7 +2375,7 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
struct gl_renderbuffer *rb;
struct xmesa_renderbuffer *xrb;
GLint b;
- XMesaImage *img;
+ XMesaImage *img = NULL;
GLboolean freeImg = GL_FALSE;
b = xbuffer_to_renderbuffer(buffer);
@@ -2412,15 +2412,15 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
* The following is a quick and simple way to implement
* BindTexImage. The better way is to write some new FetchTexel()
* functions which would extract texels from XImages. We'd still
- * need to use XGetImage when texturing from a Pixmap (front buffer)
+ * need to use GetImage when texturing from a Pixmap (front buffer)
* but texturing from a back buffer (XImage) would avoid an image
* copy.
*/
/* get XImage */
if (xrb->pixmap) {
- img = XGetImage(dpy, xrb->pixmap, 0, 0, rb->Width, rb->Height,
- AllPlanes, ZPixmap );
+ img = XMesaGetImage(dpy, xrb->pixmap, 0, 0, rb->Width, rb->Height, ~0L,
+ ZPixmap);
freeImg = GL_TRUE;
}
else if (xrb->ximage) {
@@ -2468,7 +2468,7 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
PUBLIC void
-XMesaReleaseTexImage(Display *dpy, XMesaBuffer drawable, int buffer)
+XMesaReleaseTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer)
{
const GLint b = xbuffer_to_renderbuffer(buffer);
if (b < 0)
diff --git a/src/mesa/drivers/x11/xm_image.h b/src/mesa/drivers/x11/xm_image.h
index 240ccee1af5..2a5e0f37779 100644
--- a/src/mesa/drivers/x11/xm_image.h
+++ b/src/mesa/drivers/x11/xm_image.h
@@ -36,13 +36,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define XMESA_USE_PUTPIXEL_MACRO
-struct _XMesaImageRec {
- int width, height;
- char *data;
- int bytes_per_line; /* Padded to 32 bits */
- int bits_per_pixel;
-};
-
extern XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height,
char *data);
extern void XMesaDestroyImage(XMesaImage *image);