From fde2b9750ea9f37b018aaa26c9bbb6454cd1c016 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 6 Dec 2003 17:17:42 +0000 Subject: basic API work for FBConfigs & Pbuffers --- include/GL/miniglx.h | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/GL/miniglx.h b/include/GL/miniglx.h index 7720d3536d0..4416e587d67 100644 --- a/include/GL/miniglx.h +++ b/include/GL/miniglx.h @@ -1,4 +1,4 @@ -/* $Id: miniglx.h,v 1.1 2003/08/23 01:25:30 jonsmirl Exp $ */ +/* $Id: miniglx.h,v 1.2 2003/12/06 17:17:42 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -91,6 +91,15 @@ typedef struct MiniGLXXVisualInfoRec { int bits_per_rgb; /**< \brief total bits per pixel */ } XVisualInfo; +/** + * \brief GLX Frame Buffer Configuration (for pbuffers) + * \sa \ref datatypes. + */ +typedef struct MiniGLXFBConfigRec { + XVisualInfo *visInfo; +} GLXFBConfig; + + /** * \brief Display handle. * @@ -132,6 +141,17 @@ typedef struct MiniGLXWindowRec *Drawable; */ typedef struct MiniGLXWindowRec *GLXDrawable; +/** + * \brief GLX pbuffer. + * + * Alias for the private ::MiniGLXWindowRec structure. + * + * Same as #Drawable. + * + * \sa \ref datatypes. + */ +typedef struct MiniGLXWindowRec *GLXPbuffer; + /** * \brief GLX context. * @@ -282,6 +302,8 @@ typedef union _XEvent { /*@{*/ /** \brief Defined if version 1.0 of Mini GLX is supported. */ #define MINI_GLX_VERSION_1_0 1 +/** \brief Defined if version 1.1 of Mini GLX is supported. */ +#define MINI_GLX_VERSION_1_1 1 /*@}*/ @@ -355,7 +377,8 @@ extern void XFree( void *data ); extern XVisualInfo * -XGetVisualInfo( Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return ); +XGetVisualInfo( Display *display, long vinfo_mask, + XVisualInfo *vinfo_template, int *nitems_return ); /*@}*/ @@ -394,6 +417,21 @@ glXGetProcAddress( const GLubyte *procname ); extern Bool glXQueryVersion( Display *dpy, int *major, int *minor ); + +/* Added in MiniGLX 1.1 */ +extern GLXPbuffer +glXCreatePbuffer( Display *dpy, GLXFBConfig config, const int *attribList ); + +extern void +glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); + +extern GLXFBConfig * +glXChooseFBConfig( Display *dpy, int screen, const int *attribList, + int *nitems ); + +extern XVisualInfo * +glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ); + /*@}*/ -- cgit v1.2.3