1706f2543Smrg#ifndef _GLX_context_h_ 2706f2543Smrg#define _GLX_context_h_ 3706f2543Smrg 4706f2543Smrg/* 5706f2543Smrg * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) 6706f2543Smrg * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. 7706f2543Smrg * 8706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining a 9706f2543Smrg * copy of this software and associated documentation files (the "Software"), 10706f2543Smrg * to deal in the Software without restriction, including without limitation 11706f2543Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12706f2543Smrg * and/or sell copies of the Software, and to permit persons to whom the 13706f2543Smrg * Software is furnished to do so, subject to the following conditions: 14706f2543Smrg * 15706f2543Smrg * The above copyright notice including the dates of first publication and 16706f2543Smrg * either this permission notice or a reference to 17706f2543Smrg * http://oss.sgi.com/projects/FreeB/ 18706f2543Smrg * shall be included in all copies or substantial portions of the Software. 19706f2543Smrg * 20706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21706f2543Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22706f2543Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23706f2543Smrg * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24706f2543Smrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 25706f2543Smrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26706f2543Smrg * SOFTWARE. 27706f2543Smrg * 28706f2543Smrg * Except as contained in this notice, the name of Silicon Graphics, Inc. 29706f2543Smrg * shall not be used in advertising or otherwise to promote the sale, use or 30706f2543Smrg * other dealings in this Software without prior written authorization from 31706f2543Smrg * Silicon Graphics, Inc. 32706f2543Smrg */ 33706f2543Smrg 34706f2543Smrgtypedef struct __GLXcontextRec __GLXcontext; 35706f2543Smrg 36706f2543Smrg#include "GL/internal/glcore.h" 37706f2543Smrg 38706f2543Smrgstruct __GLXcontextRec { 39706f2543Smrg /* 40706f2543Smrg ** list of context structs 41706f2543Smrg */ 42706f2543Smrg struct __GLXcontextRec *last; 43706f2543Smrg struct __GLXcontextRec *next; 44706f2543Smrg 45706f2543Smrg /* 46706f2543Smrg ** Pointer to screen info data for this context. This is set 47706f2543Smrg ** when the context is created. 48706f2543Smrg */ 49706f2543Smrg ScreenPtr pScreen; 50706f2543Smrg __GLXscreenInfo *pGlxScreen; 51706f2543Smrg 52706f2543Smrg /* 53706f2543Smrg ** This context is created with respect to this visual. 54706f2543Smrg */ 55706f2543Smrg VisualRec *pVisual; 56706f2543Smrg __GLXvisualConfig *pGlxVisual; 57706f2543Smrg __GLXFBConfig *pFBConfig; 58706f2543Smrg 59706f2543Smrg /* 60706f2543Smrg ** The XID of this context. 61706f2543Smrg */ 62706f2543Smrg XID id; 63706f2543Smrg XID *real_ids; 64706f2543Smrg 65706f2543Smrg /* 66706f2543Smrg ** The XID of the shareList context. 67706f2543Smrg */ 68706f2543Smrg XID share_id; 69706f2543Smrg 70706f2543Smrg /* 71706f2543Smrg ** Visual id. 72706f2543Smrg */ 73706f2543Smrg VisualID vid; 74706f2543Smrg VisualID *real_vids; 75706f2543Smrg 76706f2543Smrg /* 77706f2543Smrg ** screen number. 78706f2543Smrg */ 79706f2543Smrg GLint screen; 80706f2543Smrg 81706f2543Smrg /* 82706f2543Smrg ** Whether this context's ID still exists. 83706f2543Smrg */ 84706f2543Smrg GLboolean idExists; 85706f2543Smrg 86706f2543Smrg /* 87706f2543Smrg ** Whether this context is current for some client. 88706f2543Smrg */ 89706f2543Smrg GLboolean isCurrent; 90706f2543Smrg 91706f2543Smrg /* 92706f2543Smrg ** Buffers for feedback and selection. 93706f2543Smrg */ 94706f2543Smrg GLfloat *feedbackBuf; 95706f2543Smrg GLint feedbackBufSize; /* number of elements allocated */ 96706f2543Smrg GLuint *selectBuf; 97706f2543Smrg GLint selectBufSize; /* number of elements allocated */ 98706f2543Smrg 99706f2543Smrg /* 100706f2543Smrg ** Set only if current drawable is a glx pixmap. 101706f2543Smrg */ 102706f2543Smrg __GLXpixmap *pGlxPixmap; 103706f2543Smrg __GLXpixmap *pGlxReadPixmap; 104706f2543Smrg __glXWindow *pGlxWindow; 105706f2543Smrg __glXWindow *pGlxReadWindow; 106706f2543Smrg __glXPbuffer *pGlxPbuffer; 107706f2543Smrg __glXPbuffer *pGlxReadPbuffer; 108706f2543Smrg 109706f2543Smrg}; 110706f2543Smrg 111706f2543Smrg#endif /* !__GLX_context_h__ */ 112