Fix wrong use of the PFD_GENERIC_ACCELERATED flag. It indicates that
[wine/multimedia.git] / dlls / x11drv / opengl.c
blob7763c214441dbcb5bd8133760df10668ad7c1d27
1 /*
2 * X11DRV OpenGL functions
4 * Copyright 2000 Lionel Ulmer
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <stdlib.h>
25 #include <string.h>
27 #include "x11drv.h"
28 #include "wine/library.h"
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(opengl);
33 #if defined(HAVE_GL_GL_H) && defined(HAVE_GL_GLX_H)
35 #undef APIENTRY
36 #undef CALLBACK
37 #undef WINAPI
39 #ifdef HAVE_GL_GL_H
40 # include <GL/gl.h>
41 #endif
42 #ifdef HAVE_GL_GLX_H
43 # include <GL/glx.h>
44 #endif
45 #ifdef HAVE_GL_GLEXT_H
46 # include <GL/glext.h>
47 #endif
49 #undef APIENTRY
50 #undef CALLBACK
51 #undef WINAPI
53 /* Redefines the constants */
54 #define CALLBACK __stdcall
55 #define WINAPI __stdcall
56 #define APIENTRY WINAPI
59 static void dump_PIXELFORMATDESCRIPTOR(const PIXELFORMATDESCRIPTOR *ppfd) {
60 TRACE(" - size / version : %d / %d\n", ppfd->nSize, ppfd->nVersion);
61 TRACE(" - dwFlags : ");
62 #define TEST_AND_DUMP(t,tv) if ((t) & (tv)) TRACE(#tv " ")
63 TEST_AND_DUMP(ppfd->dwFlags, PFD_DEPTH_DONTCARE);
64 TEST_AND_DUMP(ppfd->dwFlags, PFD_DOUBLEBUFFER);
65 TEST_AND_DUMP(ppfd->dwFlags, PFD_DOUBLEBUFFER_DONTCARE);
66 TEST_AND_DUMP(ppfd->dwFlags, PFD_DRAW_TO_WINDOW);
67 TEST_AND_DUMP(ppfd->dwFlags, PFD_DRAW_TO_BITMAP);
68 TEST_AND_DUMP(ppfd->dwFlags, PFD_GENERIC_ACCELERATED);
69 TEST_AND_DUMP(ppfd->dwFlags, PFD_GENERIC_FORMAT);
70 TEST_AND_DUMP(ppfd->dwFlags, PFD_NEED_PALETTE);
71 TEST_AND_DUMP(ppfd->dwFlags, PFD_NEED_SYSTEM_PALETTE);
72 TEST_AND_DUMP(ppfd->dwFlags, PFD_STEREO);
73 TEST_AND_DUMP(ppfd->dwFlags, PFD_STEREO_DONTCARE);
74 TEST_AND_DUMP(ppfd->dwFlags, PFD_SUPPORT_GDI);
75 TEST_AND_DUMP(ppfd->dwFlags, PFD_SUPPORT_OPENGL);
76 TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_COPY);
77 TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_EXCHANGE);
78 TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_LAYER_BUFFERS);
79 #undef TEST_AND_DUMP
80 TRACE("\n");
82 TRACE(" - iPixelType : ");
83 switch (ppfd->iPixelType) {
84 case PFD_TYPE_RGBA: TRACE("PFD_TYPE_RGBA"); break;
85 case PFD_TYPE_COLORINDEX: TRACE("PFD_TYPE_COLORINDEX"); break;
87 TRACE("\n");
89 TRACE(" - Color : %d\n", ppfd->cColorBits);
90 TRACE(" - Red : %d\n", ppfd->cRedBits);
91 TRACE(" - Green : %d\n", ppfd->cGreenBits);
92 TRACE(" - Blue : %d\n", ppfd->cBlueBits);
93 TRACE(" - Alpha : %d\n", ppfd->cAlphaBits);
94 TRACE(" - Accum : %d\n", ppfd->cAccumBits);
95 TRACE(" - Depth : %d\n", ppfd->cDepthBits);
96 TRACE(" - Stencil : %d\n", ppfd->cStencilBits);
97 TRACE(" - Aux : %d\n", ppfd->cAuxBuffers);
99 TRACE(" - iLayerType : ");
100 switch (ppfd->iLayerType) {
101 case PFD_MAIN_PLANE: TRACE("PFD_MAIN_PLANE"); break;
102 case PFD_OVERLAY_PLANE: TRACE("PFD_OVERLAY_PLANE"); break;
103 case (BYTE)PFD_UNDERLAY_PLANE: TRACE("PFD_UNDERLAY_PLANE"); break;
105 TRACE("\n");
108 /* No need to load any other libraries as according to the ABI, libGL should be self-sufficient and
109 include all dependencies
111 #ifndef SONAME_LIBGL
112 #define SONAME_LIBGL "libGL.so"
113 #endif
115 #define MAKE_FUNCPTR(f) static typeof(f) * p##f;
116 MAKE_FUNCPTR(glGetError)
117 MAKE_FUNCPTR(glXChooseVisual)
118 MAKE_FUNCPTR(glXGetConfig)
119 MAKE_FUNCPTR(glXSwapBuffers)
120 MAKE_FUNCPTR(glXQueryExtension)
122 MAKE_FUNCPTR(glXGetFBConfigs)
123 MAKE_FUNCPTR(glXChooseFBConfig)
124 MAKE_FUNCPTR(glXGetFBConfigAttrib)
125 MAKE_FUNCPTR(glXCreateGLXPixmap)
126 MAKE_FUNCPTR(glXDestroyGLXPixmap)
127 #undef MAKE_FUNCPTR
129 static BOOL has_opengl(void)
131 static int init_done;
132 static void *opengl_handle;
134 int error_base, event_base;
136 if (init_done) return (opengl_handle != NULL);
137 init_done = 1;
139 opengl_handle = wine_dlopen(SONAME_LIBGL, RTLD_NOW|RTLD_GLOBAL, NULL, 0);
140 if (opengl_handle == NULL) return FALSE;
142 #define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(opengl_handle, #f, NULL, 0)) == NULL) goto sym_not_found;
143 LOAD_FUNCPTR(glGetError)
144 LOAD_FUNCPTR(glXChooseVisual)
145 LOAD_FUNCPTR(glXGetConfig)
146 LOAD_FUNCPTR(glXSwapBuffers)
147 LOAD_FUNCPTR(glXQueryExtension)
149 LOAD_FUNCPTR(glXGetFBConfigs)
150 LOAD_FUNCPTR(glXChooseFBConfig)
151 LOAD_FUNCPTR(glXGetFBConfigAttrib)
152 LOAD_FUNCPTR(glXCreateGLXPixmap)
153 LOAD_FUNCPTR(glXDestroyGLXPixmap)
154 #undef LOAD_FUNCPTR
156 wine_tsx11_lock();
157 if (pglXQueryExtension(gdi_display, &event_base, &error_base) == True) {
158 TRACE("GLX is up and running error_base = %d\n", error_base);
159 } else {
160 wine_dlclose(opengl_handle, NULL, 0);
161 opengl_handle = NULL;
163 wine_tsx11_unlock();
164 return (opengl_handle != NULL);
166 sym_not_found:
167 wine_dlclose(opengl_handle, NULL, 0);
168 opengl_handle = NULL;
169 return FALSE;
172 #define TEST_AND_ADD1(t,a) if (t) att_list[att_pos++] = (a)
173 #define TEST_AND_ADD2(t,a,b) if (t) { att_list[att_pos++] = (a); att_list[att_pos++] = (b); }
174 #define NULL_TEST_AND_ADD2(tv,a,b) att_list[att_pos++] = (a); att_list[att_pos++] = ((tv) == 0 ? 0 : (b))
175 #define ADD2(a,b) att_list[att_pos++] = (a); att_list[att_pos++] = (b)
178 * X11DRV_ChoosePixelFormat
180 * Equivalent of glXChooseVisual
182 int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
183 const PIXELFORMATDESCRIPTOR *ppfd) {
184 int att_list[64];
185 int att_pos = 0;
186 GLXFBConfig* cfgs = NULL;
187 int ret = 0;
189 if (!has_opengl()) {
190 ERR("No libGL on this box - disabling OpenGL support !\n");
191 return 0;
194 if (TRACE_ON(opengl)) {
195 TRACE("(%p,%p)\n", physDev, ppfd);
197 dump_PIXELFORMATDESCRIPTOR((const PIXELFORMATDESCRIPTOR *) ppfd);
200 if (ppfd->dwFlags & PFD_DRAW_TO_BITMAP) {
201 ERR("Flag not supported !\n");
202 /* Should SetError here... */
203 return 0;
206 /* Now, build the request to GLX */
207 TEST_AND_ADD2(ppfd->dwFlags & PFD_DOUBLEBUFFER, GLX_DOUBLEBUFFER, TRUE);
208 TEST_AND_ADD1(ppfd->dwFlags & PFD_STEREO, GLX_STEREO);
210 if (ppfd->iPixelType == PFD_TYPE_COLORINDEX) {
211 ADD2(GLX_BUFFER_SIZE, ppfd->cColorBits);
213 if (ppfd->iPixelType == PFD_TYPE_RGBA) {
214 ADD2(GLX_RENDER_TYPE, GLX_RGBA_BIT);
215 if (32 == ppfd->cDepthBits) {
217 * for 32 bpp depth buffers force to use 24.
218 * needed as some drivers don't support 32bpp
220 TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, 24);
221 } else {
222 TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, ppfd->cDepthBits);
224 if (32 == ppfd->cColorBits) {
225 ADD2(GLX_RED_SIZE, 8);
226 ADD2(GLX_GREEN_SIZE, 8);
227 ADD2(GLX_BLUE_SIZE, 8);
228 ADD2(GLX_ALPHA_SIZE, 8);
229 } else {
230 ADD2(GLX_BUFFER_SIZE, ppfd->cColorBits);
231 TEST_AND_ADD2(ppfd->cAlphaBits, GLX_ALPHA_SIZE, ppfd->cAlphaBits);
234 TEST_AND_ADD2(ppfd->cStencilBits, GLX_STENCIL_SIZE, ppfd->cStencilBits);
235 TEST_AND_ADD2(ppfd->cAuxBuffers, GLX_AUX_BUFFERS, ppfd->cAuxBuffers);
237 /* These flags are not supported yet...
238 ADD2(GLX_ACCUM_SIZE, ppfd->cAccumBits);
240 att_list[att_pos] = None;
242 wine_tsx11_lock();
244 int nCfgs = 0;
245 int gl_test = 0;
246 int fmt_id;
248 GLXFBConfig* cfgs_fmt = NULL;
249 int nCfgs_fmt = 0;
250 int tmp_fmt_id;
251 UINT it_fmt;
253 cfgs = pglXChooseFBConfig(gdi_display, DefaultScreen(gdi_display), att_list, &nCfgs);
254 if (NULL == cfgs || 0 == nCfgs) {
255 ERR("glXChooseFBConfig returns NULL (glError: %d)\n", pglGetError());
256 ret = 0;
257 goto choose_exit;
260 gl_test = pglXGetFBConfigAttrib(gdi_display, cfgs[0], GLX_FBCONFIG_ID, &fmt_id);
261 if (gl_test) {
262 ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
263 ret = 0;
264 goto choose_exit;
267 cfgs_fmt = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &nCfgs_fmt);
268 if (NULL == cfgs_fmt) {
269 ERR("Failed to get All FB Configs\n");
270 ret = 0;
271 goto choose_exit;
274 for (it_fmt = 0; it_fmt < nCfgs_fmt; ++it_fmt) {
275 gl_test = pglXGetFBConfigAttrib(gdi_display, cfgs_fmt[it_fmt], GLX_FBCONFIG_ID, &tmp_fmt_id);
276 if (gl_test) {
277 ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
278 XFree(cfgs_fmt);
279 ret = 0;
280 goto choose_exit;
282 if (fmt_id == tmp_fmt_id) {
283 ret = it_fmt + 1;
284 break ;
287 if (it_fmt == nCfgs_fmt) {
288 ERR("Failed to get valid fmt for FBCONFIG_ID(%d)\n", fmt_id);
289 ret = 0;
291 XFree(cfgs_fmt);
294 choose_exit:
295 if (NULL != cfgs) XFree(cfgs);
296 wine_tsx11_unlock();
297 return ret;
301 * X11DRV_DescribePixelFormat
303 * Get the pixel-format descriptor associated to the given id
305 int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
306 int iPixelFormat,
307 UINT nBytes,
308 PIXELFORMATDESCRIPTOR *ppfd) {
309 /*XVisualInfo *vis;*/
310 int value;
311 int rb,gb,bb,ab;
313 GLXFBConfig* cfgs = NULL;
314 GLXFBConfig cur;
315 int nCfgs = 0;
316 int ret = 0;
318 if (!has_opengl()) {
319 ERR("No libGL on this box - disabling OpenGL support !\n");
320 return 0;
323 TRACE("(%p,%d,%d,%p)\n", physDev, iPixelFormat, nBytes, ppfd);
325 wine_tsx11_lock();
326 cfgs = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &nCfgs);
327 wine_tsx11_unlock();
329 if (NULL == cfgs || 0 == nCfgs) {
330 ERR("unexpected iPixelFormat(%d), returns NULL\n", iPixelFormat);
331 return 0; /* unespected error */
334 if (ppfd == NULL) {
335 /* The application is only querying the number of visuals */
336 wine_tsx11_lock();
337 if (NULL != cfgs) XFree(cfgs);
338 wine_tsx11_unlock();
339 return nCfgs;
342 if (nBytes < sizeof(PIXELFORMATDESCRIPTOR)) {
343 ERR("Wrong structure size !\n");
344 /* Should set error */
345 return 0;
348 if (nCfgs < iPixelFormat) {
349 ERR("unexpected iPixelFormat(%d) > nFormats(%d), returns NULL\n", iPixelFormat, nCfgs);
350 return 0; /* unespected error */
353 ret = nCfgs;
354 cur = cfgs[iPixelFormat - 1];
356 memset(ppfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
357 ppfd->nSize = sizeof(PIXELFORMATDESCRIPTOR);
358 ppfd->nVersion = 1;
360 /* These flags are always the same... */
361 ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
362 /* Now the flags extracted from the Visual */
364 wine_tsx11_lock();
366 pglXGetFBConfigAttrib(gdi_display, cur, GLX_CONFIG_CAVEAT, &value);
367 if(value == GLX_SLOW_CONFIG)
368 ppfd->dwFlags |= PFD_GENERIC_ACCELERATED;
370 pglXGetFBConfigAttrib(gdi_display, cur, GLX_DOUBLEBUFFER, &value); if (value) ppfd->dwFlags |= PFD_DOUBLEBUFFER;
371 pglXGetFBConfigAttrib(gdi_display, cur, GLX_STEREO, &value); if (value) ppfd->dwFlags |= PFD_STEREO;
373 /* Pixel type */
374 pglXGetFBConfigAttrib(gdi_display, cur, GLX_RENDER_TYPE, &value);
375 if (value & GLX_RGBA_BIT)
376 ppfd->iPixelType = PFD_TYPE_RGBA;
377 else
378 ppfd->iPixelType = PFD_TYPE_COLORINDEX;
380 /* Color bits */
381 pglXGetFBConfigAttrib(gdi_display, cur, GLX_BUFFER_SIZE, &value);
382 ppfd->cColorBits = value;
384 /* Red, green, blue and alpha bits / shifts */
385 if (ppfd->iPixelType == PFD_TYPE_RGBA) {
386 pglXGetFBConfigAttrib(gdi_display, cur, GLX_RED_SIZE, &rb);
387 pglXGetFBConfigAttrib(gdi_display, cur, GLX_GREEN_SIZE, &gb);
388 pglXGetFBConfigAttrib(gdi_display, cur, GLX_BLUE_SIZE, &bb);
389 pglXGetFBConfigAttrib(gdi_display, cur, GLX_ALPHA_SIZE, &ab);
391 ppfd->cRedBits = rb;
392 ppfd->cRedShift = gb + bb + ab;
393 ppfd->cBlueBits = bb;
394 ppfd->cBlueShift = ab;
395 ppfd->cGreenBits = gb;
396 ppfd->cGreenShift = bb + ab;
397 ppfd->cAlphaBits = ab;
398 ppfd->cAlphaShift = 0;
399 } else {
400 ppfd->cRedBits = 0;
401 ppfd->cRedShift = 0;
402 ppfd->cBlueBits = 0;
403 ppfd->cBlueShift = 0;
404 ppfd->cGreenBits = 0;
405 ppfd->cGreenShift = 0;
406 ppfd->cAlphaBits = 0;
407 ppfd->cAlphaShift = 0;
409 /* Accums : to do ... */
411 /* Depth bits */
412 pglXGetFBConfigAttrib(gdi_display, cur, GLX_DEPTH_SIZE, &value);
413 ppfd->cDepthBits = value;
415 /* stencil bits */
416 pglXGetFBConfigAttrib(gdi_display, cur, GLX_STENCIL_SIZE, &value);
417 ppfd->cStencilBits = value;
419 wine_tsx11_unlock();
421 /* Aux : to do ... */
423 ppfd->iLayerType = PFD_MAIN_PLANE;
425 if (TRACE_ON(opengl)) {
426 dump_PIXELFORMATDESCRIPTOR(ppfd);
429 wine_tsx11_lock();
430 if (NULL != cfgs) XFree(cfgs);
431 wine_tsx11_unlock();
433 return ret;
437 * X11DRV_GetPixelFormat
439 * Get the pixel-format id used by this DC
441 int X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
442 TRACE("(%p): returns %d\n", physDev, physDev->current_pf);
444 return physDev->current_pf;
448 * X11DRV_SetPixelFormat
450 * Set the pixel-format id used by this DC
452 BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
453 int iPixelFormat,
454 const PIXELFORMATDESCRIPTOR *ppfd) {
455 TRACE("(%p,%d,%p)\n", physDev, iPixelFormat, ppfd);
457 physDev->current_pf = iPixelFormat;
459 if (TRACE_ON(opengl)) {
460 int nCfgs_fmt = 0;
461 GLXFBConfig* cfgs_fmt = NULL;
462 GLXFBConfig cur_cfg;
463 int value;
464 int gl_test = 0;
466 cfgs_fmt = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &nCfgs_fmt);
467 cur_cfg = cfgs_fmt[iPixelFormat - 1];
468 gl_test = pglXGetFBConfigAttrib(gdi_display, cur_cfg, GLX_FBCONFIG_ID, &value);
469 if (gl_test) {
470 ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
471 } else {
472 FIXME("have FBCONFIG_ID %x\n", value);
474 XFree(cfgs_fmt);
476 return TRUE;
480 * X11DRV_SwapBuffers
482 * Swap the buffers of this DC
484 BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
485 if (!has_opengl()) {
486 ERR("No libGL on this box - disabling OpenGL support !\n");
487 return 0;
490 TRACE("(%p)\n", physDev);
492 wine_tsx11_lock();
493 pglXSwapBuffers(gdi_display, physDev->drawable);
494 wine_tsx11_unlock();
496 return TRUE;
499 /***********************************************************************
500 * X11DRV_setup_opengl_visual
502 * Setup the default visual used for OpenGL and Direct3D, and the desktop
503 * window (if it exists). If OpenGL isn't available, the visual is simply
504 * set to the default visual for the display
506 XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
508 XVisualInfo *visual = NULL;
509 /* In order to support OpenGL or D3D, we require a double-buffered visual and stencil buffer support, */
510 int dblBuf[] = {GLX_RGBA,GLX_DEPTH_SIZE, 16, GLX_STENCIL_SIZE, 8, GLX_DOUBLEBUFFER, None};
511 if (!has_opengl()) return NULL;
513 wine_tsx11_lock();
514 visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf);
515 wine_tsx11_unlock();
516 if (visual == NULL) {
517 /* fallback to no stencil */
518 int dblBuf2[] = {GLX_RGBA,GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None};
519 WARN("Failed to get a visual with at least 8 bits of stencil\n");
521 wine_tsx11_lock();
522 visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf2);
523 wine_tsx11_unlock();
524 if (visual == NULL) {
525 /* This should only happen if we cannot find a match with a depth size 16 */
526 FIXME("Failed to find a suitable visual\n");
527 return visual;
530 TRACE("Visual ID %lx Chosen\n",visual->visualid);
531 return visual;
534 XID create_glxpixmap(X11DRV_PDEVICE *physDev)
536 GLXPixmap ret;
537 XVisualInfo *vis;
538 XVisualInfo template;
539 int num;
541 wine_tsx11_lock();
542 template.visualid = XVisualIDFromVisual(visual);
543 vis = XGetVisualInfo(gdi_display, VisualIDMask, &template, &num);
545 ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap);
546 XFree(vis);
547 wine_tsx11_unlock();
548 TRACE("return %lx\n", ret);
549 return ret;
552 BOOL destroy_glxpixmap(XID glxpixmap)
554 wine_tsx11_lock();
555 pglXDestroyGLXPixmap(gdi_display, glxpixmap);
556 wine_tsx11_unlock();
557 return TRUE;
560 #else /* no OpenGL includes */
562 void X11DRV_OpenGL_Init(Display *display)
566 /***********************************************************************
567 * ChoosePixelFormat (X11DRV.@)
569 int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
570 const PIXELFORMATDESCRIPTOR *ppfd) {
571 ERR("No OpenGL support compiled in.\n");
573 return 0;
576 /***********************************************************************
577 * DescribePixelFormat (X11DRV.@)
579 int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
580 int iPixelFormat,
581 UINT nBytes,
582 PIXELFORMATDESCRIPTOR *ppfd) {
583 ERR("No OpenGL support compiled in.\n");
585 return 0;
588 /***********************************************************************
589 * GetPixelFormat (X11DRV.@)
591 int X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
592 ERR("No OpenGL support compiled in.\n");
594 return 0;
597 /***********************************************************************
598 * SetPixelFormat (X11DRV.@)
600 BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
601 int iPixelFormat,
602 const PIXELFORMATDESCRIPTOR *ppfd) {
603 ERR("No OpenGL support compiled in.\n");
605 return FALSE;
608 /***********************************************************************
609 * SwapBuffers (X11DRV.@)
611 BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
612 ERR("No OpenGL support compiled in.\n");
614 return FALSE;
617 XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
619 return NULL;
622 XID create_glxpixmap(X11DRV_PDEVICE *physDev)
624 return 0;
627 BOOL destroy_glxpixmap(XID glxpixmap)
629 return FALSE;
632 #endif /* defined(HAVE_OPENGL) */