From 22eea683ff82b7da054b815ca178589aa881e155 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Mon, 20 Aug 2007 15:48:11 +0200 Subject: [PATCH] wgl: Cleanup pixelformat initialization code. --- dlls/winex11.drv/opengl.c | 131 ++++++++++++-------------------------- 1 file changed, 40 insertions(+), 91 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 455b3d0c58c..98ecedb9fde 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -833,116 +833,65 @@ static int get_render_type_from_fbconfig(Display *display, GLXFBConfig fbconfig) return render_type; } -static BOOL get_fbconfig_from_visualid(Display *display, Visual *visual, GLXFBConfig *fbconfig, int *fmt_id) -{ - GLXFBConfig* cfgs = NULL; - int i; - int nCfgs; - int tmp_fmt_id; - int tmp_vis_id; - VisualID visualid; - - if(!display || !visual) { - ERR("Invalid display or visual\n"); - return FALSE; - } - visualid = XVisualIDFromVisual(visual); - - /* Get a list of all available framebuffer configurations */ - cfgs = pglXGetFBConfigs(display, DefaultScreen(display), &nCfgs); - if (NULL == cfgs || 0 == nCfgs) { - ERR("glXChooseFBConfig returns NULL\n"); - if(cfgs != NULL) XFree(cfgs); - return FALSE; - } - - /* Find the requested offscreen format and count the number of offscreen formats */ - for(i=0; i