]> git.cworth.org Git - apitrace/blobdiff - retrace/glws_wgl.cpp
glretrace: Silence warning on wgl.
[apitrace] / retrace / glws_wgl.cpp
index de6c7d6b546161fe4c1968cb1f3305632cb1dee9..cdcb3a2bc07c28df543a381d229aa938ff384332 100644 (file)
@@ -188,14 +188,14 @@ public:
             return;
         }
 
+        Drawable::resize(w, h);
+
         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) {
@@ -304,7 +304,8 @@ cleanup(void) {
 Visual *
 createVisual(bool doubleBuffer, Profile profile) {
     if (profile != PROFILE_COMPAT &&
-        profile != PROFILE_CORE) {
+        profile != PROFILE_CORE &&
+        profile != PROFILE_ES2) {
         return NULL;
     }
 
@@ -325,12 +326,20 @@ Context *
 createContext(const Visual *visual, Context *shareContext, Profile profile, bool debug)
 {
     if (profile != PROFILE_COMPAT &&
-        profile != PROFILE_CORE) {
+        profile != PROFILE_CORE &&
+        profile != PROFILE_ES2) {
         return NULL;
     }
 
-    if (profile == PROFILE_CORE) {
+    switch (profile) {
+    case PROFILE_CORE:
         std::cerr << "warning: ignoring OpenGL core profile request\n";
+        break;
+    case PROFILE_ES2:
+        std::cerr << "warning: ignoring OpenGL ES 2.0 profile request\n";
+        break;
+    default:
+        break;
     }
 
     return new WglContext(visual, profile, static_cast<WglContext *>(shareContext));