100 #if defined(Q_WS_X11) && !defined(QT_OPENGL_ES) 103 if (
X11->visual == 0 &&
X11->visual_id == -1 &&
X11->visual_class == -1) {
108 spec[i++] = GLX_RGBA;
109 spec[i++] = GLX_DOUBLEBUFFER;
112 spec[i++] = GLX_DEPTH_SIZE;
114 spec[i++] = GLX_STENCIL_SIZE;
124 XVisualInfo *vi = glXChooseVisual(
X11->display,
X11->defaultScreen, spec);
126 X11->visual_id = vi->visualid;
127 X11->visual_class = vi->c_class;
131 glXGetConfig(
X11->display, vi, GLX_LEVEL, &res);
133 glXGetConfig(
X11->display, vi, GLX_DOUBLEBUFFER, &res);
135 glXGetConfig(
X11->display, vi, GLX_DEPTH_SIZE, &res);
139 glXGetConfig(
X11->display, vi, GLX_RGBA, &res);
141 glXGetConfig(
X11->display, vi, GLX_RED_SIZE, &res);
143 glXGetConfig(
X11->display, vi, GLX_GREEN_SIZE, &res);
145 glXGetConfig(
X11->display, vi, GLX_BLUE_SIZE, &res);
147 glXGetConfig(
X11->display, vi, GLX_ALPHA_SIZE, &res);
151 glXGetConfig(
X11->display, vi, GLX_ACCUM_RED_SIZE, &res);
155 glXGetConfig(
X11->display, vi, GLX_STENCIL_SIZE, &res);
159 glXGetConfig(
X11->display, vi, GLX_STEREO, &res);
171 printf(
"using visual class %x, id %x\n",
X11->visual_class,
X11->visual_id);
174 #elif defined(Q_WS_WIN) Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_GUI_EXPORT bool qt_win_owndc_required
#define GLX_SAMPLE_BUFFERS_ARB
static QGLFormat surfaceFormat
static bool isNull(const QVariant::Private *d)