1
0
Fork 0
forked from fte/fteqw

Trying to fix bsd gl support.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@960 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-04-18 05:35:23 +00:00
parent d1d52a49ac
commit 998efee8c3

View file

@ -482,7 +482,8 @@ printf("GLVID_Shutdown");
if (old_windowed_mouse)
uninstall_grabs();
qglXDestroyContext(vid_dpy, ctx);
if (ctx)
qglXDestroyContext(vid_dpy, ctx);
#ifdef WITH_VMODE
if (origionalapplied)
@ -822,6 +823,12 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
#endif
ctx = qglXCreateContext(vid_dpy, visinfo, NULL, True);
if (!ctx)
{
Con_Printf("Failed to create GLX context.\n");
GLVID_Shutdown();
return false;
}
qglXMakeCurrent(vid_dpy, vid_window, ctx);