aboutsummaryrefslogtreecommitdiff
path: root/mesalib/include
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/include')
-rw-r--r--mesalib/include/EGL/egl.h39
-rw-r--r--mesalib/include/EGL/eglext.h60
-rw-r--r--mesalib/include/EGL/eglplatform.h133
-rw-r--r--mesalib/include/GL/dmesa.h160
-rw-r--r--mesalib/include/GL/ggimesa.h85
-rw-r--r--mesalib/include/GL/gl.h19
-rw-r--r--mesalib/include/GL/gl_mangle.h45
-rw-r--r--mesalib/include/GL/glx.h23
-rw-r--r--mesalib/include/GL/glxext.h8
-rw-r--r--mesalib/include/GL/internal/dri_interface.h74
-rw-r--r--mesalib/include/GL/internal/glcore.h4
-rw-r--r--mesalib/include/GL/svgamesa.h97
-rw-r--r--mesalib/include/KHR/khrplatform.h273
-rw-r--r--mesalib/include/VG/openvg.h686
-rw-r--r--mesalib/include/VG/vgext.h233
-rw-r--r--mesalib/include/VG/vgplatform.h111
-rw-r--r--mesalib/include/VG/vgu.h130
17 files changed, 1763 insertions, 417 deletions
diff --git a/mesalib/include/EGL/egl.h b/mesalib/include/EGL/egl.h
index e33a31572..990ce0a45 100644
--- a/mesalib/include/EGL/egl.h
+++ b/mesalib/include/EGL/egl.h
@@ -1,9 +1,32 @@
/* -*- mode: c; tab-width: 8; -*- */
/* vi: set sw=4 ts=8: */
/* Reference version of egl.h for EGL 1.4.
- * Last modified 2008/05/02
+ * $Revision$ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
*/
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
#ifndef __egl_h_
#define __egl_h_
@@ -17,7 +40,7 @@ extern "C" {
#endif
/* EGL Types */
-typedef int32_t EGLint;
+/* EGLint is defined in eglplatform.h */
typedef unsigned int EGLBoolean;
typedef unsigned int EGLenum;
typedef void *EGLConfig;
@@ -42,7 +65,7 @@ typedef void *EGLClientBuffer;
#define EGL_TRUE 1
/* Out-of-band handle values */
-#define EGL_DEFAULT_DISPLAY ((void *)0)
+#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
#define EGL_NO_CONTEXT ((EGLContext)0)
#define EGL_NO_DISPLAY ((EGLDisplay)0)
#define EGL_NO_SURFACE ((EGLSurface)0)
@@ -86,7 +109,6 @@ typedef void *EGLClientBuffer;
#define EGL_NATIVE_RENDERABLE 0x302D
#define EGL_NATIVE_VISUAL_ID 0x302E
#define EGL_NATIVE_VISUAL_TYPE 0x302F
-#define EGL_PRESERVED_RESOURCES 0x3030
#define EGL_SAMPLES 0x3031
#define EGL_SAMPLE_BUFFERS 0x3032
#define EGL_SURFACE_TYPE 0x3033
@@ -291,7 +313,14 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
EGLNativePixmapType target);
-EGLAPI void (* EGLAPIENTRY eglGetProcAddress(const char *procname))(void);
+/* This is a generic function pointer type, whose name indicates it must
+ * be cast to the proper type *and calling convention* before use.
+ */
+typedef void (*__eglMustCastToProperFunctionPointerType)(void);
+
+/* Now, define eglGetProcAddress using the generic function ptr. type */
+EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
+ eglGetProcAddress(const char *procname);
#ifdef __cplusplus
}
diff --git a/mesalib/include/EGL/eglext.h b/mesalib/include/EGL/eglext.h
index b65f7f2bc..3be9e5024 100644
--- a/mesalib/include/EGL/eglext.h
+++ b/mesalib/include/EGL/eglext.h
@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
-** Copyright (c) 2007 The Khronos Group Inc.
+** Copyright (c) 2007-2009 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
@@ -33,9 +33,9 @@ extern "C" {
/*************************************************************/
/* Header file version number */
-/* eglext.h last updated 2007/11/20 */
/* Current version at http://www.khronos.org/registry/egl/ */
-#define EGL_EGLEXT_VERSION 1
+/* $Revision$ on $Date: 2010-01-22 11:38:01 -0800 (Fri, 22 Jan 2010) $ */
+#define EGL_EGLEXT_VERSION 5
#ifndef EGL_KHR_config_attribs
#define EGL_KHR_config_attribs 1
@@ -79,12 +79,12 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display
#define EGL_KHR_image 1
#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
typedef void *EGLImageKHR;
-extern const EGLImageKHR EGL_NO_IMAGE_KHR;
+#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list);
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
#endif /* EGL_EGLEXT_PROTOTYPES */
-typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list);
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
#endif
@@ -120,6 +120,35 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
#endif
+#ifndef EGL_KHR_reusable_sync
+#define EGL_KHR_reusable_sync 1
+
+typedef void* EGLSyncKHR;
+typedef khronos_utime_nanoseconds_t EGLTimeKHR;
+
+#define EGL_SYNC_STATUS_KHR 0x30F1
+#define EGL_SIGNALED_KHR 0x30F2
+#define EGL_UNSIGNALED_KHR 0x30F3
+#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
+#define EGL_CONDITION_SATISFIED_KHR 0x30F6
+#define EGL_SYNC_TYPE_KHR 0x30F7
+#define EGL_SYNC_REUSABLE_KHR 0x30FA
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
+#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
+#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif
/* EGL_MESA_screen extension >>> PRELIMINARY <<< */
#ifndef EGL_MESA_screen_surface
@@ -179,6 +208,25 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLCont
#endif /* EGL_MESA_copy_context */
+#ifndef EGL_KHR_image_base
+#define EGL_KHR_image_base 1
+/* Most interfaces defined by EGL_KHR_image_pixmap above */
+#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_image_pixmap
+#define EGL_KHR_image_pixmap 1
+/* Interfaces defined by EGL_KHR_image above */
+#endif
+
+#ifndef EGL_IMG_context_priority
+#define EGL_IMG_context_priority 1
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
+#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/mesalib/include/EGL/eglplatform.h b/mesalib/include/EGL/eglplatform.h
index 9e83b6000..f71b36258 100644
--- a/mesalib/include/EGL/eglplatform.h
+++ b/mesalib/include/EGL/eglplatform.h
@@ -1,38 +1,59 @@
-/* -*- mode: c; tab-width: 8; -*- */
-/* vi: set sw=4 ts=8: */
-/* Platform-specific types and definitions for egl.h */
-
#ifndef __eglplatform_h_
#define __eglplatform_h_
-/* Windows calling convention boilerplate */
-#if (defined(WIN32) || defined(_WIN32_WCE))
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
-#endif
-#include <windows.h>
-#endif
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Platform-specific types and definitions for egl.h
+ * $Revision$ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file. Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "EGL" component "Registry".
+ */
-#if !defined(_WIN32_WCE)
-#include <sys/types.h>
-#include <stdint.h>
-#endif
+#include <KHR/khrplatform.h>
/* Macros used in EGL function prototype declarations.
*
+ * EGL functions should be prototyped as:
+ *
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
*
- * On Windows, EGLAPIENTRY can be defined like APIENTRY.
- * On most other platforms, it should be empty.
+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
*/
-#ifndef EGLAPIENTRY
-#define EGLAPIENTRY
+#ifndef EGLAPI
+#define EGLAPI KHRONOS_APICALL
#endif
-#ifndef EGLAPIENTRYP
-#define EGLAPIENTRYP EGLAPIENTRY *
+
+#ifndef EGLAPIENTRY
+#define EGLAPIENTRY KHRONOS_APIENTRY
#endif
+#define EGLAPIENTRYP EGLAPIENTRY*
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
* are aliases of window-system-dependent types, such as X Display * or
@@ -41,53 +62,49 @@
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
*/
-/* Unix (tentative)
- #include <X headers>
- typedef Display *NativeDisplayType;
- - or maybe, if encoding "hostname:display.head"
- typedef const char *NativeWindowType;
- etc.
- */
-
-
-#if (defined(WIN32) || defined(_WIN32_WCE))
-
-/** BEGIN Added for Windows **/
-#ifndef EGLAPI
-#define EGLAPI __declspec(dllexport)
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
#endif
+#include <windows.h>
-typedef long int32_t;
-typedef unsigned long uint32_t;
-typedef unsigned char uint8_t;
-#define snprintf _snprintf
-#define strcasecmp _stricmp
-#define vsnprintf _vsnprintf
+typedef HDC EGLNativeDisplayType;
+typedef HBITMAP EGLNativePixmapType;
+typedef HWND EGLNativeWindowType;
-typedef HDC NativeDisplayType;
-typedef HWND NativeWindowType;
-typedef HBITMAP NativePixmapType;
-/** END Added for Windows **/
+#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
-#elif defined(__gnu_linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__APPLE__)
+typedef int EGLNativeDisplayType;
+typedef void *EGLNativeWindowType;
+typedef void *EGLNativePixmapType;
+#elif defined(__unix__) || defined(__unix)
-/** BEGIN Added for X (Mesa) **/
-#ifndef EGLAPI
-#define EGLAPI extern
-#endif
-
+/* X11 (tentative) */
#include <X11/Xlib.h>
-typedef Display *NativeDisplayType;
-typedef Window NativeWindowType;
-typedef Pixmap NativePixmapType;
-/** END Added for X (Mesa) **/
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap EGLNativePixmapType;
+typedef Window EGLNativeWindowType;
+#else
+#error "Platform not recognized"
#endif
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
-typedef NativeDisplayType EGLNativeDisplayType;
-typedef NativePixmapType EGLNativePixmapType;
-typedef NativeWindowType EGLNativeWindowType;
+typedef EGLNativeDisplayType NativeDisplayType;
+typedef EGLNativePixmapType NativePixmapType;
+typedef EGLNativeWindowType NativeWindowType;
+
+
+/* Define EGLint. This must be a signed integral type large enough to contain
+ * all legal attribute names and values passed into and out of EGL, whether
+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
+ * handle, or other. While in general a 32-bit integer will suffice, if
+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
+ * integer type.
+ */
+typedef khronos_int32_t EGLint;
#endif /* __eglplatform_h */
diff --git a/mesalib/include/GL/dmesa.h b/mesalib/include/GL/dmesa.h
deleted file mode 100644
index 358082e3e..000000000
--- a/mesalib/include/GL/dmesa.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.1
- *
- * Copyright (C) 1999-2004 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"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * DOS/DJGPP device driver for Mesa
- *
- * Author: Daniel Borca
- * Email : dborca@users.sourceforge.net
- * Web : http://www.geocities.com/dborca
- */
-
-
-#ifndef DMESA_H_included
-#define DMESA_H_included
-
-#define DMESA_MAJOR_VERSION 6
-#define DMESA_MINOR_VERSION 5
-
-/* Sample Usage:
- *
- * 1. Call DMesaCreateVisual() to initialize graphics.
- * 2. Call DMesaCreateContext() to create a DMesa rendering context.
- * 3. Call DMesaCreateBuffer() to define the window.
- * 4. Call DMesaMakeCurrent() to bind the DMesaBuffer to a DMesaContext.
- * 5. Make gl* calls to render your graphics.
- * 6. Use DMesaSwapBuffers() when double buffering to swap front/back buffers.
- * 7. Before exiting, destroy DMesaBuffer, DMesaContext and DMesaVisual.
- */
-
-typedef struct dmesa_context *DMesaContext;
-typedef struct dmesa_visual *DMesaVisual;
-typedef struct dmesa_buffer *DMesaBuffer;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Create a new Visual and set graphics mode.
- */
-DMesaVisual DMesaCreateVisual (GLint width, /* X res */
- GLint height, /* Y res */
- GLint colDepth, /* BPP */
- GLint refresh, /* refresh rate: 0=default */
- GLboolean dbFlag, /* double-buffered */
- GLboolean rgbFlag, /* RGB mode */
- GLint alphaSize, /* requested bits/alpha */
- GLint depthSize, /* requested bits/depth */
- GLint stencilSize, /* requested bits/stencil */
- GLint accumSize); /* requested bits/accum */
-
-/*
- * Destroy Visual and restore screen.
- */
-void DMesaDestroyVisual (DMesaVisual v);
-
-
-
-/*
- * Create a new Context for rendering.
- */
-DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share);
-
-/*
- * Destroy Context.
- */
-void DMesaDestroyContext (DMesaContext c);
-
-/*
- * Return a handle to the current context.
- */
-DMesaContext DMesaGetCurrentContext (void);
-
-
-
-/*
- * Create a new Buffer (window).
- */
-DMesaBuffer DMesaCreateBuffer (DMesaVisual visual,
- GLint xpos, GLint ypos,
- GLint width, GLint height);
-
-/*
- * Destroy Buffer.
- */
-void DMesaDestroyBuffer (DMesaBuffer b);
-
-/*
- * Return a handle to the current buffer.
- */
-DMesaBuffer DMesaGetCurrentBuffer (void);
-
-/*
- * Swap the front and back buffers for the given Buffer.
- * No action is taken if the buffer is not double buffered.
- */
-void DMesaSwapBuffers (DMesaBuffer b);
-
-/*
- * Bind Buffer to Context and make the Context the current one.
- */
-GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);
-
-
-
-/*
- * Move/Resize current Buffer.
- */
-GLboolean DMesaMoveBuffer (GLint xpos, GLint ypos);
-GLboolean DMesaResizeBuffer (GLint width, GLint height);
-
-/*
- * Set palette index, using normalized values.
- */
-void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue);
-
-/*
- * DMesa functions
- */
-typedef void (*DMesaProc) ();
-DMesaProc DMesaGetProcAddress (const char *name);
-
-/*
- * DMesa state retrieval.
- */
-#define DMESA_GET_SCREEN_SIZE 0x0100
-#define DMESA_GET_DRIVER_CAPS 0x0200
-#define DMESA_GET_VIDEO_MODES 0x0300
-#define DMESA_GET_BUFFER_ADDR 0x0400
-
-#define DMESA_DRIVER_DBL_BIT 0x1 /* double-buffered */
-#define DMESA_DRIVER_YUP_BIT 0x2 /* lower-left window origin */
-int DMesaGetIntegerv (GLenum pname, GLint *params);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/mesalib/include/GL/ggimesa.h b/mesalib/include/GL/ggimesa.h
deleted file mode 100644
index 90e0b4222..000000000
--- a/mesalib/include/GL/ggimesa.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
- * Version: 4.0
- * Copyright (C) 1995-2000 Brian Paul
- * Copyright (C) 1998 Uwe Maurer
- * Copyrigth (C) 2001 Filip Spacek
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-#ifndef GGIMESA_H
-#define GGIMESA_H
-
-#define GGIMESA_MAJOR_VERSION 4
-#define GGIMESA_MINOR_VERSION 0
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ggi/ggi.h>
-#include "GL/gl.h"
-
-typedef struct ggi_mesa_context *ggi_mesa_context_t;
-
-/*
- * Initialize Mesa GGI extension
- */
-int ggiMesaInit(void);
-/*
- * Clean up Mesa GGI exension
- */
-int ggiMesaExit(void);
-
-/*
- * Attach Mesa GGI extension to the visual 'vis'
- */
-int ggiMesaAttach(ggi_visual_t vis);
-/*
- * Detach Mesa GGI extension from the visual 'vis'
- */
-int ggiMesaDetach(ggi_visual_t vis);
-
-int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
- GLboolean stereo_flag, GLint depth_size,
- GLint stencil_size, GLint accum_red_size,
- GLint accum_green_size, GLint accum_blue_size,
- GLint accum_alpha_size, GLint num_samples);
-
-/*
- * Create a new context capable of displaying on the visual vis.
- */
-ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
-/*
- * Destroy the context 'ctx'
- */
-void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
-
-/*
- * Make context 'ctx' the current context and bind it to visual 'vis'.
- * Note that the context must have been created with respect to that visual.
- */
-void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
-
-void ggiMesaSwapBuffers(void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/mesalib/include/GL/gl.h b/mesalib/include/GL/gl.h
index 5f8bc2b70..8e5f1383f 100644
--- a/mesalib/include/GL/gl.h
+++ b/mesalib/include/GL/gl.h
@@ -67,7 +67,7 @@
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
-#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define GLAPI __attribute__((visibility("default")))
# define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */
@@ -85,7 +85,9 @@
* glut.h or gl.h.
*/
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
+#endif
#include <windows.h>
#endif
@@ -2193,6 +2195,21 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
#endif /* GL_ATI_blend_equation_separate */
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+typedef void* GLeglImageOES;
+#endif
+
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
/**
** NOTE!!!!! If you add new functions to this file, or update
diff --git a/mesalib/include/GL/gl_mangle.h b/mesalib/include/GL/gl_mangle.h
index 59f614979..43d2e896b 100644
--- a/mesalib/include/GL/gl_mangle.h
+++ b/mesalib/include/GL/gl_mangle.h
@@ -30,6 +30,7 @@
/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */
#define glAccum MANGLE(Accum)
+#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
#define glActiveTextureARB MANGLE(ActiveTextureARB)
#define glActiveTexture MANGLE(ActiveTexture)
@@ -60,6 +61,7 @@
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
+#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV)
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
#define glBindAttribLocation MANGLE(BindAttribLocation)
#define glBindBufferARB MANGLE(BindBufferARB)
@@ -93,6 +95,8 @@
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
#define glBindVertexArray MANGLE(BindVertexArray)
#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
+#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV)
+#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV)
#define glBinormal3bEXT MANGLE(Binormal3bEXT)
#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
#define glBinormal3dEXT MANGLE(Binormal3dEXT)
@@ -126,6 +130,7 @@
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
#define glBlitFramebuffer MANGLE(BlitFramebuffer)
+#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV)
#define glBufferDataARB MANGLE(BufferDataARB)
#define glBufferData MANGLE(BufferData)
#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
@@ -202,6 +207,7 @@
#define glColor4uiv MANGLE(Color4uiv)
#define glColor4us MANGLE(Color4us)
#define glColor4usv MANGLE(Color4usv)
+#define glColorFormatNV MANGLE(ColorFormatNV)
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
@@ -276,6 +282,7 @@
#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
+#define glCopyImageSubDataNV MANGLE(CopyImageSubDataNV)
#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
@@ -302,6 +309,7 @@
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
#define glCreateShader MANGLE(CreateShader)
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
+#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
#define glCullFace MANGLE(CullFace)
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
@@ -379,11 +387,14 @@
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
#define glDrawRangeElements MANGLE(DrawRangeElements)
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
+#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
#define glEdgeFlag MANGLE(EdgeFlag)
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
#define glEdgeFlagPointer MANGLE(EdgeFlagPointer)
#define glEdgeFlagv MANGLE(EdgeFlagv)
+#define glEGLImageTargetRenderbufferStorageOES MANGLE(EGLImageTargetRenderbufferStorageOES)
+#define glEGLImageTargetTexture2DOES MANGLE(EGLImageTargetTexture2DOES)
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
#define glElementPointerATI MANGLE(ElementPointerATI)
#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)
@@ -408,6 +419,7 @@
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
+#define glEndVideoCaptureNV MANGLE(EndVideoCaptureNV)
#define glEvalCoord1d MANGLE(EvalCoord1d)
#define glEvalCoord1dv MANGLE(EvalCoord1dv)
#define glEvalCoord1f MANGLE(EvalCoord1f)
@@ -445,6 +457,7 @@
#define glFogCoorddv MANGLE(FogCoorddv)
#define glFogCoordfEXT MANGLE(FogCoordfEXT)
#define glFogCoordf MANGLE(FogCoordf)
+#define glFogCoordFormatNV MANGLE(FogCoordFormatNV)
#define glFogCoordfvEXT MANGLE(FogCoordfvEXT)
#define glFogCoordfv MANGLE(FogCoordfv)
#define glFogCoordhNV MANGLE(FogCoordhNV)
@@ -544,6 +557,7 @@
#define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v)
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
+#define glGetBufferParameterui64vNV MANGLE(GetBufferParameterui64vNV)
#define glGetBufferPointervARB MANGLE(GetBufferPointervARB)
#define glGetBufferPointerv MANGLE(GetBufferPointerv)
#define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB)
@@ -609,6 +623,8 @@
#define glGetInteger64v MANGLE(GetInteger64v)
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
+#define glGetIntegerui64i_vNV MANGLE(GetIntegerui64i_vNV)
+#define glGetIntegerui64vNV MANGLE(GetIntegerui64vNV)
#define glGetIntegerv MANGLE(GetIntegerv)
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
@@ -651,6 +667,7 @@
#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
+#define glGetNamedBufferParameterui64vNV MANGLE(GetNamedBufferParameterui64vNV)
#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
@@ -761,6 +778,7 @@
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
#define glGetUniformLocation MANGLE(GetUniformLocation)
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
+#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
#define glGetUniformuiv MANGLE(GetUniformuiv)
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
@@ -788,6 +806,10 @@
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
+#define glGetVideoCaptureivNV MANGLE(GetVideoCaptureivNV)
+#define glGetVideoCaptureStreamdvNV MANGLE(GetVideoCaptureStreamdvNV)
+#define glGetVideoCaptureStreamfvNV MANGLE(GetVideoCaptureStreamfvNV)
+#define glGetVideoCaptureStreamivNV MANGLE(GetVideoCaptureStreamivNV)
#define glGetVideoi64vNV MANGLE(GetVideoi64vNV)
#define glGetVideoivNV MANGLE(GetVideoivNV)
#define glGetVideoui64vNV MANGLE(GetVideoui64vNV)
@@ -812,6 +834,7 @@
#define glIndexd MANGLE(Indexd)
#define glIndexdv MANGLE(Indexdv)
#define glIndexf MANGLE(Indexf)
+#define glIndexFormatNV MANGLE(IndexFormatNV)
#define glIndexFuncEXT MANGLE(IndexFuncEXT)
#define glIndexfv MANGLE(Indexfv)
#define glIndexi MANGLE(Indexi)
@@ -832,6 +855,7 @@
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
#define glIsBufferARB MANGLE(IsBufferARB)
#define glIsBuffer MANGLE(IsBuffer)
+#define glIsBufferResidentNV MANGLE(IsBufferResidentNV)
#define glIsEnabledi MANGLE(IsEnabledi)
#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
#define glIsEnabled MANGLE(IsEnabled)
@@ -840,6 +864,7 @@
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
#define glIsFramebuffer MANGLE(IsFramebuffer)
#define glIsList MANGLE(IsList)
+#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
#define glIsProgramARB MANGLE(IsProgramARB)
@@ -888,6 +913,8 @@
#define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf)
#define glLockArraysEXT MANGLE(LockArraysEXT)
#define glLogicOp MANGLE(LogicOp)
+#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
+#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
#define glMap1d MANGLE(Map1d)
#define glMap1f MANGLE(Map1f)
#define glMap2d MANGLE(Map2d)
@@ -1060,6 +1087,8 @@
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
+#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
+#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
@@ -1091,6 +1120,7 @@
#define glNormal3iv MANGLE(Normal3iv)
#define glNormal3s MANGLE(Normal3s)
#define glNormal3sv MANGLE(Normal3sv)
+#define glNormalFormatNV MANGLE(NormalFormatNV)
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
#define glNormalPointer MANGLE(NormalPointer)
@@ -1234,6 +1264,8 @@
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
+#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
+#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
#define glProvokingVertexEXT MANGLE(ProvokingVertexEXT)
#define glProvokingVertex MANGLE(ProvokingVertex)
@@ -1362,6 +1394,7 @@
#define glSecondaryColor3us MANGLE(SecondaryColor3us)
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
+#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
@@ -1475,6 +1508,7 @@
#define glTexCoord4iv MANGLE(TexCoord4iv)
#define glTexCoord4s MANGLE(TexCoord4s)
#define glTexCoord4sv MANGLE(TexCoord4sv)
+#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
#define glTexCoordPointer MANGLE(TexCoordPointer)
@@ -1513,6 +1547,7 @@
#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
#define glTexSubImage3D MANGLE(TexSubImage3D)
#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
+#define glTextureBarrierNV MANGLE(TextureBarrierNV)
#define glTextureBufferEXT MANGLE(TextureBufferEXT)
#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
@@ -1601,6 +1636,8 @@
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
+#define glUniformui64NV MANGLE(Uniformui64NV)
+#define glUniformui64vNV MANGLE(Uniformui64vNV)
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
#define glUnmapBuffer MANGLE(UnmapBuffer)
@@ -1609,6 +1646,7 @@
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
#define glUseProgram MANGLE(UseProgram)
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
+#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
#define glValidateProgramARB MANGLE(ValidateProgramARB)
#define glValidateProgram MANGLE(ValidateProgram)
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
@@ -1762,6 +1800,7 @@
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
+#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
@@ -1802,6 +1841,7 @@
#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
+#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
@@ -1827,6 +1867,7 @@
#define glVertexBlendARB MANGLE(VertexBlendARB)
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
+#define glVertexFormatNV MANGLE(VertexFormatNV)
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
#define glVertexPointer MANGLE(VertexPointer)
@@ -1868,6 +1909,10 @@
#define glVertexWeighthNV MANGLE(VertexWeighthNV)
#define glVertexWeighthvNV MANGLE(VertexWeighthvNV)
#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT)
+#define glVideoCaptureNV MANGLE(VideoCaptureNV)
+#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
+#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
+#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
#define glViewport MANGLE(Viewport)
#define glWaitSync MANGLE(WaitSync)
#define glWeightbvARB MANGLE(WeightbvARB)
diff --git a/mesalib/include/GL/glx.h b/mesalib/include/GL/glx.h
index 288440140..fd53964ea 100644
--- a/mesalib/include/GL/glx.h
+++ b/mesalib/include/GL/glx.h
@@ -186,6 +186,16 @@ typedef XID GLXWindow;
typedef XID GLXPbuffer;
+/*
+** Events.
+** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
+** event - this helps initialization if the server supports the pbuffer
+** extension and the client doesn't.
+*/
+#define GLX_PbufferClobber 0
+#define GLX_BufferSwapComplete 1
+
+#define __GLX_NUMBER_EVENTS 17
extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
int *attribList );
@@ -507,8 +517,21 @@ typedef struct {
int count; /* if nonzero, at least this many more */
} GLXPbufferClobberEvent;
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ GLXDrawable drawable; /* drawable on which event was requested in event mask */
+ int event_type;
+ int64_t ust;
+ int64_t msc;
+ int64_t sbc;
+} GLXBufferSwapComplete;
+
typedef union __GLXEvent {
GLXPbufferClobberEvent glxpbufferclobber;
+ GLXBufferSwapComplete glxbufferswapcomplete;
long pad[24];
} GLXEvent;
diff --git a/mesalib/include/GL/glxext.h b/mesalib/include/GL/glxext.h
index 9ac0592e0..50740dd29 100644
--- a/mesalib/include/GL/glxext.h
+++ b/mesalib/include/GL/glxext.h
@@ -696,6 +696,14 @@ extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
#endif
+#ifndef GLX_INTEL_swap_event
+#define GLX_INTEL_swap_event
+#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x10000000
+#define GLX_EXCHANGE_COMPLETE_INTEL 0x8024
+#define GLX_BLIT_COMPLETE_INTEL 0x8025
+#define GLX_FLIP_COMPLETE_INTEL 0x8026
+#endif
+
#ifndef GLX_SGIX_swap_barrier
#define GLX_SGIX_swap_barrier 1
#ifdef GLX_GLXEXT_PROTOTYPES
diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h
index 34c17ea18..ea0139016 100644
--- a/mesalib/include/GL/internal/dri_interface.h
+++ b/mesalib/include/GL/internal/dri_interface.h
@@ -230,6 +230,13 @@ struct __DRItexOffsetExtensionRec {
};
+/* Valid values for format in the setTexBuffer2 function below. These
+ * values match the GLX tokens for compatibility reasons, but we
+ * define them here since the DRI interface can't depend on GLX. */
+#define __DRI_TEXTURE_FORMAT_NONE 0x20D8
+#define __DRI_TEXTURE_FORMAT_RGB 0x20D9
+#define __DRI_TEXTURE_FORMAT_RGBA 0x20DA
+
#define __DRI_TEX_BUFFER "DRI_TexBuffer"
#define __DRI_TEX_BUFFER_VERSION 2
struct __DRItexBufferExtensionRec {
@@ -262,10 +269,20 @@ struct __DRItexBufferExtensionRec {
* Used by drivers that implement DRI2
*/
#define __DRI2_FLUSH "DRI2_Flush"
-#define __DRI2_FLUSH_VERSION 1
+#define __DRI2_FLUSH_VERSION 3
struct __DRI2flushExtensionRec {
__DRIextension base;
void (*flush)(__DRIdrawable *drawable);
+
+ /**
+ * Ask the driver to call getBuffers/getBuffersWithFormat before
+ * it starts rendering again.
+ *
+ * \param drawable the drawable to invalidate
+ *
+ * \since 3
+ */
+ void (*invalidate)(__DRIdrawable *drawable);
};
@@ -736,4 +753,59 @@ struct __DRIdri2ExtensionRec {
};
+
+/**
+ * This extension provides functionality to enable various EGLImage
+ * extensions.
+ */
+#define __DRI_IMAGE "DRI_IMAGE"
+#define __DRI_IMAGE_VERSION 1
+
+/**
+ * These formats correspond to the similarly named MESA_FORMAT_*
+ * tokens, except in the native endian of the CPU. For example, on
+ * little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to
+ * MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian.
+ */
+#define __DRI_IMAGE_FORMAT_RGB565 0x1001
+#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002
+#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003
+
+typedef struct __DRIimageRec __DRIimage;
+typedef struct __DRIimageExtensionRec __DRIimageExtension;
+struct __DRIimageExtensionRec {
+ __DRIextension base;
+
+ __DRIimage *(*createImageFromName)(__DRIcontext *context,
+ int width, int height, int format,
+ int name, int pitch,
+ void *loaderPrivate);
+
+ __DRIimage *(*createImageFromRenderbuffer)(__DRIcontext *context,
+ int renderbuffer,
+ void *loaderPrivate);
+
+ void (*destroyImage)(__DRIimage *image);
+};
+
+/**
+ * This extension must be implemented by the loader and passed to the
+ * driver at screen creation time. The EGLImage entry points in the
+ * various client APIs take opaque EGLImage handles and use this
+ * extension to map them to a __DRIimage. At version 1, this
+ * extensions allows mapping EGLImage pointers to __DRIimage pointers,
+ * but future versions could support other EGLImage-like, opaque types
+ * with new lookup functions.
+ */
+#define __DRI_IMAGE_LOOKUP "DRI_IMAGE_LOOKUP"
+#define __DRI_IMAGE_LOOKUP_VERSION 1
+
+typedef struct __DRIimageLookupExtensionRec __DRIimageLookupExtension;
+struct __DRIimageLookupExtensionRec {
+ __DRIextension base;
+
+ __DRIimage *(*lookupEGLImage)(__DRIcontext *context, void *image,
+ void *loaderPrivate);
+};
+
#endif
diff --git a/mesalib/include/GL/internal/glcore.h b/mesalib/include/GL/internal/glcore.h
index 18f657662..547b11137 100644
--- a/mesalib/include/GL/internal/glcore.h
+++ b/mesalib/include/GL/internal/glcore.h
@@ -178,8 +178,4 @@ typedef struct __GLcontextModesRec {
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
-#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
-#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
-#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
-
#endif /* __gl_core_h_ */
diff --git a/mesalib/include/GL/svgamesa.h b/mesalib/include/GL/svgamesa.h
deleted file mode 100644
index 67c0e4c5c..000000000
--- a/mesalib/include/GL/svgamesa.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 4.0
- * Copyright (C) 1995-2001 Brian Paul
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-/*
- * SVGA/Mesa interface for Linux.
- */
-
-
-/*
- * Intro to using the VGA/Mesa interface
- *
- * 1. #include the <vga.h> file
- * 2. Call vga_init() to initialize the SVGA library.
- * 3. Call vga_setmode() to specify the screen size and color depth.
- * 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit
- * color Mesa assumes color index mode, if using 16-bit or deeper color
- * Mesa assumes RGB mode.
- * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
- * 6. You can now use the Mesa API functions.
- * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
- * to restore the original text screen.
- *
- * Notes
- * 1. You must run your executable as root (or use the set UID-bit) because
- * the SVGA library requires it.
- * 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what
- * has to be done yet.
- */
-
-
-#ifndef SVGAMESA_H
-#define SVGAMESA_H
-
-
-#define SVGAMESA_MAJOR_VERSION 4
-#define SVGAMESA_MINOR_VERSION 0
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include "GL/gl.h"
-
-
-
-/*
- * This is the SVGAMesa context 'handle':
- */
-typedef struct svgamesa_context *SVGAMesaContext;
-
-
-
-/*
- * doubleBuffer flag new in version 2.4
- */
-extern int SVGAMesaInit( int GraphMode );
-
-extern int SVGAMesaClose( void );
-
-extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
-
-extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
-
-extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
-
-extern void SVGAMesaSwapBuffers( void );
-
-extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
-
-extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/mesalib/include/KHR/khrplatform.h b/mesalib/include/KHR/khrplatform.h
new file mode 100644
index 000000000..64dfa7189
--- /dev/null
+++ b/mesalib/include/KHR/khrplatform.h
@@ -0,0 +1,273 @@
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Khronos platform-specific types and definitions.
+ *
+ * $Revision$ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
+ *
+ * Adopters may modify this file to suit their platform. Adopters are
+ * encouraged to submit platform specific modifications to the Khronos
+ * group so that they can be included in future versions of this file.
+ * Please submit changes by sending them to the public Khronos Bugzilla
+ * (http://khronos.org/bugzilla) by filing a bug against product
+ * "Khronos (general)" component "Registry".
+ *
+ * A predefined template which fills in some of the bug fields can be
+ * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
+ * must create a Bugzilla login first.
+ *
+ *
+ * See the Implementer's Guidelines for information about where this file
+ * should be located on your system and for more details of its use:
+ * http://www.khronos.org/registry/implementers_guide.pdf
+ *
+ * This file should be included as
+ * #include <KHR/khrplatform.h>
+ * by Khronos client API header files that use its types and defines.
+ *
+ * The types in khrplatform.h should only be used to define API-specific types.
+ *
+ * Types defined in khrplatform.h:
+ * khronos_int8_t signed 8 bit
+ * khronos_uint8_t unsigned 8 bit
+ * khronos_int16_t signed 16 bit
+ * khronos_uint16_t unsigned 16 bit
+ * khronos_int32_t signed 32 bit
+ * khronos_uint32_t unsigned 32 bit
+ * khronos_int64_t signed 64 bit
+ * khronos_uint64_t unsigned 64 bit
+ * khronos_intptr_t signed same number of bits as a pointer
+ * khronos_uintptr_t unsigned same number of bits as a pointer
+ * khronos_ssize_t signed size
+ * khronos_usize_t unsigned size
+ * khronos_float_t signed 32 bit floating point
+ * khronos_time_ns_t unsigned 64 bit time in nanoseconds
+ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
+ * nanoseconds
+ * khronos_stime_nanoseconds_t signed time interval in nanoseconds
+ * khronos_boolean_enum_t enumerated boolean type. This should
+ * only be used as a base type when a client API's boolean type is
+ * an enum. Client APIs which use an integer or other type for
+ * booleans cannot use this as the base type for their boolean.
+ *
+ * Tokens defined in khrplatform.h:
+ *
+ * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
+ *
+ * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
+ * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
+ *
+ * Calling convention macros defined in this file:
+ * KHRONOS_APICALL
+ * KHRONOS_APIENTRY
+ * KHRONOS_APIATTRIBUTES
+ *
+ * These may be used in function prototypes as:
+ *
+ * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
+ * int arg1,
+ * int arg2) KHRONOS_APIATTRIBUTES;
+ */
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APICALL
+ *-------------------------------------------------------------------------
+ * This precedes the return type of the function in the function prototype.
+ */
+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
+# define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+# define KHRONOS_APICALL IMPORT_C
+#elif (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+/* KHRONOS_APIATTRIBUTES is not used by the client API headers yet */
+# define KHRONOS_APICALL __attribute__((visibility("default")))
+#else
+# define KHRONOS_APICALL
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIENTRY
+ *-------------------------------------------------------------------------
+ * This follows the return type of the function and precedes the function
+ * name in the function prototype.
+ */
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+ /* Win32 but not WinCE */
+# define KHRONOS_APIENTRY __stdcall
+#else
+# define KHRONOS_APIENTRY
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIATTRIBUTES
+ *-------------------------------------------------------------------------
+ * This follows the closing parenthesis of the function prototype arguments.
+ */
+#if defined (__ARMCC_2__)
+#define KHRONOS_APIATTRIBUTES __softfp
+#else
+#define KHRONOS_APIATTRIBUTES
+#endif
+
+/*-------------------------------------------------------------------------
+ * basic type definitions
+ *-----------------------------------------------------------------------*/
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
+
+
+/*
+ * Using <stdint.h>
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__VMS ) || defined(__sgi)
+
+/*
+ * Using <inttypes.h>
+ */
+#include <inttypes.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
+
+/*
+ * Win32
+ */
+typedef __int32 khronos_int32_t;
+typedef unsigned __int32 khronos_uint32_t;
+typedef __int64 khronos_int64_t;
+typedef unsigned __int64 khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__sun__) || defined(__digital__)
+
+/*
+ * Sun or Digital
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#if defined(__arch64__) || defined(_LP64)
+typedef long int khronos_int64_t;
+typedef unsigned long int khronos_uint64_t;
+#else
+typedef long long int khronos_int64_t;
+typedef unsigned long long int khronos_uint64_t;
+#endif /* __arch64__ */
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif 0
+
+/*
+ * Hypothetical platform with no float or int64 support
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#define KHRONOS_SUPPORT_INT64 0
+#define KHRONOS_SUPPORT_FLOAT 0
+
+#else
+
+/*
+ * Generic fallback
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#endif
+
+
+/*
+ * Types that are (so far) the same on all platforms
+ */
+typedef signed char khronos_int8_t;
+typedef unsigned char khronos_uint8_t;
+typedef signed short int khronos_int16_t;
+typedef unsigned short int khronos_uint16_t;
+typedef signed long int khronos_intptr_t;
+typedef unsigned long int khronos_uintptr_t;
+typedef signed long int khronos_ssize_t;
+typedef unsigned long int khronos_usize_t;
+
+#if KHRONOS_SUPPORT_FLOAT
+/*
+ * Float type
+ */
+typedef float khronos_float_t;
+#endif
+
+#if KHRONOS_SUPPORT_INT64
+/* Time types
+ *
+ * These types can be used to represent a time interval in nanoseconds or
+ * an absolute Unadjusted System Time. Unadjusted System Time is the number
+ * of nanoseconds since some arbitrary system event (e.g. since the last
+ * time the system booted). The Unadjusted System Time is an unsigned
+ * 64 bit value that wraps back to 0 every 584 years. Time intervals
+ * may be either signed or unsigned.
+ */
+typedef khronos_uint64_t khronos_utime_nanoseconds_t;
+typedef khronos_int64_t khronos_stime_nanoseconds_t;
+#endif
+
+/*
+ * Dummy value used to pad enum types to 32 bits.
+ */
+#ifndef KHRONOS_MAX_ENUM
+#define KHRONOS_MAX_ENUM 0x7FFFFFFF
+#endif
+
+/*
+ * Enumerated boolean type
+ *
+ * Values other than zero should be considered to be true. Therefore
+ * comparisons should not be made against KHRONOS_TRUE.
+ */
+typedef enum {
+ KHRONOS_FALSE = 0,
+ KHRONOS_TRUE = 1,
+ KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
+} khronos_boolean_enum_t;
+
+#endif /* __khrplatform_h_ */
diff --git a/mesalib/include/VG/openvg.h b/mesalib/include/VG/openvg.h
new file mode 100644
index 000000000..fa37fa373
--- /dev/null
+++ b/mesalib/include/VG/openvg.h
@@ -0,0 +1,686 @@
+/* $Revision$ on $Date:: 2008-10-30 05:14:19 -0400 #$ */
+
+/*------------------------------------------------------------------------
+ *
+ * OpenVG 1.0.1 Reference Implementation
+ * -------------------------------------
+ *
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and /or associated documentation files
+ * (the "Materials "), to deal in the Materials without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Materials,
+ * and to permit persons to whom the Materials are furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
+ * THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//**
+ * \file
+ * \brief OpenVG 1.0.1 API.
+ *//*-------------------------------------------------------------------*/
+
+#ifndef _OPENVG_H
+#define _OPENVG_H
+
+#include <VG/vgplatform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define OPENVG_VERSION_1_0 1
+#define OPENVG_VERSION_1_0_1 1
+
+#ifndef VG_MAXSHORT
+#define VG_MAXSHORT 0x7FFF
+#endif
+
+#ifndef VG_MAXINT
+#define VG_MAXINT 0x7FFFFFFF
+#endif
+
+#ifndef VG_MAX_ENUM
+#define VG_MAX_ENUM 0x7FFFFFFF
+#endif
+
+typedef long VGHandle;
+
+typedef VGHandle VGPath;
+typedef VGHandle VGImage;
+typedef VGHandle VGPaint;
+
+#define VG_INVALID_HANDLE ((VGHandle)0)
+
+typedef enum {
+ VG_FALSE = 0,
+ VG_TRUE = 1,
+
+ VG_BOOLEAN_FORCE_SIZE = VG_MAX_ENUM
+} VGboolean;
+
+typedef enum {
+ VG_NO_ERROR = 0,
+ VG_BAD_HANDLE_ERROR = 0x1000,
+ VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
+ VG_OUT_OF_MEMORY_ERROR = 0x1002,
+ VG_PATH_CAPABILITY_ERROR = 0x1003,
+ VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
+ VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
+ VG_IMAGE_IN_USE_ERROR = 0x1006,
+ VG_NO_CONTEXT_ERROR = 0x1007,
+
+ VG_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
+} VGErrorCode;
+
+typedef enum {
+ /* Mode settings */
+ VG_MATRIX_MODE = 0x1100,
+ VG_FILL_RULE = 0x1101,
+ VG_IMAGE_QUALITY = 0x1102,
+ VG_RENDERING_QUALITY = 0x1103,
+ VG_BLEND_MODE = 0x1104,
+ VG_IMAGE_MODE = 0x1105,
+
+ /* Scissoring rectangles */
+ VG_SCISSOR_RECTS = 0x1106,
+
+ /* Stroke parameters */
+ VG_STROKE_LINE_WIDTH = 0x1110,
+ VG_STROKE_CAP_STYLE = 0x1111,
+ VG_STROKE_JOIN_STYLE = 0x1112,
+ VG_STROKE_MITER_LIMIT = 0x1113,
+ VG_STROKE_DASH_PATTERN = 0x1114,
+ VG_STROKE_DASH_PHASE = 0x1115,
+ VG_STROKE_DASH_PHASE_RESET = 0x1116,
+
+ /* Edge fill color for VG_TILE_FILL tiling mode */
+ VG_TILE_FILL_COLOR = 0x1120,
+
+ /* Color for vgClear */
+ VG_CLEAR_COLOR = 0x1121,
+
+ /* Enable/disable alpha masking and scissoring */
+ VG_MASKING = 0x1130,
+ VG_SCISSORING = 0x1131,
+
+ /* Pixel layout information */
+ VG_PIXEL_LAYOUT = 0x1140,
+ VG_SCREEN_LAYOUT = 0x1141,
+
+ /* Source format selection for image filters */
+ VG_FILTER_FORMAT_LINEAR = 0x1150,
+ VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
+
+ /* Destination write enable mask for image filters */
+ VG_FILTER_CHANNEL_MASK = 0x1152,
+
+ /* Implementation limits (read-only) */
+ VG_MAX_SCISSOR_RECTS = 0x1160,
+ VG_MAX_DASH_COUNT = 0x1161,
+ VG_MAX_KERNEL_SIZE = 0x1162,
+ VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
+ VG_MAX_COLOR_RAMP_STOPS = 0x1164,
+ VG_MAX_IMAGE_WIDTH = 0x1165,
+ VG_MAX_IMAGE_HEIGHT = 0x1166,
+ VG_MAX_IMAGE_PIXELS = 0x1167,
+ VG_MAX_IMAGE_BYTES = 0x1168,
+ VG_MAX_FLOAT = 0x1169,
+ VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A,
+
+ VG_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGParamType;
+
+typedef enum {
+ VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
+ VG_RENDERING_QUALITY_FASTER = 0x1201,
+ VG_RENDERING_QUALITY_BETTER = 0x1202, /* Default */
+
+ VG_RENDERING_QUALITY_FORCE_SIZE = VG_MAX_ENUM
+} VGRenderingQuality;
+
+typedef enum {
+ VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
+ VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
+ VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
+ VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
+ VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304,
+
+ VG_PIXEL_LAYOUT_FORCE_SIZE = VG_MAX_ENUM
+} VGPixelLayout;
+
+typedef enum {
+ VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
+ VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
+ VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
+ VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403,
+
+ VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM
+} VGMatrixMode;
+
+typedef enum {
+ VG_CLEAR_MASK = 0x1500,
+ VG_FILL_MASK = 0x1501,
+ VG_SET_MASK = 0x1502,
+ VG_UNION_MASK = 0x1503,
+ VG_INTERSECT_MASK = 0x1504,
+ VG_SUBTRACT_MASK = 0x1505,
+
+ VG_MASK_OPERATION_FORCE_SIZE = VG_MAX_ENUM
+} VGMaskOperation;
+
+#define VG_PATH_FORMAT_STANDARD 0
+
+typedef enum {
+ VG_PATH_DATATYPE_S_8 = 0,
+ VG_PATH_DATATYPE_S_16 = 1,
+ VG_PATH_DATATYPE_S_32 = 2,
+ VG_PATH_DATATYPE_F = 3,
+
+ VG_PATH_DATATYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGPathDatatype;
+
+typedef enum {
+ VG_ABSOLUTE = 0,
+ VG_RELATIVE = 1,
+
+ VG_PATH_ABS_REL_FORCE_SIZE = VG_MAX_ENUM
+} VGPathAbsRel;
+
+typedef enum {
+ VG_CLOSE_PATH = ( 0 << 1),
+ VG_MOVE_TO = ( 1 << 1),
+ VG_LINE_TO = ( 2 << 1),
+ VG_HLINE_TO = ( 3 << 1),
+ VG_VLINE_TO = ( 4 << 1),
+ VG_QUAD_TO = ( 5 << 1),
+ VG_CUBIC_TO = ( 6 << 1),
+ VG_SQUAD_TO = ( 7 << 1),
+ VG_SCUBIC_TO = ( 8 << 1),
+ VG_SCCWARC_TO = ( 9 << 1),
+ VG_SCWARC_TO = (10 << 1),
+ VG_LCCWARC_TO = (11 << 1),
+ VG_LCWARC_TO = (12 << 1),
+
+ VG_PATH_SEGMENT_FORCE_SIZE = VG_MAX_ENUM
+} VGPathSegment;
+
+typedef enum {
+ VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE,
+ VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE,
+ VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE,
+ VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE,
+ VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE,
+ VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE,
+ VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE,
+ VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE,
+ VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE,
+ VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE,
+ VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE,
+ VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE,
+ VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE,
+ VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE,
+ VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE,
+ VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE,
+ VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE,
+ VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE,
+ VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE,
+ VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE,
+ VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE,
+ VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE,
+ VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE,
+ VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE,
+
+ VG_PATH_COMMAND_FORCE_SIZE = VG_MAX_ENUM
+} VGPathCommand;
+
+typedef enum {
+ VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0),
+ VG_PATH_CAPABILITY_APPEND_TO = (1 << 1),
+ VG_PATH_CAPABILITY_MODIFY = (1 << 2),
+ VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3),
+ VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4),
+ VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5),
+ VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6),
+ VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7),
+ VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8),
+ VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9),
+ VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10),
+ VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11),
+ VG_PATH_CAPABILITY_ALL = (1 << 12) - 1,
+
+ VG_PATH_CAPABILITIES_FORCE_SIZE = VG_MAX_ENUM
+} VGPathCapabilities;
+
+typedef enum {
+ VG_PATH_FORMAT = 0x1600,
+ VG_PATH_DATATYPE = 0x1601,
+ VG_PATH_SCALE = 0x1602,
+ VG_PATH_BIAS = 0x1603,
+ VG_PATH_NUM_SEGMENTS = 0x1604,
+ VG_PATH_NUM_COORDS = 0x1605,
+
+ VG_PATH_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGPathParamType;
+
+typedef enum {
+ VG_CAP_BUTT = 0x1700,
+ VG_CAP_ROUND = 0x1701,
+ VG_CAP_SQUARE = 0x1702,
+
+ VG_CAP_STYLE_FORCE_SIZE = VG_MAX_ENUM
+} VGCapStyle;
+
+typedef enum {
+ VG_JOIN_MITER = 0x1800,
+ VG_JOIN_ROUND = 0x1801,
+ VG_JOIN_BEVEL = 0x1802,
+
+ VG_JOIN_STYLE_FORCE_SIZE = VG_MAX_ENUM
+} VGJoinStyle;
+
+typedef enum {
+ VG_EVEN_ODD = 0x1900,
+ VG_NON_ZERO = 0x1901,
+
+ VG_FILL_RULE_FORCE_SIZE = VG_MAX_ENUM
+} VGFillRule;
+
+typedef enum {
+ VG_STROKE_PATH = (1 << 0),
+ VG_FILL_PATH = (1 << 1),
+
+ VG_PAINT_MODE_FORCE_SIZE = VG_MAX_ENUM
+} VGPaintMode;
+
+typedef enum {
+ /* Color paint parameters */
+ VG_PAINT_TYPE = 0x1A00,
+ VG_PAINT_COLOR = 0x1A01,
+ VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02,
+ VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07,
+ VG_PAINT_COLOR_RAMP_STOPS = 0x1A03,
+
+ /* Linear gradient paint parameters */
+ VG_PAINT_LINEAR_GRADIENT = 0x1A04,
+
+ /* Radial gradient paint parameters */
+ VG_PAINT_RADIAL_GRADIENT = 0x1A05,
+
+ /* Pattern paint parameters */
+ VG_PAINT_PATTERN_TILING_MODE = 0x1A06,
+
+ VG_PAINT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGPaintParamType;
+
+typedef enum {
+ VG_PAINT_TYPE_COLOR = 0x1B00,
+ VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01,
+ VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02,
+ VG_PAINT_TYPE_PATTERN = 0x1B03,
+
+ VG_PAINT_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGPaintType;
+
+typedef enum {
+ VG_COLOR_RAMP_SPREAD_PAD = 0x1C00,
+ VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01,
+ VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02,
+
+ VG_COLOR_RAMP_SPREAD_MODE_FORCE_SIZE = VG_MAX_ENUM
+} VGColorRampSpreadMode;
+
+typedef enum {
+ VG_TILE_FILL = 0x1D00,
+ VG_TILE_PAD = 0x1D01,
+ VG_TILE_REPEAT = 0x1D02,
+ VG_TILE_REFLECT = 0x1D03,
+
+ VG_TILING_MODE_FORCE_SIZE = VG_MAX_ENUM
+} VGTilingMode;
+
+typedef enum {
+ /* RGB{A,X} channel ordering */
+ VG_sRGBX_8888 = 0,
+ VG_sRGBA_8888 = 1,
+ VG_sRGBA_8888_PRE = 2,
+ VG_sRGB_565 = 3,
+ VG_sRGBA_5551 = 4,
+ VG_sRGBA_4444 = 5,
+ VG_sL_8 = 6,
+ VG_lRGBX_8888 = 7,
+ VG_lRGBA_8888 = 8,
+ VG_lRGBA_8888_PRE = 9,
+ VG_lL_8 = 10,
+ VG_A_8 = 11,
+ VG_BW_1 = 12,
+
+ /* {A,X}RGB channel ordering */
+ VG_sXRGB_8888 = 0 | (1 << 6),
+ VG_sARGB_8888 = 1 | (1 << 6),
+ VG_sARGB_8888_PRE = 2 | (1 << 6),
+ VG_sARGB_1555 = 4 | (1 << 6),
+ VG_sARGB_4444 = 5 | (1 << 6),
+ VG_lXRGB_8888 = 7 | (1 << 6),
+ VG_lARGB_8888 = 8 | (1 << 6),
+ VG_lARGB_8888_PRE = 9 | (1 << 6),
+
+ /* BGR{A,X} channel ordering */
+ VG_sBGRX_8888 = 0 | (1 << 7),
+ VG_sBGRA_8888 = 1 | (1 << 7),
+ VG_sBGRA_8888_PRE = 2 | (1 << 7),
+ VG_sBGR_565 = 3 | (1 << 7),
+ VG_sBGRA_5551 = 4 | (1 << 7),
+ VG_sBGRA_4444 = 5 | (1 << 7),
+ VG_lBGRX_8888 = 7 | (1 << 7),
+ VG_lBGRA_8888 = 8 | (1 << 7),
+ VG_lBGRA_8888_PRE = 9 | (1 << 7),
+
+ /* {A,X}BGR channel ordering */
+ VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7),
+ VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7),
+ VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7),
+ VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7),
+ VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7),
+ VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7),
+ VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7),
+ VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7),
+
+ VG_IMAGE_FORMAT_FORCE_SIZE = VG_MAX_ENUM
+} VGImageFormat;
+
+typedef enum {
+ VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0),
+ VG_IMAGE_QUALITY_FASTER = (1 << 1),
+ VG_IMAGE_QUALITY_BETTER = (1 << 2),
+
+ VG_IMAGE_QUALITY_FORCE_SIZE = VG_MAX_ENUM
+} VGImageQuality;
+
+typedef enum {
+ VG_IMAGE_FORMAT = 0x1E00,
+ VG_IMAGE_WIDTH = 0x1E01,
+ VG_IMAGE_HEIGHT = 0x1E02,
+
+ VG_IMAGE_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGImageParamType;
+
+typedef enum {
+ VG_DRAW_IMAGE_NORMAL = 0x1F00,
+ VG_DRAW_IMAGE_MULTIPLY = 0x1F01,
+ VG_DRAW_IMAGE_STENCIL = 0x1F02,
+
+ VG_IMAGE_MODE_FORCE_SIZE = VG_MAX_ENUM
+} VGImageMode;
+
+typedef enum {
+ VG_RED = (1 << 3),
+ VG_GREEN = (1 << 2),
+ VG_BLUE = (1 << 1),
+ VG_ALPHA = (1 << 0),
+
+ VG_IMAGE_CHANNEL_FORCE_SIZE = VG_MAX_ENUM
+} VGImageChannel;
+
+typedef enum {
+ VG_BLEND_SRC = 0x2000,
+ VG_BLEND_SRC_OVER = 0x2001,
+ VG_BLEND_DST_OVER = 0x2002,
+ VG_BLEND_SRC_IN = 0x2003,
+ VG_BLEND_DST_IN = 0x2004,
+ VG_BLEND_MULTIPLY = 0x2005,
+ VG_BLEND_SCREEN = 0x2006,
+ VG_BLEND_DARKEN = 0x2007,
+ VG_BLEND_LIGHTEN = 0x2008,
+ VG_BLEND_ADDITIVE = 0x2009,
+
+ VG_BLEND_MODE_FORCE_SIZE = VG_MAX_ENUM
+} VGBlendMode;
+
+typedef enum {
+ VG_IMAGE_FORMAT_QUERY = 0x2100,
+ VG_PATH_DATATYPE_QUERY = 0x2101,
+
+ VG_HARDWARE_QUERY_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGHardwareQueryType;
+
+typedef enum {
+ VG_HARDWARE_ACCELERATED = 0x2200,
+ VG_HARDWARE_UNACCELERATED = 0x2201,
+
+ VG_HARDWARE_QUERY_RESULT_FORCE_SIZE = VG_MAX_ENUM
+} VGHardwareQueryResult;
+
+typedef enum {
+ VG_VENDOR = 0x2300,
+ VG_RENDERER = 0x2301,
+ VG_VERSION = 0x2302,
+ VG_EXTENSIONS = 0x2303,
+
+ VG_STRING_ID_FORCE_SIZE = VG_MAX_ENUM
+} VGStringID;
+
+/* Function Prototypes */
+
+#ifndef VG_API_CALL
+# error VG_API_CALL must be defined
+#endif
+
+#ifndef VG_API_ENTRY
+# error VG_API_ENTRY must be defined
+#endif
+
+#ifndef VG_API_EXIT
+# error VG_API_EXIT must be defined
+#endif
+
+VG_API_CALL VGErrorCode VG_API_ENTRY vgGetError(void) VG_API_EXIT;
+
+VG_API_CALL void VG_API_ENTRY vgFlush(void) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgFinish(void) VG_API_EXIT;
+
+/* Getters and Setters */
+VG_API_CALL void VG_API_ENTRY vgSetf (VGParamType type, VGfloat value) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSeti (VGParamType type, VGint value) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetfv(VGParamType type, VGint count,
+ const VGfloat * values) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetiv(VGParamType type, VGint count,
+ const VGint * values) VG_API_EXIT;
+
+VG_API_CALL VGfloat VG_API_ENTRY vgGetf(VGParamType type) VG_API_EXIT;
+VG_API_CALL VGint VG_API_ENTRY vgGeti(VGParamType type) VG_API_EXIT;
+VG_API_CALL VGint VG_API_ENTRY vgGetVectorSize(VGParamType type) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGetfv(VGParamType type, VGint count, VGfloat * values) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGetiv(VGParamType type, VGint count, VGint * values) VG_API_EXIT;
+
+VG_API_CALL void VG_API_ENTRY vgSetParameterf(VGHandle object,
+ VGint paramType,
+ VGfloat value) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetParameteri(VGHandle object,
+ VGint paramType,
+ VGint value) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetParameterfv(VGHandle object,
+ VGint paramType,
+ VGint count, const VGfloat * values) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetParameteriv(VGHandle object,
+ VGint paramType,
+ VGint count, const VGint * values) VG_API_EXIT;
+
+VG_API_CALL VGfloat VG_API_ENTRY vgGetParameterf(VGHandle object,
+ VGint paramType) VG_API_EXIT;
+VG_API_CALL VGint VG_API_ENTRY vgGetParameteri(VGHandle object,
+ VGint paramType);
+VG_API_CALL VGint VG_API_ENTRY vgGetParameterVectorSize(VGHandle object,
+ VGint paramType) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGetParameterfv(VGHandle object,
+ VGint paramType,
+ VGint count, VGfloat * values) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGetParameteriv(VGHandle object,
+ VGint paramType,
+ VGint count, VGint * values) VG_API_EXIT;
+
+/* Matrix Manipulation */
+VG_API_CALL void VG_API_ENTRY vgLoadIdentity(void) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgLoadMatrix(const VGfloat * m) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGetMatrix(VGfloat * m) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgMultMatrix(const VGfloat * m) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgTranslate(VGfloat tx, VGfloat ty) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgScale(VGfloat sx, VGfloat sy) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgShear(VGfloat shx, VGfloat shy) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgRotate(VGfloat angle) VG_API_EXIT;
+
+/* Masking and Clearing */
+VG_API_CALL void VG_API_ENTRY vgMask(VGImage mask, VGMaskOperation operation,
+ VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgClear(VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
+
+/* Paths */
+VG_API_CALL VGPath VG_API_ENTRY vgCreatePath(VGint pathFormat,
+ VGPathDatatype datatype,
+ VGfloat scale, VGfloat bias,
+ VGint segmentCapacityHint,
+ VGint coordCapacityHint,
+ VGbitfield capabilities) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgClearPath(VGPath path, VGbitfield capabilities) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDestroyPath(VGPath path) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgRemovePathCapabilities(VGPath path,
+ VGbitfield capabilities) VG_API_EXIT;
+VG_API_CALL VGbitfield VG_API_ENTRY vgGetPathCapabilities(VGPath path) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgAppendPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgAppendPathData(VGPath dstPath,
+ VGint numSegments,
+ const VGubyte * pathSegments,
+ const void * pathData) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgModifyPathCoords(VGPath dstPath, VGint startIndex,
+ VGint numSegments,
+ const void * pathData) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgTransformPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
+VG_API_CALL VGboolean VG_API_ENTRY vgInterpolatePath(VGPath dstPath,
+ VGPath startPath,
+ VGPath endPath,
+ VGfloat amount) VG_API_EXIT;
+VG_API_CALL VGfloat VG_API_ENTRY vgPathLength(VGPath path,
+ VGint startSegment, VGint numSegments) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgPointAlongPath(VGPath path,
+ VGint startSegment, VGint numSegments,
+ VGfloat distance,
+ VGfloat * x, VGfloat * y,
+ VGfloat * tangentX, VGfloat * tangentY) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgPathBounds(VGPath path,
+ VGfloat * minX, VGfloat * minY,
+ VGfloat * width, VGfloat * height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgPathTransformedBounds(VGPath path,
+ VGfloat * minX, VGfloat * minY,
+ VGfloat * width, VGfloat * height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDrawPath(VGPath path, VGbitfield paintModes) VG_API_EXIT;
+
+/* Paint */
+VG_API_CALL VGPaint VG_API_ENTRY vgCreatePaint(void) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDestroyPaint(VGPaint paint) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_API_EXIT;
+VG_API_CALL VGPaint VG_API_ENTRY vgGetPaint(VGPaintMode paintMode) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetColor(VGPaint paint, VGuint rgba) VG_API_EXIT;
+VG_API_CALL VGuint VG_API_ENTRY vgGetColor(VGPaint paint) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgPaintPattern(VGPaint paint, VGImage pattern) VG_API_EXIT;
+
+/* Images */
+VG_API_CALL VGImage VG_API_ENTRY vgCreateImage(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDestroyImage(VGImage image) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgClearImage(VGImage image,
+ VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgImageSubData(VGImage image,
+ const void * data, VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGetImageSubData(VGImage image,
+ void * data, VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint x, VGint y,
+ VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL VGImage VG_API_ENTRY vgChildImage(VGImage parent,
+ VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgCopyImage(VGImage dst, VGint dx, VGint dy,
+ VGImage src, VGint sx, VGint sy,
+ VGint width, VGint height,
+ VGboolean dither) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDrawImage(VGImage image) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetPixels(VGint dx, VGint dy,
+ VGImage src, VGint sx, VGint sy,
+ VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgWritePixels(const void * data, VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint dx, VGint dy,
+ VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGetPixels(VGImage dst, VGint dx, VGint dy,
+ VGint sx, VGint sy,
+ VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgReadPixels(void * data, VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint sx, VGint sy,
+ VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgCopyPixels(VGint dx, VGint dy,
+ VGint sx, VGint sy,
+ VGint width, VGint height) VG_API_EXIT;
+
+/* Image Filters */
+VG_API_CALL void VG_API_ENTRY vgColorMatrix(VGImage dst, VGImage src,
+ const VGfloat * matrix) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgConvolve(VGImage dst, VGImage src,
+ VGint kernelWidth, VGint kernelHeight,
+ VGint shiftX, VGint shiftY,
+ const VGshort * kernel,
+ VGfloat scale,
+ VGfloat bias,
+ VGTilingMode tilingMode) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSeparableConvolve(VGImage dst, VGImage src,
+ VGint kernelWidth,
+ VGint kernelHeight,
+ VGint shiftX, VGint shiftY,
+ const VGshort * kernelX,
+ const VGshort * kernelY,
+ VGfloat scale,
+ VGfloat bias,
+ VGTilingMode tilingMode) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgGaussianBlur(VGImage dst, VGImage src,
+ VGfloat stdDeviationX,
+ VGfloat stdDeviationY,
+ VGTilingMode tilingMode) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgLookup(VGImage dst, VGImage src,
+ const VGubyte * redLUT,
+ const VGubyte * greenLUT,
+ const VGubyte * blueLUT,
+ const VGubyte * alphaLUT,
+ VGboolean outputLinear,
+ VGboolean outputPremultiplied) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgLookupSingle(VGImage dst, VGImage src,
+ const VGuint * lookupTable,
+ VGImageChannel sourceChannel,
+ VGboolean outputLinear,
+ VGboolean outputPremultiplied) VG_API_EXIT;
+
+/* Hardware Queries */
+VG_API_CALL VGHardwareQueryResult VG_API_ENTRY vgHardwareQuery(VGHardwareQueryType key,
+ VGint setting) VG_API_EXIT;
+
+/* Renderer and Extension Information */
+VG_API_CALL const VGubyte * VG_API_ENTRY vgGetString(VGStringID name) VG_API_EXIT;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _OPENVG_H */
diff --git a/mesalib/include/VG/vgext.h b/mesalib/include/VG/vgext.h
new file mode 100644
index 000000000..ba2875e52
--- /dev/null
+++ b/mesalib/include/VG/vgext.h
@@ -0,0 +1,233 @@
+/* $Revision$ on $Date:: 2008-10-29 10:31:37 -0400 #$ */
+
+/*------------------------------------------------------------------------
+ *
+ * VG extensions Reference Implementation
+ * -------------------------------------
+ *
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and /or associated documentation files
+ * (the "Materials "), to deal in the Materials without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Materials,
+ * and to permit persons to whom the Materials are furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
+ * THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//**
+ * \file
+ * \brief VG extensions
+ *//*-------------------------------------------------------------------*/
+
+
+
+#ifndef _VGEXT_H
+#define _VGEXT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <VG/openvg.h>
+#include <VG/vgu.h>
+
+#ifndef VG_API_ENTRYP
+# define VG_API_ENTRYP VG_API_ENTRY*
+#endif
+
+#ifndef VGU_API_ENTRYP
+# define VGU_API_ENTRYP VGU_API_ENTRY*
+#endif
+
+/*-------------------------------------------------------------------------------
+ * KHR extensions
+ *------------------------------------------------------------------------------*/
+
+typedef enum {
+
+#ifndef VG_KHR_iterative_average_blur
+ VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B,
+ VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C,
+ VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D,
+#endif
+
+ VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
+} VGParamTypeKHR;
+
+#ifndef VG_KHR_EGL_image
+#define VG_KHR_EGL_image 1
+/* VGEGLImageKHR is an opaque handle to an EGLImage */
+typedef void* VGeglImageKHR;
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);
+#endif
+typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image);
+
+#endif
+
+
+#ifndef VG_KHR_iterative_average_blur
+#define VG_KHR_iterative_average_blur 1
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
+#endif
+typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
+
+#endif
+
+
+#ifndef VG_KHR_advanced_blending
+#define VG_KHR_advanced_blending 1
+
+typedef enum {
+ VG_BLEND_OVERLAY_KHR = 0x2010,
+ VG_BLEND_HARDLIGHT_KHR = 0x2011,
+ VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012,
+ VG_BLEND_SOFTLIGHT_KHR = 0x2013,
+ VG_BLEND_COLORDODGE_KHR = 0x2014,
+ VG_BLEND_COLORBURN_KHR = 0x2015,
+ VG_BLEND_DIFFERENCE_KHR = 0x2016,
+ VG_BLEND_SUBTRACT_KHR = 0x2017,
+ VG_BLEND_INVERT_KHR = 0x2018,
+ VG_BLEND_EXCLUSION_KHR = 0x2019,
+ VG_BLEND_LINEARDODGE_KHR = 0x201a,
+ VG_BLEND_LINEARBURN_KHR = 0x201b,
+ VG_BLEND_VIVIDLIGHT_KHR = 0x201c,
+ VG_BLEND_LINEARLIGHT_KHR = 0x201d,
+ VG_BLEND_PINLIGHT_KHR = 0x201e,
+ VG_BLEND_HARDMIX_KHR = 0x201f,
+ VG_BLEND_CLEAR_KHR = 0x2020,
+ VG_BLEND_DST_KHR = 0x2021,
+ VG_BLEND_SRC_OUT_KHR = 0x2022,
+ VG_BLEND_DST_OUT_KHR = 0x2023,
+ VG_BLEND_SRC_ATOP_KHR = 0x2024,
+ VG_BLEND_DST_ATOP_KHR = 0x2025,
+ VG_BLEND_XOR_KHR = 0x2026,
+
+ VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM
+} VGBlendModeKHR;
+#endif
+
+#ifndef VG_KHR_parametric_filter
+#define VG_KHR_parametric_filter 1
+
+typedef enum {
+ VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),
+ VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1),
+ VG_PF_OUTER_FLAG_KHR = (1 << 2),
+ VG_PF_INNER_FLAG_KHR = (1 << 3),
+
+ VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
+} VGPfTypeKHR;
+
+typedef enum {
+ VGU_IMAGE_IN_USE_ERROR = 0xF010,
+
+ VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM
+} VGUErrorCodeKHR;
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ;
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
+#endif
+typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
+
+#endif
+
+
+/*-------------------------------------------------------------------------------
+ * NDS extensions
+ *------------------------------------------------------------------------------*/
+
+#ifndef VG_NDS_paint_generation
+#define VG_NDS_paint_generation 1
+
+typedef enum {
+ VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10,
+ VG_COLOR_MATRIX_NDS = 0x1A11,
+ VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12,
+
+ VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGPaintParamTypeNds;
+
+typedef enum {
+ VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10,
+
+ VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGImageModeNds;
+#endif
+
+
+#ifndef VG_NDS_projective_geometry
+#define VG_NDS_projective_geometry 1
+
+typedef enum {
+ VG_CLIP_MODE_NDS = 0x1180,
+ VG_CLIP_LINES_NDS = 0x1181,
+ VG_MAX_CLIP_LINES_NDS = 0x1182,
+
+ VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGParamTypeNds;
+
+typedef enum {
+ VG_CLIPMODE_NONE_NDS = 0x3000,
+ VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001,
+ VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002,
+ VG_CLIPMODE_CULL_NDS = 0x3003,
+
+ VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGClipModeNds;
+
+typedef enum {
+ VG_RQUAD_TO_NDS = ( 13 << 1 ),
+ VG_RCUBIC_TO_NDS = ( 14 << 1 ),
+
+ VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGPathSegmentNds;
+
+typedef enum {
+ VG_RQUAD_TO_ABS_NDS = (VG_RQUAD_TO_NDS | VG_ABSOLUTE),
+ VG_RQUAD_TO_REL_NDS = (VG_RQUAD_TO_NDS | VG_RELATIVE),
+ VG_RCUBIC_TO_ABS_NDS = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE),
+ VG_RCUBIC_TO_REL_NDS = (VG_RCUBIC_TO_NDS | VG_RELATIVE),
+
+ VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGPathCommandNds;
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ;
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
+#endif
+typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ;
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
+
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _VGEXT_H */
diff --git a/mesalib/include/VG/vgplatform.h b/mesalib/include/VG/vgplatform.h
new file mode 100644
index 000000000..4579deb6f
--- /dev/null
+++ b/mesalib/include/VG/vgplatform.h
@@ -0,0 +1,111 @@
+/* $Revision$ on $Date:: 2008-10-29 10:31:37 -0400 #$ */
+
+/*------------------------------------------------------------------------
+ *
+ * VG platform specific header Reference Implementation
+ * ----------------------------------------------------
+ *
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and /or associated documentation files
+ * (the "Materials "), to deal in the Materials without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Materials,
+ * and to permit persons to whom the Materials are furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
+ * THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//**
+ * \file
+ * \brief VG platform specific header
+ *//*-------------------------------------------------------------------*/
+
+#ifndef _VGPLATFORM_H
+#define _VGPLATFORM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+# define VG_API_CALL __attribute__((visibility("default")))
+# define VGU_API_CALL __attribute__((visibility("default")))
+#endif
+
+#ifndef VG_API_CALL
+#if defined(OPENVG_STATIC_LIBRARY)
+# define VG_API_CALL
+#else
+# if defined(_WIN32) || defined(__VC32__) /* Win32 */
+# if defined (OPENVG_DLL_EXPORTS)
+# define VG_API_CALL __declspec(dllexport)
+# else
+# define VG_API_CALL __declspec(dllimport)
+# endif
+# else
+# define VG_API_CALL extern
+# endif /* defined(_WIN32) ||... */
+#endif /* defined OPENVG_STATIC_LIBRARY */
+#endif /* ifndef VG_API_CALL */
+
+#ifndef VGU_API_CALL
+#if defined(OPENVG_STATIC_LIBRARY)
+# define VGU_API_CALL
+#else
+# if defined(_WIN32) || defined(__VC32__) /* Win32 */
+# if defined (OPENVG_DLL_EXPORTS)
+# define VGU_API_CALL __declspec(dllexport)
+# else
+# define VGU_API_CALL __declspec(dllimport)
+# endif
+# else
+# define VGU_API_CALL extern
+# endif /* defined(_WIN32) ||... */
+#endif /* defined OPENVG_STATIC_LIBRARY */
+#endif /* ifndef VGU_API_CALL */
+
+
+#ifndef VG_API_ENTRY
+#define VG_API_ENTRY
+#endif
+
+#ifndef VG_API_EXIT
+#define VG_API_EXIT
+#endif
+
+#ifndef VGU_API_ENTRY
+#define VGU_API_ENTRY
+#endif
+
+#ifndef VGU_API_EXIT
+#define VGU_API_EXIT
+#endif
+
+typedef float VGfloat;
+typedef signed char VGbyte;
+typedef unsigned char VGubyte;
+typedef signed short VGshort;
+typedef signed int VGint;
+typedef unsigned int VGuint;
+typedef unsigned int VGbitfield;
+
+#ifndef VG_VGEXT_PROTOTYPES
+#define VG_VGEXT_PROTOTYPES
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _VGPLATFORM_H */
diff --git a/mesalib/include/VG/vgu.h b/mesalib/include/VG/vgu.h
new file mode 100644
index 000000000..ecb27a002
--- /dev/null
+++ b/mesalib/include/VG/vgu.h
@@ -0,0 +1,130 @@
+/* $Revision$ on $Date:: 2008-10-29 10:31:37 -0400 #$ */
+
+/*------------------------------------------------------------------------
+ *
+ * VGU 1.0.1 Reference Implementation
+ * -------------------------------------
+ *
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and /or associated documentation files
+ * (the "Materials "), to deal in the Materials without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Materials,
+ * and to permit persons to whom the Materials are furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
+ * THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//**
+ * \file
+ * \brief VGU 1.0.1 API.
+ *//*-------------------------------------------------------------------*/
+
+#ifndef _VGU_H
+#define _VGU_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <VG/openvg.h>
+
+#define VGU_VERSION_1_0 1
+
+#ifndef VGU_API_CALL
+# error VGU_API_CALL must be defined
+#endif
+
+#ifndef VGU_API_ENTRY
+# error VGU_API_ENTRY must be defined
+#endif
+
+#ifndef VGU_API_EXIT
+# error VGU_API_EXIT must be defined
+#endif
+
+
+typedef enum {
+ VGU_NO_ERROR = 0,
+ VGU_BAD_HANDLE_ERROR = 0xF000,
+ VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,
+ VGU_OUT_OF_MEMORY_ERROR = 0xF002,
+ VGU_PATH_CAPABILITY_ERROR = 0xF003,
+ VGU_BAD_WARP_ERROR = 0xF004,
+
+ VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
+} VGUErrorCode;
+
+typedef enum {
+ VGU_ARC_OPEN = 0xF100,
+ VGU_ARC_CHORD = 0xF101,
+ VGU_ARC_PIE = 0xF102,
+
+ VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGUArcType;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path,
+ VGfloat x0, VGfloat y0,
+ VGfloat x1, VGfloat y1) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path,
+ const VGfloat * points, VGint count,
+ VGboolean closed) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path,
+ VGfloat x, VGfloat y,
+ VGfloat width, VGfloat height) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path,
+ VGfloat x, VGfloat y,
+ VGfloat width, VGfloat height,
+ VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path,
+ VGfloat cx, VGfloat cy,
+ VGfloat width, VGfloat height) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path,
+ VGfloat x, VGfloat y,
+ VGfloat width, VGfloat height,
+ VGfloat startAngle, VGfloat angleExtent,
+ VGUArcType arcType) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
+ VGfloat sx1, VGfloat sy1,
+ VGfloat sx2, VGfloat sy2,
+ VGfloat sx3, VGfloat sy3,
+ VGfloat * matrix) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
+ VGfloat dx1, VGfloat dy1,
+ VGfloat dx2, VGfloat dy2,
+ VGfloat dx3, VGfloat dy3,
+ VGfloat * matrix) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
+ VGfloat dx1, VGfloat dy1,
+ VGfloat dx2, VGfloat dy2,
+ VGfloat dx3, VGfloat dy3,
+ VGfloat sx0, VGfloat sy0,
+ VGfloat sx1, VGfloat sy1,
+ VGfloat sx2, VGfloat sy2,
+ VGfloat sx3, VGfloat sy3,
+ VGfloat * matrix) VGU_API_EXIT;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* #ifndef _VGU_H */