X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglws_wgl.cpp;h=9244b799d4ae2566bc5ee7fd92577be40c47a6e9;hb=c037ae2b4f749aed15ede635a6b517534bc5a901;hp=878726b87f99853d9c92bff014601c1112577338;hpb=cfce638e85aa64f765bfefb7f6a1ccd4a866b6dc;p=apitrace diff --git a/retrace/glws_wgl.cpp b/retrace/glws_wgl.cpp index 878726b..9244b79 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,8 @@ cleanup(void) { Visual * createVisual(bool doubleBuffer, Profile profile) { - if (profile != PROFILE_COMPAT) { + if (profile != PROFILE_COMPAT && + profile != PROFILE_CORE) { return NULL; } @@ -323,10 +324,15 @@ 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) { return NULL; } + if (profile == PROFILE_CORE) { + std::cerr << "warning: ignoring OpenGL core profile request\n"; + } + return new WglContext(visual, profile, static_cast(shareContext)); }