summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/GL/gl.h33
-rw-r--r--include/GL/internal/dri_interface.h12
-rw-r--r--include/GL/xmesa.h23
-rw-r--r--include/GL/xmesa_x.h1
-rw-r--r--include/GL/xmesa_xf86.h30
5 files changed, 96 insertions, 3 deletions
diff --git a/include/GL/gl.h b/include/GL/gl.h
index 78a00aeb8b3..a388de36e49 100644
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -2209,6 +2209,39 @@ GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, con
#endif /* GL_MESA_program_debug */
+#ifndef GL_MESA_texture_array
+#define GL_MESA_texture_array 1
+
+/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array.
+ */
+#ifndef GL_EXT_texture_array
+
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target,
+ GLenum attachment, GLuint texture, GLint level, GLint layer);
+#endif /* GL_GLEXT_PROTOTYPES */
+
+#if 0
+/* (temporarily) disabled because of collision with typedef in glext.h
+ * that happens if apps include both gl.h and glext.h
+ */
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target,
+ GLenum attachment, GLuint texture, GLint level, GLint layer);
+#endif
+
+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
+#endif
+
+#endif
+
+
#ifndef GL_ATI_blend_equation_separate
#define GL_ATI_blend_equation_separate 1
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index a3de2c6aab3..8d24e311f84 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -361,6 +361,18 @@ struct __DRIscreenRec {
void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
int render_type,
void *sharedPrivate, __DRIcontext *pctx);
+
+ /**
+ * Method to override base texture image with a driver specific 'offset'.
+ * The depth passed in allows e.g. to ignore the alpha channel of texture
+ * images where the non-alpha components don't occupy a whole texel.
+ *
+ * For GLX_EXT_texture_from_pixmap with AIGLX.
+ *
+ * \since Internal API version 20070121.
+ */
+ void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
+ unsigned long long offset, GLint depth, GLuint pitch);
};
/**
diff --git a/include/GL/xmesa.h b/include/GL/xmesa.h
index f185a15cdb8..98139af8336 100644
--- a/include/GL/xmesa.h
+++ b/include/GL/xmesa.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 7.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -397,6 +397,25 @@ extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
+/*
+ * Texture from Pixmap
+ * New in Mesa 7.1
+ */
+extern void
+XMesaBindTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer,
+ const int *attrib_list);
+
+extern void
+XMesaReleaseTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer);
+
+
+extern XMesaBuffer
+XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p,
+ XMesaColormap cmap,
+ int format, int target, int mipmap);
+
+
+
#ifdef __cplusplus
}
#endif
diff --git a/include/GL/xmesa_x.h b/include/GL/xmesa_x.h
index 721d8b51070..865bab4313b 100644
--- a/include/GL/xmesa_x.h
+++ b/include/GL/xmesa_x.h
@@ -66,6 +66,7 @@ typedef XColor XMesaColor;
#define XMesaDrawPoints XDrawPoints
#define XMesaDrawLine XDrawLine
#define XMesaFillRectangle XFillRectangle
+#define XMesaGetImage XGetImage
#define XMesaPutImage XPutImage
#define XMesaCopyArea XCopyArea
diff --git a/include/GL/xmesa_xf86.h b/include/GL/xmesa_xf86.h
index 0a15110f651..4d69d4d930d 100644
--- a/include/GL/xmesa_xf86.h
+++ b/include/GL/xmesa_xf86.h
@@ -39,11 +39,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _XMESA_XF86_H_
#define _XMESA_XF86_H_
+#include "GL/glxtokens.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "gcstruct.h"
+#include "servermd.h"
-typedef struct _XMesaImageRec XMesaImage;
+
+typedef struct _XMesaImageRec {
+ int width, height;
+ char *data;
+ int bytes_per_line; /* Padded to 32 bits */
+ int bits_per_pixel;
+} XMesaImage;
typedef ScreenRec XMesaDisplay;
typedef PixmapPtr XMesaPixmap;
@@ -120,6 +128,26 @@ do { \
(*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \
} while (0)
+static _X_INLINE XMesaImage *XMesaGetImage(XMesaDisplay *dpy, PixmapPtr p, int x,
+ int y, unsigned int width,
+ unsigned int height,
+ unsigned long plane_mask, int format)
+{
+ XMesaImage *img = Xcalloc(sizeof(*img));
+
+ img->width = p->drawable.width;
+ img->height = p->drawable.height;
+ img->bits_per_pixel = p->drawable.bitsPerPixel;
+ img->bytes_per_line = PixmapBytePad(width, p->drawable.depth);
+ img->data = malloc(height * img->bytes_per_line);
+
+ /* Assumes: Images are always in ZPixmap format */
+ (*p->drawable.pScreen->GetImage)(&p->drawable, x, y, width, height,
+ plane_mask, ZPixmap, img->data);
+
+ return img;
+}
+
#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
do { \
/* Assumes: Images are always in ZPixmap format */ \