]> git.cworth.org Git - apitrace/blobdiff - glws_wgl.cpp
Parse doubles to a new Double class rather than to the Float class.
[apitrace] / glws_wgl.cpp
index adc99578e3b7aa9cd885c2de41458301856dec52..4b5870ef75c97378967ebeb02f22c6245849b2bd 100644 (file)
@@ -136,21 +136,28 @@ public:
     
     void
     resize(int w, int h) {
-        Drawable::resize(w, h);
+        if (w == width && h == height) {
+            return;
+        }
+
         RECT rClient, rWindow;
         GetClientRect(hWnd, &rClient);
         GetWindowRect(hWnd, &rWindow);
         w += (rWindow.right  - rWindow.left) - rClient.right;
         h += (rWindow.bottom - rWindow.top)  - rClient.bottom;
         SetWindowPos(hWnd, NULL, rWindow.left, rWindow.top, w, h, SWP_NOMOVE);
+
+        Drawable::resize(w, h);
     }
 
     void show(void) {
-        if (!visible) {
-            ShowWindow(hWnd, SW_SHOW);
-
-            Drawable::show();
+        if (visible) {
+            return;
         }
+
+        ShowWindow(hWnd, SW_SHOW);
+
+        Drawable::show();
     }
 
     void swapBuffers(void) {
@@ -203,8 +210,12 @@ createDrawable(const Visual *visual, int width, int height)
 }
 
 Context *
-createContext(const Visual *visual, Context *shareContext)
+createContext(const Visual *visual, Context *shareContext, Profile profile)
 {
+    if (profile != PROFILE_COMPAT) {
+        return NULL;
+    }
+
     return new WglContext(visual, dynamic_cast<WglContext *>(shareContext));
 }