]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
converted drawing code from R_Mesh_Draw to R_Mesh_Draw_GetBuffer
[xonotic/darkplaces.git] / vid_wgl.c
index 12de0903703f94fbe565f7872ee557ef85cca23d..b9a0027d31c72748fbe57d48ec7096c43c40d424 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -57,11 +57,6 @@ lmode_t      lowresmodes[] = {
        {512, 384},
 };
 
-const char *gl_vendor;
-const char *gl_renderer;
-const char *gl_version;
-const char *gl_extensions;
-
 qboolean scr_skipupdate;
 
 static vmode_t modelist[MAX_MODE_LIST];
@@ -406,6 +401,9 @@ void VID_Shutdown (void)
                if (hRC)
                        wglDeleteContext(hRC);
 
+               // close the library before we get rid of the window
+               GL_CloseLibrary();
+
                if (hDC && mainwindow)
                        ReleaseDC(mainwindow, hDC);
 
@@ -542,7 +540,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
        static BOOL     sound_active;
 
        vid_activewindow = fActive;
-       Minimized = minimize;
+       vid_hidden = minimize;
 
 // enable/disable sound on focus gain/loss
        if (!vid_activewindow && sound_active)
@@ -1068,6 +1066,8 @@ void VID_Init (void)
        HDC hdc;
        DEVMODE devmode;
 
+       GL_OpenLibrary();
+
        memset(&devmode, 0, sizeof(devmode));
 
        Cmd_AddCommand ("vid_nummodes", VID_NumModes_f);