2002-06-01 01:06:46 +02:00
|
|
|
/*
|
2000-05-12 22:18:14 +02:00
|
|
|
* X11DRV OpenGL functions
|
|
|
|
*
|
|
|
|
* Copyright 2000 Lionel Ulmer
|
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2000-05-12 22:18:14 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
2002-11-15 05:16:38 +01:00
|
|
|
#include "wine/port.h"
|
2000-05-12 22:18:14 +02:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "x11drv.h"
|
2004-01-20 23:48:57 +01:00
|
|
|
#include "wine/library.h"
|
2002-09-25 02:29:56 +02:00
|
|
|
#include "wine/debug.h"
|
2000-05-12 22:18:14 +02:00
|
|
|
|
2006-03-25 13:07:23 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(wgl);
|
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(opengl);
|
2000-05-12 22:18:14 +02:00
|
|
|
|
2002-11-15 05:16:38 +01:00
|
|
|
#if defined(HAVE_GL_GL_H) && defined(HAVE_GL_GLX_H)
|
2000-05-12 22:18:14 +02:00
|
|
|
|
2002-09-25 02:29:56 +02:00
|
|
|
#undef APIENTRY
|
|
|
|
#undef CALLBACK
|
|
|
|
#undef WINAPI
|
|
|
|
|
2002-10-02 03:24:27 +02:00
|
|
|
#ifdef HAVE_GL_GL_H
|
|
|
|
# include <GL/gl.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_GL_GLX_H
|
|
|
|
# include <GL/glx.h>
|
|
|
|
#endif
|
2002-09-25 02:29:56 +02:00
|
|
|
#ifdef HAVE_GL_GLEXT_H
|
|
|
|
# include <GL/glext.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef APIENTRY
|
|
|
|
#undef CALLBACK
|
|
|
|
#undef WINAPI
|
|
|
|
|
|
|
|
/* Redefines the constants */
|
|
|
|
#define CALLBACK __stdcall
|
|
|
|
#define WINAPI __stdcall
|
|
|
|
#define APIENTRY WINAPI
|
|
|
|
|
|
|
|
|
2004-11-30 22:38:57 +01:00
|
|
|
static void dump_PIXELFORMATDESCRIPTOR(const PIXELFORMATDESCRIPTOR *ppfd) {
|
2005-09-25 17:23:21 +02:00
|
|
|
TRACE(" - size / version : %d / %d\n", ppfd->nSize, ppfd->nVersion);
|
|
|
|
TRACE(" - dwFlags : ");
|
|
|
|
#define TEST_AND_DUMP(t,tv) if ((t) & (tv)) TRACE(#tv " ")
|
2000-05-12 22:18:14 +02:00
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_DEPTH_DONTCARE);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_DOUBLEBUFFER);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_DOUBLEBUFFER_DONTCARE);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_DRAW_TO_WINDOW);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_DRAW_TO_BITMAP);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_GENERIC_ACCELERATED);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_GENERIC_FORMAT);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_NEED_PALETTE);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_NEED_SYSTEM_PALETTE);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_STEREO);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_STEREO_DONTCARE);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_SUPPORT_GDI);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_SUPPORT_OPENGL);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_COPY);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_EXCHANGE);
|
|
|
|
TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_LAYER_BUFFERS);
|
|
|
|
#undef TEST_AND_DUMP
|
2005-09-25 17:23:21 +02:00
|
|
|
TRACE("\n");
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-09-25 17:23:21 +02:00
|
|
|
TRACE(" - iPixelType : ");
|
2000-05-12 22:18:14 +02:00
|
|
|
switch (ppfd->iPixelType) {
|
2005-09-25 17:23:21 +02:00
|
|
|
case PFD_TYPE_RGBA: TRACE("PFD_TYPE_RGBA"); break;
|
|
|
|
case PFD_TYPE_COLORINDEX: TRACE("PFD_TYPE_COLORINDEX"); break;
|
2000-05-12 22:18:14 +02:00
|
|
|
}
|
2005-09-25 17:23:21 +02:00
|
|
|
TRACE("\n");
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-09-25 17:23:21 +02:00
|
|
|
TRACE(" - Color : %d\n", ppfd->cColorBits);
|
|
|
|
TRACE(" - Red : %d\n", ppfd->cRedBits);
|
|
|
|
TRACE(" - Green : %d\n", ppfd->cGreenBits);
|
|
|
|
TRACE(" - Blue : %d\n", ppfd->cBlueBits);
|
|
|
|
TRACE(" - Alpha : %d\n", ppfd->cAlphaBits);
|
|
|
|
TRACE(" - Accum : %d\n", ppfd->cAccumBits);
|
|
|
|
TRACE(" - Depth : %d\n", ppfd->cDepthBits);
|
|
|
|
TRACE(" - Stencil : %d\n", ppfd->cStencilBits);
|
|
|
|
TRACE(" - Aux : %d\n", ppfd->cAuxBuffers);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-09-25 17:23:21 +02:00
|
|
|
TRACE(" - iLayerType : ");
|
2000-05-12 22:18:14 +02:00
|
|
|
switch (ppfd->iLayerType) {
|
2005-09-25 17:23:21 +02:00
|
|
|
case PFD_MAIN_PLANE: TRACE("PFD_MAIN_PLANE"); break;
|
|
|
|
case PFD_OVERLAY_PLANE: TRACE("PFD_OVERLAY_PLANE"); break;
|
|
|
|
case (BYTE)PFD_UNDERLAY_PLANE: TRACE("PFD_UNDERLAY_PLANE"); break;
|
2000-05-12 22:18:14 +02:00
|
|
|
}
|
2005-09-25 17:23:21 +02:00
|
|
|
TRACE("\n");
|
2000-05-12 22:18:14 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-11-15 05:16:38 +01:00
|
|
|
/* No need to load any other libraries as according to the ABI, libGL should be self-sufficient and
|
|
|
|
include all dependencies
|
|
|
|
*/
|
|
|
|
#ifndef SONAME_LIBGL
|
|
|
|
#define SONAME_LIBGL "libGL.so"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define MAKE_FUNCPTR(f) static typeof(f) * p##f;
|
2005-04-28 20:29:12 +02:00
|
|
|
MAKE_FUNCPTR(glGetError)
|
2002-11-15 05:16:38 +01:00
|
|
|
MAKE_FUNCPTR(glXChooseVisual)
|
|
|
|
MAKE_FUNCPTR(glXGetConfig)
|
|
|
|
MAKE_FUNCPTR(glXSwapBuffers)
|
|
|
|
MAKE_FUNCPTR(glXQueryExtension)
|
2005-04-28 20:29:12 +02:00
|
|
|
|
|
|
|
MAKE_FUNCPTR(glXGetFBConfigs)
|
|
|
|
MAKE_FUNCPTR(glXChooseFBConfig)
|
|
|
|
MAKE_FUNCPTR(glXGetFBConfigAttrib)
|
2005-09-26 13:04:12 +02:00
|
|
|
MAKE_FUNCPTR(glXCreateGLXPixmap)
|
|
|
|
MAKE_FUNCPTR(glXDestroyGLXPixmap)
|
2005-12-06 11:33:33 +01:00
|
|
|
/* MAKE_FUNCPTR(glXQueryDrawable) */
|
2002-11-15 05:16:38 +01:00
|
|
|
#undef MAKE_FUNCPTR
|
|
|
|
|
2005-06-29 21:28:06 +02:00
|
|
|
static BOOL has_opengl(void)
|
|
|
|
{
|
|
|
|
static int init_done;
|
|
|
|
static void *opengl_handle;
|
|
|
|
|
2002-11-15 05:16:38 +01:00
|
|
|
int error_base, event_base;
|
|
|
|
|
2005-06-29 21:28:06 +02:00
|
|
|
if (init_done) return (opengl_handle != NULL);
|
|
|
|
init_done = 1;
|
|
|
|
|
2002-11-15 05:16:38 +01:00
|
|
|
opengl_handle = wine_dlopen(SONAME_LIBGL, RTLD_NOW|RTLD_GLOBAL, NULL, 0);
|
2005-06-29 21:28:06 +02:00
|
|
|
if (opengl_handle == NULL) return FALSE;
|
2002-11-15 05:16:38 +01:00
|
|
|
|
2005-12-16 12:37:34 +01:00
|
|
|
#define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(RTLD_DEFAULT, #f, NULL, 0)) == NULL) goto sym_not_found;
|
2005-04-28 20:29:12 +02:00
|
|
|
LOAD_FUNCPTR(glGetError)
|
2002-11-15 05:16:38 +01:00
|
|
|
LOAD_FUNCPTR(glXChooseVisual)
|
|
|
|
LOAD_FUNCPTR(glXGetConfig)
|
|
|
|
LOAD_FUNCPTR(glXSwapBuffers)
|
|
|
|
LOAD_FUNCPTR(glXQueryExtension)
|
2005-04-28 20:29:12 +02:00
|
|
|
|
|
|
|
LOAD_FUNCPTR(glXGetFBConfigs)
|
|
|
|
LOAD_FUNCPTR(glXChooseFBConfig)
|
|
|
|
LOAD_FUNCPTR(glXGetFBConfigAttrib)
|
2005-09-26 13:04:12 +02:00
|
|
|
LOAD_FUNCPTR(glXCreateGLXPixmap)
|
|
|
|
LOAD_FUNCPTR(glXDestroyGLXPixmap)
|
2002-11-15 05:16:38 +01:00
|
|
|
#undef LOAD_FUNCPTR
|
|
|
|
|
|
|
|
wine_tsx11_lock();
|
2005-06-29 21:28:06 +02:00
|
|
|
if (pglXQueryExtension(gdi_display, &event_base, &error_base) == True) {
|
2002-11-15 05:16:38 +01:00
|
|
|
TRACE("GLX is up and running error_base = %d\n", error_base);
|
|
|
|
} else {
|
|
|
|
wine_dlclose(opengl_handle, NULL, 0);
|
|
|
|
opengl_handle = NULL;
|
|
|
|
}
|
|
|
|
wine_tsx11_unlock();
|
2005-06-29 21:28:06 +02:00
|
|
|
return (opengl_handle != NULL);
|
2002-11-15 05:16:38 +01:00
|
|
|
|
|
|
|
sym_not_found:
|
|
|
|
wine_dlclose(opengl_handle, NULL, 0);
|
|
|
|
opengl_handle = NULL;
|
2005-06-29 21:28:06 +02:00
|
|
|
return FALSE;
|
2002-11-15 05:16:38 +01:00
|
|
|
}
|
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
#define TEST_AND_ADD1(t,a) if (t) att_list[att_pos++] = (a)
|
|
|
|
#define TEST_AND_ADD2(t,a,b) if (t) { att_list[att_pos++] = (a); att_list[att_pos++] = (b); }
|
|
|
|
#define NULL_TEST_AND_ADD2(tv,a,b) att_list[att_pos++] = (a); att_list[att_pos++] = ((tv) == 0 ? 0 : (b))
|
|
|
|
#define ADD2(a,b) att_list[att_pos++] = (a); att_list[att_pos++] = (b)
|
2000-05-12 22:18:14 +02:00
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
/**
|
|
|
|
* X11DRV_ChoosePixelFormat
|
|
|
|
*
|
|
|
|
* Equivalent of glXChooseVisual
|
|
|
|
*/
|
|
|
|
int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
|
2000-05-12 22:18:14 +02:00
|
|
|
const PIXELFORMATDESCRIPTOR *ppfd) {
|
|
|
|
int att_list[64];
|
|
|
|
int att_pos = 0;
|
2005-12-02 11:24:52 +01:00
|
|
|
int att_pos_fac = 0;
|
2005-04-28 20:29:12 +02:00
|
|
|
GLXFBConfig* cfgs = NULL;
|
|
|
|
int ret = 0;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-06-29 21:28:06 +02:00
|
|
|
if (!has_opengl()) {
|
2002-11-15 05:16:38 +01:00
|
|
|
ERR("No libGL on this box - disabling OpenGL support !\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
if (TRACE_ON(opengl)) {
|
2002-04-09 00:43:58 +02:00
|
|
|
TRACE("(%p,%p)\n", physDev, ppfd);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2004-11-30 22:38:57 +01:00
|
|
|
dump_PIXELFORMATDESCRIPTOR((const PIXELFORMATDESCRIPTOR *) ppfd);
|
2000-05-12 22:18:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Now, build the request to GLX */
|
2005-04-28 20:29:12 +02:00
|
|
|
|
|
|
|
if (ppfd->iPixelType == PFD_TYPE_COLORINDEX) {
|
|
|
|
ADD2(GLX_BUFFER_SIZE, ppfd->cColorBits);
|
|
|
|
}
|
|
|
|
if (ppfd->iPixelType == PFD_TYPE_RGBA) {
|
|
|
|
ADD2(GLX_RENDER_TYPE, GLX_RGBA_BIT);
|
2005-12-02 11:24:52 +01:00
|
|
|
if (ppfd->dwFlags & PFD_DEPTH_DONTCARE) {
|
|
|
|
ADD2(GLX_DEPTH_SIZE, GLX_DONT_CARE);
|
2005-05-10 10:26:08 +02:00
|
|
|
} else {
|
2005-12-02 11:24:52 +01:00
|
|
|
if (32 == ppfd->cDepthBits) {
|
|
|
|
/**
|
|
|
|
* for 32 bpp depth buffers force to use 24.
|
|
|
|
* needed as some drivers don't support 32bpp
|
|
|
|
*/
|
|
|
|
TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, 24);
|
|
|
|
} else {
|
|
|
|
TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, ppfd->cDepthBits);
|
|
|
|
}
|
2005-05-10 10:26:08 +02:00
|
|
|
}
|
2005-11-11 11:52:14 +01:00
|
|
|
if (32 == ppfd->cColorBits) {
|
|
|
|
ADD2(GLX_RED_SIZE, 8);
|
|
|
|
ADD2(GLX_GREEN_SIZE, 8);
|
|
|
|
ADD2(GLX_BLUE_SIZE, 8);
|
|
|
|
ADD2(GLX_ALPHA_SIZE, 8);
|
|
|
|
} else {
|
|
|
|
ADD2(GLX_BUFFER_SIZE, ppfd->cColorBits);
|
2006-03-05 06:27:11 +01:00
|
|
|
/* Some broken apps try to ask for more than 8 bits of alpha */
|
|
|
|
TEST_AND_ADD2(ppfd->cAlphaBits, GLX_ALPHA_SIZE, min(ppfd->cAlphaBits,8));
|
2005-11-11 11:52:14 +01:00
|
|
|
}
|
2005-04-28 20:29:12 +02:00
|
|
|
}
|
|
|
|
TEST_AND_ADD2(ppfd->cStencilBits, GLX_STENCIL_SIZE, ppfd->cStencilBits);
|
|
|
|
TEST_AND_ADD2(ppfd->cAuxBuffers, GLX_AUX_BUFFERS, ppfd->cAuxBuffers);
|
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
/* These flags are not supported yet...
|
2005-04-28 20:29:12 +02:00
|
|
|
ADD2(GLX_ACCUM_SIZE, ppfd->cAccumBits);
|
|
|
|
*/
|
2005-12-02 11:24:52 +01:00
|
|
|
|
|
|
|
/** facultative flags now */
|
|
|
|
att_pos_fac = att_pos;
|
|
|
|
if (ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) {
|
|
|
|
ADD2(GLX_DOUBLEBUFFER, GLX_DONT_CARE);
|
|
|
|
} else {
|
|
|
|
ADD2(GLX_DOUBLEBUFFER, (ppfd->dwFlags & PFD_DOUBLEBUFFER) ? TRUE : FALSE);
|
|
|
|
}
|
|
|
|
if (ppfd->dwFlags & PFD_STEREO_DONTCARE) {
|
|
|
|
ADD2(GLX_STEREO, GLX_DONT_CARE);
|
|
|
|
} else {
|
|
|
|
ADD2(GLX_STEREO, (ppfd->dwFlags & PFD_STEREO) ? TRUE : FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Attributes List End */
|
2000-05-12 22:18:14 +02:00
|
|
|
att_list[att_pos] = None;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
wine_tsx11_lock();
|
|
|
|
{
|
|
|
|
int nCfgs = 0;
|
|
|
|
int gl_test = 0;
|
|
|
|
int fmt_id;
|
|
|
|
|
|
|
|
GLXFBConfig* cfgs_fmt = NULL;
|
|
|
|
int nCfgs_fmt = 0;
|
|
|
|
int tmp_fmt_id;
|
|
|
|
UINT it_fmt;
|
|
|
|
|
|
|
|
cfgs = pglXChooseFBConfig(gdi_display, DefaultScreen(gdi_display), att_list, &nCfgs);
|
2005-12-02 11:24:52 +01:00
|
|
|
/**
|
|
|
|
* if we have facultative flags and we failed, try without
|
|
|
|
* as MSDN said
|
|
|
|
*
|
|
|
|
* see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_2qb8.asp
|
|
|
|
*/
|
|
|
|
if ((NULL == cfgs || 0 == nCfgs) && att_pos > att_pos_fac) {
|
|
|
|
att_list[att_pos_fac] = None;
|
|
|
|
cfgs = pglXChooseFBConfig(gdi_display, DefaultScreen(gdi_display), att_list, &nCfgs);
|
|
|
|
}
|
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
if (NULL == cfgs || 0 == nCfgs) {
|
|
|
|
ERR("glXChooseFBConfig returns NULL (glError: %d)\n", pglGetError());
|
|
|
|
ret = 0;
|
|
|
|
goto choose_exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
gl_test = pglXGetFBConfigAttrib(gdi_display, cfgs[0], GLX_FBCONFIG_ID, &fmt_id);
|
|
|
|
if (gl_test) {
|
|
|
|
ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
|
|
|
|
ret = 0;
|
|
|
|
goto choose_exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
cfgs_fmt = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &nCfgs_fmt);
|
|
|
|
if (NULL == cfgs_fmt) {
|
|
|
|
ERR("Failed to get All FB Configs\n");
|
|
|
|
ret = 0;
|
|
|
|
goto choose_exit;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
for (it_fmt = 0; it_fmt < nCfgs_fmt; ++it_fmt) {
|
|
|
|
gl_test = pglXGetFBConfigAttrib(gdi_display, cfgs_fmt[it_fmt], GLX_FBCONFIG_ID, &tmp_fmt_id);
|
|
|
|
if (gl_test) {
|
|
|
|
ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
|
|
|
|
XFree(cfgs_fmt);
|
|
|
|
ret = 0;
|
|
|
|
goto choose_exit;
|
|
|
|
}
|
|
|
|
if (fmt_id == tmp_fmt_id) {
|
|
|
|
ret = it_fmt + 1;
|
|
|
|
break ;
|
|
|
|
}
|
2002-04-12 01:48:42 +02:00
|
|
|
}
|
2005-04-28 20:29:12 +02:00
|
|
|
if (it_fmt == nCfgs_fmt) {
|
|
|
|
ERR("Failed to get valid fmt for FBCONFIG_ID(%d)\n", fmt_id);
|
|
|
|
ret = 0;
|
|
|
|
}
|
|
|
|
XFree(cfgs_fmt);
|
2002-04-12 01:48:42 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
choose_exit:
|
|
|
|
if (NULL != cfgs) XFree(cfgs);
|
|
|
|
wine_tsx11_unlock();
|
|
|
|
return ret;
|
2000-05-12 22:18:14 +02:00
|
|
|
}
|
|
|
|
|
2005-05-06 16:33:02 +02:00
|
|
|
/**
|
|
|
|
* X11DRV_DescribePixelFormat
|
|
|
|
*
|
|
|
|
* Get the pixel-format descriptor associated to the given id
|
|
|
|
*/
|
2002-04-09 00:43:58 +02:00
|
|
|
int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
|
2000-05-12 22:18:14 +02:00
|
|
|
int iPixelFormat,
|
|
|
|
UINT nBytes,
|
|
|
|
PIXELFORMATDESCRIPTOR *ppfd) {
|
2005-04-28 20:29:12 +02:00
|
|
|
/*XVisualInfo *vis;*/
|
2000-05-12 22:18:14 +02:00
|
|
|
int value;
|
|
|
|
int rb,gb,bb,ab;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
GLXFBConfig* cfgs = NULL;
|
|
|
|
GLXFBConfig cur;
|
|
|
|
int nCfgs = 0;
|
|
|
|
int ret = 0;
|
|
|
|
|
2005-06-29 21:28:06 +02:00
|
|
|
if (!has_opengl()) {
|
2002-11-15 05:16:38 +01:00
|
|
|
ERR("No libGL on this box - disabling OpenGL support !\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-04-09 00:43:58 +02:00
|
|
|
TRACE("(%p,%d,%d,%p)\n", physDev, iPixelFormat, nBytes, ppfd);
|
2002-05-24 23:14:16 +02:00
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
wine_tsx11_lock();
|
|
|
|
cfgs = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &nCfgs);
|
|
|
|
wine_tsx11_unlock();
|
|
|
|
|
|
|
|
if (NULL == cfgs || 0 == nCfgs) {
|
|
|
|
ERR("unexpected iPixelFormat(%d), returns NULL\n", iPixelFormat);
|
|
|
|
return 0; /* unespected error */
|
|
|
|
}
|
|
|
|
|
2002-05-24 23:14:16 +02:00
|
|
|
if (ppfd == NULL) {
|
|
|
|
/* The application is only querying the number of visuals */
|
2005-04-28 20:29:12 +02:00
|
|
|
wine_tsx11_lock();
|
|
|
|
if (NULL != cfgs) XFree(cfgs);
|
|
|
|
wine_tsx11_unlock();
|
|
|
|
return nCfgs;
|
2002-05-24 23:14:16 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
if (nBytes < sizeof(PIXELFORMATDESCRIPTOR)) {
|
|
|
|
ERR("Wrong structure size !\n");
|
|
|
|
/* Should set error */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-03-13 14:06:14 +01:00
|
|
|
if (nCfgs < iPixelFormat || 1 > iPixelFormat) {
|
|
|
|
WARN("unexpected iPixelFormat(%d): not >=1 and <=nFormats(%d), returning NULL\n", iPixelFormat, nCfgs);
|
|
|
|
return 0;
|
2000-05-12 22:18:14 +02:00
|
|
|
}
|
2005-04-28 20:29:12 +02:00
|
|
|
|
|
|
|
ret = nCfgs;
|
|
|
|
cur = cfgs[iPixelFormat - 1];
|
2000-05-12 22:18:14 +02:00
|
|
|
|
|
|
|
memset(ppfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
|
|
|
|
ppfd->nSize = sizeof(PIXELFORMATDESCRIPTOR);
|
|
|
|
ppfd->nVersion = 1;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
/* These flags are always the same... */
|
2005-11-18 13:06:45 +01:00
|
|
|
ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
|
|
|
|
/* Now the flags extracted from the Visual */
|
2005-04-28 20:29:12 +02:00
|
|
|
|
2002-09-25 02:29:56 +02:00
|
|
|
wine_tsx11_lock();
|
2005-04-28 20:29:12 +02:00
|
|
|
|
2005-11-18 13:06:45 +01:00
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_CONFIG_CAVEAT, &value);
|
|
|
|
if(value == GLX_SLOW_CONFIG)
|
|
|
|
ppfd->dwFlags |= PFD_GENERIC_ACCELERATED;
|
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_DOUBLEBUFFER, &value); if (value) ppfd->dwFlags |= PFD_DOUBLEBUFFER;
|
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_STEREO, &value); if (value) ppfd->dwFlags |= PFD_STEREO;
|
2000-05-12 22:18:14 +02:00
|
|
|
|
|
|
|
/* Pixel type */
|
2005-04-28 20:29:12 +02:00
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_RENDER_TYPE, &value);
|
|
|
|
if (value & GLX_RGBA_BIT)
|
2000-05-12 22:18:14 +02:00
|
|
|
ppfd->iPixelType = PFD_TYPE_RGBA;
|
|
|
|
else
|
|
|
|
ppfd->iPixelType = PFD_TYPE_COLORINDEX;
|
|
|
|
|
|
|
|
/* Color bits */
|
2005-04-28 20:29:12 +02:00
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_BUFFER_SIZE, &value);
|
2000-05-12 22:18:14 +02:00
|
|
|
ppfd->cColorBits = value;
|
|
|
|
|
|
|
|
/* Red, green, blue and alpha bits / shifts */
|
|
|
|
if (ppfd->iPixelType == PFD_TYPE_RGBA) {
|
2005-04-28 20:29:12 +02:00
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_RED_SIZE, &rb);
|
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_GREEN_SIZE, &gb);
|
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_BLUE_SIZE, &bb);
|
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_ALPHA_SIZE, &ab);
|
2001-05-11 02:17:47 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
ppfd->cRedBits = rb;
|
|
|
|
ppfd->cRedShift = gb + bb + ab;
|
|
|
|
ppfd->cBlueBits = bb;
|
|
|
|
ppfd->cBlueShift = ab;
|
|
|
|
ppfd->cGreenBits = gb;
|
|
|
|
ppfd->cGreenShift = bb + ab;
|
|
|
|
ppfd->cAlphaBits = ab;
|
|
|
|
ppfd->cAlphaShift = 0;
|
|
|
|
} else {
|
|
|
|
ppfd->cRedBits = 0;
|
|
|
|
ppfd->cRedShift = 0;
|
|
|
|
ppfd->cBlueBits = 0;
|
|
|
|
ppfd->cBlueShift = 0;
|
|
|
|
ppfd->cGreenBits = 0;
|
|
|
|
ppfd->cGreenShift = 0;
|
|
|
|
ppfd->cAlphaBits = 0;
|
|
|
|
ppfd->cAlphaShift = 0;
|
|
|
|
}
|
|
|
|
/* Accums : to do ... */
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
/* Depth bits */
|
2005-04-28 20:29:12 +02:00
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_DEPTH_SIZE, &value);
|
2000-05-12 22:18:14 +02:00
|
|
|
ppfd->cDepthBits = value;
|
2002-04-12 01:48:42 +02:00
|
|
|
|
|
|
|
/* stencil bits */
|
2005-04-28 20:29:12 +02:00
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur, GLX_STENCIL_SIZE, &value);
|
2002-04-12 01:48:42 +02:00
|
|
|
ppfd->cStencilBits = value;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-09-25 02:29:56 +02:00
|
|
|
wine_tsx11_unlock();
|
2000-05-12 22:18:14 +02:00
|
|
|
|
2002-04-12 01:48:42 +02:00
|
|
|
/* Aux : to do ... */
|
2000-05-12 22:18:14 +02:00
|
|
|
|
|
|
|
ppfd->iLayerType = PFD_MAIN_PLANE;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-15 00:53:17 +02:00
|
|
|
if (TRACE_ON(opengl)) {
|
|
|
|
dump_PIXELFORMATDESCRIPTOR(ppfd);
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-04-28 20:29:12 +02:00
|
|
|
wine_tsx11_lock();
|
|
|
|
if (NULL != cfgs) XFree(cfgs);
|
|
|
|
wine_tsx11_unlock();
|
|
|
|
|
|
|
|
return ret;
|
2000-05-12 22:18:14 +02:00
|
|
|
}
|
|
|
|
|
2005-05-06 16:33:02 +02:00
|
|
|
/**
|
|
|
|
* X11DRV_GetPixelFormat
|
|
|
|
*
|
|
|
|
* Get the pixel-format id used by this DC
|
|
|
|
*/
|
2002-04-09 00:43:58 +02:00
|
|
|
int X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
|
|
|
|
TRACE("(%p): returns %d\n", physDev, physDev->current_pf);
|
2000-05-12 22:18:14 +02:00
|
|
|
|
|
|
|
return physDev->current_pf;
|
|
|
|
}
|
|
|
|
|
2005-05-06 16:33:02 +02:00
|
|
|
/**
|
|
|
|
* X11DRV_SetPixelFormat
|
|
|
|
*
|
|
|
|
* Set the pixel-format id used by this DC
|
|
|
|
*/
|
2002-04-09 00:43:58 +02:00
|
|
|
BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
|
2000-05-12 22:18:14 +02:00
|
|
|
int iPixelFormat,
|
|
|
|
const PIXELFORMATDESCRIPTOR *ppfd) {
|
2002-04-09 00:43:58 +02:00
|
|
|
TRACE("(%p,%d,%p)\n", physDev, iPixelFormat, ppfd);
|
2000-05-12 22:18:14 +02:00
|
|
|
|
|
|
|
physDev->current_pf = iPixelFormat;
|
2005-11-11 11:52:14 +01:00
|
|
|
|
|
|
|
if (TRACE_ON(opengl)) {
|
|
|
|
int nCfgs_fmt = 0;
|
|
|
|
GLXFBConfig* cfgs_fmt = NULL;
|
|
|
|
GLXFBConfig cur_cfg;
|
|
|
|
int value;
|
|
|
|
int gl_test = 0;
|
2005-12-06 11:33:33 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* How to test if hdc current drawable is compatible (visual/FBConfig) ?
|
|
|
|
*
|
|
|
|
* in case of root window created HDCs we crash here :(
|
|
|
|
*
|
|
|
|
Drawable drawable = get_drawable( physDev->hdc );
|
|
|
|
TRACE(" drawable (%p,%p) have :\n", drawable, root_window);
|
|
|
|
pglXQueryDrawable(gdi_display, drawable, GLX_FBCONFIG_ID, (unsigned int*) &value);
|
|
|
|
TRACE(" - FBCONFIG_ID as 0x%x\n", tmp);
|
|
|
|
pglXQueryDrawable(gdi_display, drawable, GLX_VISUAL_ID, (unsigned int*) &value);
|
|
|
|
TRACE(" - VISUAL_ID as 0x%x\n", tmp);
|
|
|
|
pglXQueryDrawable(gdi_display, drawable, GLX_WIDTH, (unsigned int*) &value);
|
|
|
|
TRACE(" - WIDTH as %d\n", tmp);
|
|
|
|
pglXQueryDrawable(gdi_display, drawable, GLX_HEIGHT, (unsigned int*) &value);
|
|
|
|
TRACE(" - HEIGHT as %d\n", tmp);
|
|
|
|
*/
|
2005-11-11 11:52:14 +01:00
|
|
|
cfgs_fmt = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &nCfgs_fmt);
|
|
|
|
cur_cfg = cfgs_fmt[iPixelFormat - 1];
|
|
|
|
gl_test = pglXGetFBConfigAttrib(gdi_display, cur_cfg, GLX_FBCONFIG_ID, &value);
|
|
|
|
if (gl_test) {
|
|
|
|
ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
|
|
|
|
} else {
|
2005-12-06 11:33:33 +01:00
|
|
|
TRACE(" FBConfig have :\n");
|
|
|
|
TRACE(" - FBCONFIG_ID 0x%x\n", value);
|
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur_cfg, GLX_VISUAL_ID, &value);
|
|
|
|
TRACE(" - VISUAL_ID 0x%x\n", value);
|
|
|
|
pglXGetFBConfigAttrib(gdi_display, cur_cfg, GLX_DRAWABLE_TYPE, &value);
|
|
|
|
TRACE(" - DRAWABLE_TYPE 0x%x\n", value);
|
2005-11-11 11:52:14 +01:00
|
|
|
}
|
|
|
|
XFree(cfgs_fmt);
|
|
|
|
}
|
2000-05-12 22:18:14 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2005-05-06 16:33:02 +02:00
|
|
|
/**
|
|
|
|
* X11DRV_SwapBuffers
|
|
|
|
*
|
|
|
|
* Swap the buffers of this DC
|
|
|
|
*/
|
2002-04-09 00:43:58 +02:00
|
|
|
BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
|
2005-06-29 21:28:06 +02:00
|
|
|
if (!has_opengl()) {
|
2002-11-15 05:16:38 +01:00
|
|
|
ERR("No libGL on this box - disabling OpenGL support !\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-03-25 13:07:23 +01:00
|
|
|
TRACE_(opengl)("(%p)\n", physDev);
|
2000-05-12 22:18:14 +02:00
|
|
|
|
2002-09-25 02:29:56 +02:00
|
|
|
wine_tsx11_lock();
|
2002-11-15 05:16:38 +01:00
|
|
|
pglXSwapBuffers(gdi_display, physDev->drawable);
|
2002-09-25 02:29:56 +02:00
|
|
|
wine_tsx11_unlock();
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-09-25 02:29:56 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* X11DRV_setup_opengl_visual
|
|
|
|
*
|
|
|
|
* Setup the default visual used for OpenGL and Direct3D, and the desktop
|
|
|
|
* window (if it exists). If OpenGL isn't available, the visual is simply
|
|
|
|
* set to the default visual for the display
|
|
|
|
*/
|
|
|
|
XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
|
|
|
|
{
|
|
|
|
XVisualInfo *visual = NULL;
|
2005-07-05 12:58:41 +02:00
|
|
|
/* In order to support OpenGL or D3D, we require a double-buffered visual and stencil buffer support, */
|
2005-08-03 13:01:15 +02:00
|
|
|
int dblBuf[] = {GLX_RGBA,GLX_DEPTH_SIZE, 16, GLX_STENCIL_SIZE, 8, GLX_DOUBLEBUFFER, None};
|
2005-06-29 21:28:06 +02:00
|
|
|
if (!has_opengl()) return NULL;
|
2005-07-05 12:58:41 +02:00
|
|
|
|
2002-09-25 02:29:56 +02:00
|
|
|
wine_tsx11_lock();
|
2005-08-03 13:01:15 +02:00
|
|
|
visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf);
|
|
|
|
wine_tsx11_unlock();
|
|
|
|
if (visual == NULL) {
|
|
|
|
/* fallback to no stencil */
|
|
|
|
int dblBuf2[] = {GLX_RGBA,GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None};
|
|
|
|
WARN("Failed to get a visual with at least 8 bits of stencil\n");
|
|
|
|
|
|
|
|
wine_tsx11_lock();
|
|
|
|
visual = pglXChooseVisual(display, DefaultScreen(display), dblBuf2);
|
|
|
|
wine_tsx11_unlock();
|
|
|
|
if (visual == NULL) {
|
|
|
|
/* This should only happen if we cannot find a match with a depth size 16 */
|
|
|
|
FIXME("Failed to find a suitable visual\n");
|
2005-08-22 11:22:19 +02:00
|
|
|
return visual;
|
2005-07-05 12:58:41 +02:00
|
|
|
}
|
|
|
|
}
|
2005-08-03 13:01:15 +02:00
|
|
|
TRACE("Visual ID %lx Chosen\n",visual->visualid);
|
2002-09-25 02:29:56 +02:00
|
|
|
return visual;
|
|
|
|
}
|
|
|
|
|
2005-09-26 13:04:12 +02:00
|
|
|
XID create_glxpixmap(X11DRV_PDEVICE *physDev)
|
|
|
|
{
|
|
|
|
GLXPixmap ret;
|
|
|
|
XVisualInfo *vis;
|
|
|
|
XVisualInfo template;
|
|
|
|
int num;
|
2005-12-16 19:29:52 +01:00
|
|
|
GLXFBConfig *cfgs;
|
2005-09-26 13:04:12 +02:00
|
|
|
|
|
|
|
wine_tsx11_lock();
|
2005-12-16 19:29:52 +01:00
|
|
|
cfgs = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &num);
|
|
|
|
pglXGetFBConfigAttrib(gdi_display, cfgs[physDev->current_pf - 1], GLX_VISUAL_ID, (int *)&template.visualid);
|
|
|
|
|
2005-09-26 13:04:12 +02:00
|
|
|
vis = XGetVisualInfo(gdi_display, VisualIDMask, &template, &num);
|
|
|
|
|
|
|
|
ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap);
|
|
|
|
XFree(vis);
|
2005-12-16 19:29:52 +01:00
|
|
|
XFree(cfgs);
|
2005-09-26 13:04:12 +02:00
|
|
|
wine_tsx11_unlock();
|
|
|
|
TRACE("return %lx\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL destroy_glxpixmap(XID glxpixmap)
|
|
|
|
{
|
|
|
|
wine_tsx11_lock();
|
|
|
|
pglXDestroyGLXPixmap(gdi_display, glxpixmap);
|
|
|
|
wine_tsx11_unlock();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-11-15 05:16:38 +01:00
|
|
|
#else /* no OpenGL includes */
|
2000-05-12 22:18:14 +02:00
|
|
|
|
2002-11-18 20:50:02 +01:00
|
|
|
void X11DRV_OpenGL_Init(Display *display)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2002-11-27 21:21:24 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ChoosePixelFormat (X11DRV.@)
|
|
|
|
*/
|
2002-04-09 01:47:25 +02:00
|
|
|
int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
|
2000-05-12 22:18:14 +02:00
|
|
|
const PIXELFORMATDESCRIPTOR *ppfd) {
|
|
|
|
ERR("No OpenGL support compiled in.\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-11-27 21:21:24 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* DescribePixelFormat (X11DRV.@)
|
|
|
|
*/
|
2002-04-09 01:47:25 +02:00
|
|
|
int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
|
2000-05-12 22:18:14 +02:00
|
|
|
int iPixelFormat,
|
|
|
|
UINT nBytes,
|
|
|
|
PIXELFORMATDESCRIPTOR *ppfd) {
|
|
|
|
ERR("No OpenGL support compiled in.\n");
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-11-27 21:21:24 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* GetPixelFormat (X11DRV.@)
|
|
|
|
*/
|
2002-04-09 01:47:25 +02:00
|
|
|
int X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
|
2000-05-12 22:18:14 +02:00
|
|
|
ERR("No OpenGL support compiled in.\n");
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-11-27 21:21:24 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* SetPixelFormat (X11DRV.@)
|
|
|
|
*/
|
2002-04-09 01:47:25 +02:00
|
|
|
BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
|
2000-05-12 22:18:14 +02:00
|
|
|
int iPixelFormat,
|
|
|
|
const PIXELFORMATDESCRIPTOR *ppfd) {
|
|
|
|
ERR("No OpenGL support compiled in.\n");
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2002-11-27 21:21:24 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* SwapBuffers (X11DRV.@)
|
|
|
|
*/
|
2002-04-09 01:47:25 +02:00
|
|
|
BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
|
2000-05-12 22:18:14 +02:00
|
|
|
ERR("No OpenGL support compiled in.\n");
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2002-09-25 02:29:56 +02:00
|
|
|
XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2005-09-26 13:04:12 +02:00
|
|
|
XID create_glxpixmap(X11DRV_PDEVICE *physDev)
|
|
|
|
{
|
2005-09-28 20:11:17 +02:00
|
|
|
return 0;
|
2005-09-26 13:04:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
BOOL destroy_glxpixmap(XID glxpixmap)
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2000-05-12 22:18:14 +02:00
|
|
|
#endif /* defined(HAVE_OPENGL) */
|