45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _GLX_context_h_
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _GLX_context_h_
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission is hereby granted, free of charge, to any person obtaining a
45e9809aff7304721fddb95654901b32195c9c7avboxsync * copy of this software and associated documentation files (the "Software"),
45e9809aff7304721fddb95654901b32195c9c7avboxsync * to deal in the Software without restriction, including without limitation
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * and/or sell copies of the Software, and to permit persons to whom the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Software is furnished to do so, subject to the following conditions:
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * The above copyright notice including the dates of first publication and
45e9809aff7304721fddb95654901b32195c9c7avboxsync * either this permission notice or a reference to
45e9809aff7304721fddb95654901b32195c9c7avboxsync * http://oss.sgi.com/projects/FreeB/
45e9809aff7304721fddb95654901b32195c9c7avboxsync * shall be included in all copies or substantial portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Except as contained in this notice, the name of Silicon Graphics, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * shall not be used in advertising or otherwise to promote the sale, use or
45e9809aff7304721fddb95654901b32195c9c7avboxsync * other dealings in this Software without prior written authorization from
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Silicon Graphics, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct __GLXcontextRec __GLXcontext;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "GL/internal/glcore.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncstruct __GLXcontextRec {
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** list of context structs
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync struct __GLXcontextRec *last;
45e9809aff7304721fddb95654901b32195c9c7avboxsync struct __GLXcontextRec *next;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** Pointer to screen info data for this context. This is set
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** when the context is created.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync ScreenPtr pScreen;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLXscreenInfo *pGlxScreen;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** This context is created with respect to this visual.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync VisualRec *pVisual;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLXvisualConfig *pGlxVisual;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLXFBConfig *pFBConfig;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** The XID of this context.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID *real_ids;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** The XID of the shareList context.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID share_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** Visual id.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync VisualID vid;
45e9809aff7304721fddb95654901b32195c9c7avboxsync VisualID *real_vids;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** screen number.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLint screen;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** Whether this context's ID still exists.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLboolean idExists;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** Whether this context is current for some client.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLboolean isCurrent;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** Buffers for feedback and selection.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLfloat *feedbackBuf;
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLint feedbackBufSize; /* number of elements allocated */
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLuint *selectBuf;
45e9809aff7304721fddb95654901b32195c9c7avboxsync GLint selectBufSize; /* number of elements allocated */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /*
45e9809aff7304721fddb95654901b32195c9c7avboxsync ** Set only if current drawable is a glx pixmap.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLXpixmap *pGlxPixmap;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLXpixmap *pGlxReadPixmap;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXWindow *pGlxWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXWindow *pGlxReadWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXPbuffer *pGlxPbuffer;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __glXPbuffer *pGlxReadPbuffer;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync};
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* !__GLX_context_h__ */