1706f2543Smrg#ifdef HAVE_DIX_CONFIG_H 2706f2543Smrg#include <dix-config.h> 3706f2543Smrg#endif 4706f2543Smrg 5706f2543Smrg#ifndef _GLX_screens_h_ 6706f2543Smrg#define _GLX_screens_h_ 7706f2543Smrg 8706f2543Smrg/* 9706f2543Smrg * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) 10706f2543Smrg * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. 11706f2543Smrg * 12706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining a 13706f2543Smrg * copy of this software and associated documentation files (the "Software"), 14706f2543Smrg * to deal in the Software without restriction, including without limitation 15706f2543Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 16706f2543Smrg * and/or sell copies of the Software, and to permit persons to whom the 17706f2543Smrg * Software is furnished to do so, subject to the following conditions: 18706f2543Smrg * 19706f2543Smrg * The above copyright notice including the dates of first publication and 20706f2543Smrg * either this permission notice or a reference to 21706f2543Smrg * http://oss.sgi.com/projects/FreeB/ 22706f2543Smrg * shall be included in all copies or substantial portions of the Software. 23706f2543Smrg * 24706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 25706f2543Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26706f2543Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 27706f2543Smrg * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 28706f2543Smrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 29706f2543Smrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30706f2543Smrg * SOFTWARE. 31706f2543Smrg * 32706f2543Smrg * Except as contained in this notice, the name of Silicon Graphics, Inc. 33706f2543Smrg * shall not be used in advertising or otherwise to promote the sale, use or 34706f2543Smrg * other dealings in this Software without prior written authorization from 35706f2543Smrg * Silicon Graphics, Inc. 36706f2543Smrg */ 37706f2543Smrg 38706f2543Smrgtypedef struct __GLXconfig __GLXconfig; 39706f2543Smrgstruct __GLXconfig { 40706f2543Smrg __GLXconfig *next; 41706f2543Smrg GLuint doubleBufferMode; 42706f2543Smrg GLuint stereoMode; 43706f2543Smrg 44706f2543Smrg GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ 45706f2543Smrg GLuint redMask, greenMask, blueMask, alphaMask; 46706f2543Smrg GLint rgbBits; /* total bits for rgb */ 47706f2543Smrg GLint indexBits; /* total bits for colorindex */ 48706f2543Smrg 49706f2543Smrg GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; 50706f2543Smrg GLint depthBits; 51706f2543Smrg GLint stencilBits; 52706f2543Smrg 53706f2543Smrg GLint numAuxBuffers; 54706f2543Smrg 55706f2543Smrg GLint level; 56706f2543Smrg 57706f2543Smrg GLint pixmapMode; 58706f2543Smrg 59706f2543Smrg /* GLX */ 60706f2543Smrg GLint visualID; 61706f2543Smrg GLint visualType; /**< One of the GLX X visual types. (i.e., 62706f2543Smrg * \c GLX_TRUE_COLOR, etc.) 63706f2543Smrg */ 64706f2543Smrg 65706f2543Smrg /* EXT_visual_rating / GLX 1.2 */ 66706f2543Smrg GLint visualRating; 67706f2543Smrg 68706f2543Smrg /* EXT_visual_info / GLX 1.2 */ 69706f2543Smrg GLint transparentPixel; 70706f2543Smrg /* colors are floats scaled to ints */ 71706f2543Smrg GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; 72706f2543Smrg GLint transparentIndex; 73706f2543Smrg 74706f2543Smrg /* ARB_multisample / SGIS_multisample */ 75706f2543Smrg GLint sampleBuffers; 76706f2543Smrg GLint samples; 77706f2543Smrg 78706f2543Smrg /* SGIX_fbconfig / GLX 1.3 */ 79706f2543Smrg GLint drawableType; 80706f2543Smrg GLint renderType; 81706f2543Smrg GLint xRenderable; 82706f2543Smrg GLint fbconfigID; 83706f2543Smrg 84706f2543Smrg /* SGIX_pbuffer / GLX 1.3 */ 85706f2543Smrg GLint maxPbufferWidth; 86706f2543Smrg GLint maxPbufferHeight; 87706f2543Smrg GLint maxPbufferPixels; 88706f2543Smrg GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ 89706f2543Smrg GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ 90706f2543Smrg 91706f2543Smrg /* SGIX_visual_select_group */ 92706f2543Smrg GLint visualSelectGroup; 93706f2543Smrg 94706f2543Smrg /* OML_swap_method */ 95706f2543Smrg GLint swapMethod; 96706f2543Smrg 97706f2543Smrg GLint screen; 98706f2543Smrg 99706f2543Smrg /* EXT_texture_from_pixmap */ 100706f2543Smrg GLint bindToTextureRgb; 101706f2543Smrg GLint bindToTextureRgba; 102706f2543Smrg GLint bindToMipmapTexture; 103706f2543Smrg GLint bindToTextureTargets; 104706f2543Smrg GLint yInverted; 105706f2543Smrg}; 106706f2543Smrg 107706f2543SmrgGLint glxConvertToXVisualType(int visualType); 108706f2543Smrg 109706f2543Smrg/* 110706f2543Smrg** Screen dependent data. These methods are the interface between the DIX 111706f2543Smrg** and DDX layers of the GLX server extension. The methods provide an 112706f2543Smrg** interface for context management on a screen. 113706f2543Smrg*/ 114706f2543Smrgtypedef struct __GLXscreen __GLXscreen; 115706f2543Smrgstruct __GLXscreen { 116706f2543Smrg void (*destroy) (__GLXscreen *screen); 117706f2543Smrg 118706f2543Smrg __GLXcontext *(*createContext) (__GLXscreen *screen, 119706f2543Smrg __GLXconfig *modes, 120706f2543Smrg __GLXcontext *shareContext); 121706f2543Smrg 122706f2543Smrg __GLXdrawable *(*createDrawable)(ClientPtr client, 123706f2543Smrg __GLXscreen *context, 124706f2543Smrg DrawablePtr pDraw, 125706f2543Smrg XID drawId, 126706f2543Smrg int type, 127706f2543Smrg XID glxDrawId, 128706f2543Smrg __GLXconfig *modes); 129706f2543Smrg int (*swapInterval) (__GLXdrawable *drawable, 130706f2543Smrg int interval); 131706f2543Smrg 132706f2543Smrg ScreenPtr pScreen; 133706f2543Smrg 134706f2543Smrg /* Linked list of valid fbconfigs for this screen. */ 135706f2543Smrg __GLXconfig *fbconfigs; 136706f2543Smrg int numFBConfigs; 137706f2543Smrg 138706f2543Smrg /* Subset of fbconfigs that are exposed as GLX visuals. */ 139706f2543Smrg __GLXconfig **visuals; 140706f2543Smrg GLint numVisuals; 141706f2543Smrg 142706f2543Smrg char *GLextensions; 143706f2543Smrg 144706f2543Smrg char *GLXvendor; 145706f2543Smrg char *GLXextensions; 146706f2543Smrg 147706f2543Smrg /** 148706f2543Smrg * \name GLX version supported by this screen. 149706f2543Smrg * 150706f2543Smrg * Since the GLX version advertised by the server is for the whole server, 151706f2543Smrg * the GLX protocol code uses the minimum version supported on all screens. 152706f2543Smrg */ 153706f2543Smrg /*@{*/ 154706f2543Smrg unsigned GLXmajor; 155706f2543Smrg unsigned GLXminor; 156706f2543Smrg /*@}*/ 157706f2543Smrg 158706f2543Smrg Bool (*CloseScreen)(int index, ScreenPtr pScreen); 159706f2543Smrg}; 160706f2543Smrg 161706f2543Smrg 162706f2543Smrgvoid __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen); 163706f2543Smrgvoid __glXScreenDestroy(__GLXscreen *screen); 164706f2543Smrg 165706f2543Smrg#endif /* !__GLX_screens_h__ */ 166