glxscreens.h revision 4642e01f
14642e01fSmrg#ifdef HAVE_DIX_CONFIG_H 24642e01fSmrg#include <dix-config.h> 34642e01fSmrg#endif 44642e01fSmrg 54642e01fSmrg#ifndef _GLX_screens_h_ 64642e01fSmrg#define _GLX_screens_h_ 74642e01fSmrg 84642e01fSmrg/* 94642e01fSmrg * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) 104642e01fSmrg * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. 114642e01fSmrg * 124642e01fSmrg * Permission is hereby granted, free of charge, to any person obtaining a 134642e01fSmrg * copy of this software and associated documentation files (the "Software"), 144642e01fSmrg * to deal in the Software without restriction, including without limitation 154642e01fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 164642e01fSmrg * and/or sell copies of the Software, and to permit persons to whom the 174642e01fSmrg * Software is furnished to do so, subject to the following conditions: 184642e01fSmrg * 194642e01fSmrg * The above copyright notice including the dates of first publication and 204642e01fSmrg * either this permission notice or a reference to 214642e01fSmrg * http://oss.sgi.com/projects/FreeB/ 224642e01fSmrg * shall be included in all copies or substantial portions of the Software. 234642e01fSmrg * 244642e01fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 254642e01fSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 264642e01fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 274642e01fSmrg * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 284642e01fSmrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 294642e01fSmrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 304642e01fSmrg * SOFTWARE. 314642e01fSmrg * 324642e01fSmrg * Except as contained in this notice, the name of Silicon Graphics, Inc. 334642e01fSmrg * shall not be used in advertising or otherwise to promote the sale, use or 344642e01fSmrg * other dealings in this Software without prior written authorization from 354642e01fSmrg * Silicon Graphics, Inc. 364642e01fSmrg */ 374642e01fSmrg 384642e01fSmrgtypedef struct { 394642e01fSmrg void * (* queryHyperpipeNetworkFunc)(int, int *, int *); 404642e01fSmrg void * (* queryHyperpipeConfigFunc)(int, int, int *, int *); 414642e01fSmrg int (* destroyHyperpipeConfigFunc)(int, int); 424642e01fSmrg void * (* hyperpipeConfigFunc)(int, int, int *, int *, void *); 434642e01fSmrg} __GLXHyperpipeExtensionFuncs; 444642e01fSmrg 454642e01fSmrgtypedef struct { 464642e01fSmrg int (* bindSwapBarrierFunc)(int, XID, int); 474642e01fSmrg int (* queryMaxSwapBarriersFunc)(int); 484642e01fSmrg} __GLXSwapBarrierExtensionFuncs; 494642e01fSmrg 504642e01fSmrgvoid __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs); 514642e01fSmrgvoid __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs); 524642e01fSmrg 534642e01fSmrgtypedef struct __GLXconfig __GLXconfig; 544642e01fSmrgstruct __GLXconfig { 554642e01fSmrg __GLXconfig *next; 564642e01fSmrg GLuint doubleBufferMode; 574642e01fSmrg GLuint stereoMode; 584642e01fSmrg 594642e01fSmrg GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ 604642e01fSmrg GLuint redMask, greenMask, blueMask, alphaMask; 614642e01fSmrg GLint rgbBits; /* total bits for rgb */ 624642e01fSmrg GLint indexBits; /* total bits for colorindex */ 634642e01fSmrg 644642e01fSmrg GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; 654642e01fSmrg GLint depthBits; 664642e01fSmrg GLint stencilBits; 674642e01fSmrg 684642e01fSmrg GLint numAuxBuffers; 694642e01fSmrg 704642e01fSmrg GLint level; 714642e01fSmrg 724642e01fSmrg GLint pixmapMode; 734642e01fSmrg 744642e01fSmrg /* GLX */ 754642e01fSmrg GLint visualID; 764642e01fSmrg GLint visualType; /**< One of the GLX X visual types. (i.e., 774642e01fSmrg * \c GLX_TRUE_COLOR, etc.) 784642e01fSmrg */ 794642e01fSmrg 804642e01fSmrg /* EXT_visual_rating / GLX 1.2 */ 814642e01fSmrg GLint visualRating; 824642e01fSmrg 834642e01fSmrg /* EXT_visual_info / GLX 1.2 */ 844642e01fSmrg GLint transparentPixel; 854642e01fSmrg /* colors are floats scaled to ints */ 864642e01fSmrg GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; 874642e01fSmrg GLint transparentIndex; 884642e01fSmrg 894642e01fSmrg /* ARB_multisample / SGIS_multisample */ 904642e01fSmrg GLint sampleBuffers; 914642e01fSmrg GLint samples; 924642e01fSmrg 934642e01fSmrg /* SGIX_fbconfig / GLX 1.3 */ 944642e01fSmrg GLint drawableType; 954642e01fSmrg GLint renderType; 964642e01fSmrg GLint xRenderable; 974642e01fSmrg GLint fbconfigID; 984642e01fSmrg 994642e01fSmrg /* SGIX_pbuffer / GLX 1.3 */ 1004642e01fSmrg GLint maxPbufferWidth; 1014642e01fSmrg GLint maxPbufferHeight; 1024642e01fSmrg GLint maxPbufferPixels; 1034642e01fSmrg GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ 1044642e01fSmrg GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ 1054642e01fSmrg 1064642e01fSmrg /* SGIX_visual_select_group */ 1074642e01fSmrg GLint visualSelectGroup; 1084642e01fSmrg 1094642e01fSmrg /* OML_swap_method */ 1104642e01fSmrg GLint swapMethod; 1114642e01fSmrg 1124642e01fSmrg GLint screen; 1134642e01fSmrg 1144642e01fSmrg /* EXT_texture_from_pixmap */ 1154642e01fSmrg GLint bindToTextureRgb; 1164642e01fSmrg GLint bindToTextureRgba; 1174642e01fSmrg GLint bindToMipmapTexture; 1184642e01fSmrg GLint bindToTextureTargets; 1194642e01fSmrg GLint yInverted; 1204642e01fSmrg}; 1214642e01fSmrg 1224642e01fSmrgGLint glxConvertToXVisualType(int visualType); 1234642e01fSmrg 1244642e01fSmrg/* 1254642e01fSmrg** Screen dependent data. These methods are the interface between the DIX 1264642e01fSmrg** and DDX layers of the GLX server extension. The methods provide an 1274642e01fSmrg** interface for context management on a screen. 1284642e01fSmrg*/ 1294642e01fSmrgtypedef struct __GLXscreen __GLXscreen; 1304642e01fSmrgstruct __GLXscreen { 1314642e01fSmrg void (*destroy) (__GLXscreen *screen); 1324642e01fSmrg 1334642e01fSmrg __GLXcontext *(*createContext) (__GLXscreen *screen, 1344642e01fSmrg __GLXconfig *modes, 1354642e01fSmrg __GLXcontext *shareContext); 1364642e01fSmrg 1374642e01fSmrg __GLXdrawable *(*createDrawable)(__GLXscreen *context, 1384642e01fSmrg DrawablePtr pDraw, 1394642e01fSmrg int type, 1404642e01fSmrg XID drawId, 1414642e01fSmrg __GLXconfig *modes); 1424642e01fSmrg int (*swapInterval) (__GLXdrawable *drawable, 1434642e01fSmrg int interval); 1444642e01fSmrg 1454642e01fSmrg __GLXHyperpipeExtensionFuncs *hyperpipeFuncs; 1464642e01fSmrg __GLXSwapBarrierExtensionFuncs *swapBarrierFuncs; 1474642e01fSmrg 1484642e01fSmrg ScreenPtr pScreen; 1494642e01fSmrg 1504642e01fSmrg /* Linked list of valid fbconfigs for this screen. */ 1514642e01fSmrg __GLXconfig *fbconfigs; 1524642e01fSmrg int numFBConfigs; 1534642e01fSmrg 1544642e01fSmrg /* Subset of fbconfigs that are exposed as GLX visuals. */ 1554642e01fSmrg __GLXconfig **visuals; 1564642e01fSmrg GLint numVisuals; 1574642e01fSmrg 1584642e01fSmrg char *GLextensions; 1594642e01fSmrg 1604642e01fSmrg char *GLXvendor; 1614642e01fSmrg char *GLXversion; 1624642e01fSmrg char *GLXextensions; 1634642e01fSmrg 1644642e01fSmrg Bool (*CloseScreen)(int index, ScreenPtr pScreen); 1654642e01fSmrg}; 1664642e01fSmrg 1674642e01fSmrg 1684642e01fSmrgvoid __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen); 1694642e01fSmrgvoid __glXScreenDestroy(__GLXscreen *screen); 1704642e01fSmrg 1714642e01fSmrg#endif /* !__GLX_screens_h__ */ 172