Commit 220163ee authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wgl: Remove unneeded opengl initialisation code at wine startup.

parent 8293a9ea
......@@ -3364,47 +3364,6 @@ BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev)
return TRUE;
}
/***********************************************************************
* 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;
int i;
/* In order to support OpenGL or D3D, we require a double-buffered visual and stencil buffer support,
* D3D and some applications can make use of aux buffers.
*/
int visualProperties[][11] = {
{ GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, 8, GLX_ALPHA_SIZE, 8, GLX_AUX_BUFFERS, 1, None },
{ GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, 8, GLX_ALPHA_SIZE, 8, None },
{ GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 16, GLX_STENCIL_SIZE, 8, None },
{ GLX_RGBA, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 16, None },
};
if (!has_opengl())
return NULL;
wine_tsx11_lock();
for (i = 0; i < sizeof(visualProperties)/sizeof(visualProperties[0]); ++i) {
visual = pglXChooseVisual(display, DefaultScreen(display), visualProperties[i]);
if (visual)
break;
}
wine_tsx11_unlock();
if (visual)
TRACE("Visual ID %lx Chosen\n", visual->visualid);
else
WARN("No suitable visual found\n");
return visual;
}
XVisualInfo *visual_from_fbconfig_id( XID fbconfig_id )
{
WineGLPixelFormat *fmt;
......@@ -3579,11 +3538,6 @@ BOOL X11DRV_wglUseFontBitmapsW(X11DRV_PDEVICE *physDev, DWORD first, DWORD count
return FALSE;
}
XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
{
return NULL;
}
Drawable get_glxdrawable(X11DRV_PDEVICE *physDev)
{
return 0;
......
......@@ -270,7 +270,6 @@ extern BOOL X11DRV_XRender_ExtTextOut(X11DRV_PDEVICE *physDev, INT x, INT y, UIN
UINT count, const INT *lpDx);
extern void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev);
extern XVisualInfo *X11DRV_setup_opengl_visual(Display *display);
extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev);
extern BOOL destroy_glxpixmap(Display *display, XID glxpixmap);
......
......@@ -476,7 +476,6 @@ sym_not_found:
static BOOL process_attach(void)
{
Display *display;
XVisualInfo *desktop_vi = NULL;
const char *env;
setup_options();
......@@ -513,15 +512,6 @@ static BOOL process_attach(void)
}
}
if (!screen_depth) screen_depth = DefaultDepthOfScreen( screen );
/* If OpenGL is available, change the default visual, etc as necessary */
if ((desktop_vi = X11DRV_setup_opengl_visual( display )))
{
visual = desktop_vi->visual;
screen = ScreenOfDisplay(display, desktop_vi->screen);
screen_depth = desktop_vi->depth;
XFree(desktop_vi);
}
screen_bpp = depth_to_bpp( screen_depth );
XInternAtoms( display, (char **)atom_names, NB_XATOMS - FIRST_XATOM, False, X11DRV_Atoms );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment