Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/glx/glxconfig.h
4558 views
1
/*
2
* (C) Copyright IBM Corporation 2003
3
* All Rights Reserved.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a
6
* copy of this software and associated documentation files (the "Software"),
7
* to deal in the Software without restriction, including without limitation
8
* on the rights to use, copy, modify, merge, publish, distribute, sub
9
* license, and/or sell copies of the Software, and to permit persons to whom
10
* the Software is furnished to do so, subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice (including the next
13
* paragraph) shall be included in all copies or substantial portions of the
14
* Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
19
* VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
20
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
22
* USE OR OTHER DEALINGS IN THE SOFTWARE.
23
*/
24
25
/**
26
* \file glcontextmodes.h
27
* \author Ian Romanick <[email protected]>
28
*/
29
30
#ifndef GLCONTEXTMODES_H
31
#define GLCONTEXTMODES_H
32
33
struct glx_config {
34
struct glx_config * next;
35
36
GLuint doubleBufferMode;
37
GLuint stereoMode;
38
39
GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
40
GLuint redMask, greenMask, blueMask, alphaMask;
41
GLuint redShift, greenShift, blueShift, alphaShift;
42
GLint rgbBits; /* total bits for rgb */
43
GLint indexBits; /* total bits for colorindex */
44
45
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
46
GLint depthBits;
47
GLint stencilBits;
48
49
GLint numAuxBuffers;
50
51
GLint level;
52
53
/* GLX */
54
GLint visualID;
55
GLint visualType; /**< One of the GLX X visual types. (i.e.,
56
* \c GLX_TRUE_COLOR, etc.)
57
*/
58
59
/* EXT_visual_rating / GLX 1.2 */
60
GLint visualRating;
61
62
/* EXT_visual_info / GLX 1.2 */
63
GLint transparentPixel;
64
/* colors are floats scaled to ints */
65
GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
66
GLint transparentIndex;
67
68
/* ARB_multisample / SGIS_multisample */
69
GLint sampleBuffers;
70
GLint samples;
71
72
/* SGIX_fbconfig / GLX 1.3 */
73
GLint drawableType;
74
GLint renderType;
75
GLint xRenderable;
76
GLint fbconfigID;
77
78
/* SGIX_pbuffer / GLX 1.3 */
79
GLint maxPbufferWidth;
80
GLint maxPbufferHeight;
81
GLint maxPbufferPixels;
82
GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
83
GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
84
85
/* SGIX_visual_select_group */
86
GLint visualSelectGroup;
87
88
/* OML_swap_method */
89
GLint swapMethod;
90
91
GLint screen;
92
93
/* EXT_texture_from_pixmap */
94
GLint bindToTextureRgb;
95
GLint bindToTextureRgba;
96
GLint bindToMipmapTexture;
97
GLint bindToTextureTargets;
98
GLint yInverted;
99
100
/* EXT_framebuffer_sRGB */
101
GLint sRGBCapable;
102
};
103
104
extern GLint _gl_convert_from_x_visual_type(int visualType);
105
106
extern int
107
glx_config_get(struct glx_config * mode, int attribute, int *value_return);
108
extern struct glx_config *
109
glx_config_create_list(unsigned count);
110
extern void
111
glx_config_destroy_list(struct glx_config *configs);
112
extern struct glx_config *
113
glx_config_find_visual(struct glx_config *configs, int vid);
114
extern struct glx_config *
115
glx_config_find_fbconfig(struct glx_config *configs, int fbid);
116
117
#endif /* GLCONTEXTMODES_H */
118
119
120