* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
* Copyright (C) 1991-2000 Silicon Graphics, Inc. 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 including the dates of first publication and
* either this permission notice or a reference to
* http://oss.sgi.com/projects/FreeB/
* 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
* SILICON GRAPHICS, INC. 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
* Except as contained in this notice, the name of Silicon Graphics, Inc.
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization from
/*****************************************************************************/
#define GLXBadContextState 1
#define GLXBadContextTag 4
#define GLXBadCurrentWindow 5
#define GLXBadRenderRequest 6
#define GLXBadLargeRequest 7
#define GLXUnsupportedPrivateRequest 8
#define GLXBadCurrentDrawable 11
#define GLXBadProfileARB 13
#define __GLX_NUMBER_ERRORS 14
** __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
#define GLX_EXTENSION_NAME "GLX"
#define GLX_EXTENSION_ALIAS "SGI-GLX"
#define __GLX_MAX_CONTEXT_PROPS 3
#define GLX_EXTENSIONS 0x3
/*****************************************************************************/
** For the structure definitions in this file, we must redefine these types in
** terms of Xmd.h types, which may include bitfields. All of these are
** undef'ed at the end of this file, restoring the definitions in glx.h.
#define GLXContextID CARD32
#define GLXDrawable CARD32
#define GLXPbuffer CARD32
#define GLXFBConfigID CARD32
#define GLXFBConfigIDSGIX CARD32
#define GLXPbufferSGIX CARD32
** ContextTag is not exposed to the API.
typedef CARD32 GLXContextTag;
/*****************************************************************************/
** Sizes of basic wire types.
#define __GLX_SIZE_INT8 1
#define __GLX_SIZE_INT16 2
#define __GLX_SIZE_INT32 4
#define __GLX_SIZE_CARD8 1
#define __GLX_SIZE_CARD16 2
#define __GLX_SIZE_CARD32 4
#define __GLX_SIZE_FLOAT32 4
#define __GLX_SIZE_FLOAT64 8
/*****************************************************************************/
** Render command request. A bunch of rendering commands are packed into
** a single X extension request.
typedef struct GLXRender {
GLXContextTag contextTag;
#define sz_xGLXRenderReq 8
** The maximum size that a GLXRender command can be. The value must fit
** in 16 bits and should be a multiple of 4.
#define __GLX_MAX_RENDER_CMD_SIZE 64000
** Large render command request. A single large rendering command
** is output in multiple X extension requests. The first packet
** contains an opcode dependent header (see below) that describes
** the data that follows.
typedef struct GLXRenderLarge {
GLXContextTag contextTag;
#define sz_xGLXRenderLargeReq 16
** GLX single request. Commands that go over as single GLX protocol
** requests use this structure. The glxCode will be one of the X_GLsop
typedef struct GLXSingle {
GLXContextTag contextTag;
#define sz_xGLXSingleReq 8
** glXQueryVersion request
typedef struct GLXQueryVersion {
#define sz_xGLXQueryVersionReq 12
typedef struct GLXIsDirect {
#define sz_xGLXIsDirectReq 8
** glXCreateContext request
typedef struct GLXCreateContext {
#define sz_xGLXCreateContextReq 24
** glXDestroyContext request
typedef struct GLXDestroyContext {
#define sz_xGLXDestroyContextReq 8
** glXMakeCurrent request
typedef struct GLXMakeCurrent {
GLXContextTag oldContextTag;
#define sz_xGLXMakeCurrentReq 16
typedef struct GLXWaitGL {
GLXContextTag contextTag;
#define sz_xGLXWaitGLReq 8
typedef struct GLXWaitX {
GLXContextTag contextTag;
#define sz_xGLXWaitXReq 8
** glXCopyContext request
typedef struct GLXCopyContext {
GLXContextTag contextTag;
#define sz_xGLXCopyContextReq 20
** glXSwapBuffers request
typedef struct GLXSwapBuffers {
GLXContextTag contextTag;
#define sz_xGLXSwapBuffersReq 12
typedef struct GLXUseXFont {
GLXContextTag contextTag;
#define sz_xGLXUseXFontReq 24
** glXCreateGLXPixmap request
typedef struct GLXCreateGLXPixmap {
} xGLXCreateGLXPixmapReq;
#define sz_xGLXCreateGLXPixmapReq 20
** glXDestroyGLXPixmap request
typedef struct GLXDestroyGLXPixmap {
} xGLXDestroyGLXPixmapReq;
#define sz_xGLXDestroyGLXPixmapReq 8
** glXGetVisualConfigs request
typedef struct GLXGetVisualConfigs {
} xGLXGetVisualConfigsReq;
#define sz_xGLXGetVisualConfigsReq 8
** glXVendorPrivate request.
typedef struct GLXVendorPrivate {
CARD32 vendorCode; /* vendor-specific opcode */
GLXContextTag contextTag;
** More data may follow; this is just the header.
#define sz_xGLXVendorPrivateReq 12
** glXVendorPrivateWithReply request
typedef struct GLXVendorPrivateWithReply {
CARD32 vendorCode; /* vendor-specific opcode */
GLXContextTag contextTag;
** More data may follow; this is just the header.
} xGLXVendorPrivateWithReplyReq;
#define sz_xGLXVendorPrivateWithReplyReq 12
** glXQueryExtensionsString request
typedef struct GLXQueryExtensionsString {
} xGLXQueryExtensionsStringReq;
#define sz_xGLXQueryExtensionsStringReq 8
** glXQueryServerString request
typedef struct GLXQueryServerString {
} xGLXQueryServerStringReq;
#define sz_xGLXQueryServerStringReq 12
typedef struct GLXClientInfo {
#define sz_xGLXClientInfoReq 16
/*** Start of GLX 1.3 requests */
** glXGetFBConfigs request
typedef struct GLXGetFBConfigs {
#define sz_xGLXGetFBConfigsReq 8
** glXCreatePixmap request
typedef struct GLXCreatePixmap {
/* followed by attribute list */
#define sz_xGLXCreatePixmapReq 24
** glXDestroyPixmap request
typedef struct GLXDestroyPixmap {
#define sz_xGLXDestroyPixmapReq 8
** glXCreateNewContext request
typedef struct GLXCreateNewContext {
} xGLXCreateNewContextReq;
#define sz_xGLXCreateNewContextReq 28
** glXQueryContext request
typedef struct GLXQueryContext {
#define sz_xGLXQueryContextReq 8
** glXMakeContextCurrent request
typedef struct GLXMakeContextCurrent {
GLXContextTag oldContextTag;
GLXDrawable readdrawable;
} xGLXMakeContextCurrentReq;
#define sz_xGLXMakeContextCurrentReq 20
** glXCreatePbuffer request
typedef struct GLXCreatePbuffer {
/* followed by attribute list */
#define sz_xGLXCreatePbufferReq 20
** glXDestroyPbuffer request