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