X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglws_wgl.cpp;h=cdcb3a2bc07c28df543a381d229aa938ff384332;hb=b4fb7a4628a0c14b8124dbcd1f97749c0276bf81;hp=878726b87f99853d9c92bff014601c1112577338;hpb=315eea7da476434c9c785d745ac4fe6731fb47e0;p=apitrace diff --git a/retrace/glws_wgl.cpp b/retrace/glws_wgl.cpp index 878726b..cdcb3a2 100644 --- a/retrace/glws_wgl.cpp +++ b/retrace/glws_wgl.cpp @@ -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) { @@ -303,7 +303,9 @@ cleanup(void) { Visual * createVisual(bool doubleBuffer, Profile profile) { - if (profile != PROFILE_COMPAT) { + if (profile != PROFILE_COMPAT && + profile != PROFILE_CORE && + profile != PROFILE_ES2) { return NULL; } @@ -323,10 +325,23 @@ createDrawable(const Visual *visual, int width, int height, bool pbuffer) Context * createContext(const Visual *visual, Context *shareContext, Profile profile, bool debug) { - if (profile != PROFILE_COMPAT) { + if (profile != PROFILE_COMPAT && + profile != PROFILE_CORE && + profile != PROFILE_ES2) { return NULL; } + 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(shareContext)); }