From 664a1f88f2e39fa52eccd7217a1f7aaa4c48f5af Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 23 Nov 1999 19:54:53 +0000 Subject: [PATCH] added GLX 1.3 tokens and functions --- include/GL/glx.h | 135 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 122 insertions(+), 13 deletions(-) diff --git a/include/GL/glx.h b/include/GL/glx.h index c4a0325d77a..e98f9cb8e74 100644 --- a/include/GL/glx.h +++ b/include/GL/glx.h @@ -1,4 +1,4 @@ -/* $Id: glx.h,v 1.7 1999/11/22 21:51:53 brianp Exp $ */ +/* $Id: glx.h,v 1.8 1999/11/23 19:54:53 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -50,6 +50,7 @@ extern "C" { #define GLX_VERSION_1_1 1 #define GLX_VERSION_1_2 1 +#define GLX_VERSION_1_3 1 #define GLX_EXTENSION_NAME "GLX" @@ -77,17 +78,6 @@ extern "C" { #define GLX_ACCUM_ALPHA_SIZE 17 -/* GLX_EXT_visual_info extension */ -#define GLX_X_VISUAL_TYPE_EXT 0x22 -#define GLX_TRANSPARENT_TYPE_EXT 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 -#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 - - - /* * Error codes returned by glXGetConfig: */ @@ -108,6 +98,73 @@ extern "C" { #define GLX_EXTENSIONS 3 +/* + * GLX 1.3 and later: + * XXX don't know the values of some of these enums! + * XXX some 1.3 enums may be missing! + */ +#define GLX_CONFIG_CAVEAT ? +#define GLX_DONT_CARE ? +#define GLX_SLOW_CONFIG ? +#define GLX_NON_CONFORMANT_CONFIG ? +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_MAX_PBUFFER_WIDTH ? +#define GLX_MAX_PBUFFER_HEIGHT ? +#define GLX_MAX_PBUFFER_PIXELS ? +#define GLX_PRESERVED_CONTENTS ? +#define GLX_LARGEST_BUFFER ? +#define GLX_DRAWABLE_TYPE ? +#define GLX_FBCONFIG_ID ? +#define GLX_VISUAL_ID ? +#define GLX_WINDOW_BIT ? +#define GLX_PBUFFER_BIT ? +#define GLX_AUX_BUFFERS_BIT ? +#define GLX_FRONT_LEFT_BUFFER_BIT ? +#define GLX_FRONT_RIGHT_BUFFER_BIT ? +#define GLX_BACK_LEFT_BUFFER_BIT ? +#define GLX_BACK_RIGHT_BUFFER_BIT ? +#define GLX_AUX_BUFFERS_BIT ? +#define GLX_DEPTH_BUFFER_BIT ? +#define GLX_STENCIL_BUFFER_BIT ? +#define GLX_ACCUM_BUFFER_BIT ? +#define GLX_RENDER_TYPE ? +#define GLX_DRAWABLE_TYPE ? +#define GLX_X_RENDERABLE ? +#define GLX_NONE 0x8000 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_COLOR_INDEX_TYPE ? +#define GLX_SCREEN ? +#define GLX_PBUFFER_CLOBBER_MASK ? +#define GLX_DAMAGED ? +#define GLX_SAVED ? +#define GLX_WINDOW ? +#define GLX_PBUFFER ? + + +/* + * GLX_EXT_visual_info extension + */ +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 + + /* * GLX_visual_info extension */ @@ -143,6 +200,12 @@ extern "C" { typedef void * GLXContext; typedef XID GLXPixmap; typedef XID GLXDrawable; + /* GLX 1.3 and later */ + typedef XID GLXFBConfigID; + typedef XID GLXPfuffer; + typedef XID GLXWindow; + typedef XID GLXPbuffer; + typedef XID GLXFBConfig; #endif typedef XID GLXContextID; @@ -199,10 +262,56 @@ extern const char *glXGetClientString( Display *dpy, int name ); /* GLX 1.2 and later */ - extern Display *glXGetCurrentDisplay( void ); +/* GLX 1.3 and later */ +extern GLXFBConfig glXChooseFBConfig( Display *dpy, int screen, + const int *attribList, int *nitems ); + +extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, + int attribute, int *value ); + +extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, + GLXFBConfig config ); + +extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config, + Window win, const int *attribList ); + +extern void glXDestroyWindow( Display *dpy, GLXWindow window ); + +extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config, + Pixmap pixmap, const int *attribList ); + +extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ); + +extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config, + const int *attribList ); + +extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); + +extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, + unsigned int *value ); + +extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config, + int renderType, GLXContext shareList, + Bool direct ); + +extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw, + GLXDrawable read, GLXContext ctx ); + +extern GLXDrawable glXGetCurrentReadDrawable( void ); + +extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute, + int *value ); + +extern void glXSelectEvent( Display *dpy, GLXDrawable drawable, + unsigned long mask ); + +extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, + unsigned long *mask ); + + /* GLX_MESA_pixmap_colormap */ extern GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, -- 2.30.2