X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglws_glx.cpp;h=d150aa609c5a2acb53c71633c9b97fb0ab77a351;hb=1e20dc18f72de1002d4e5243f98137810d11eec8;hp=1494d060d7245cae687637db7c5452cc6a6c2f2b;hpb=bcb5850afb381e4814d247917311494d7edd2e91;p=apitrace diff --git a/retrace/glws_glx.cpp b/retrace/glws_glx.cpp index 1494d06..d150aa6 100644 --- a/retrace/glws_glx.cpp +++ b/retrace/glws_glx.cpp @@ -183,8 +183,6 @@ public: Drawable::resize(w, h); - XResizeWindow(display, window, w, h); - // Tell the window manager to respect the requested size XSizeHints size_hints; size_hints.max_width = size_hints.min_width = w; @@ -192,6 +190,8 @@ public: size_hints.flags = PMinSize | PMaxSize; XSetWMNormalHints(display, window, &size_hints); + XResizeWindow(display, window, w, h); + waitForEvent(ConfigureNotify); glXWaitX(); @@ -267,7 +267,8 @@ cleanup(void) { Visual * createVisual(bool doubleBuffer, Profile profile) { if (profile != PROFILE_COMPAT && - profile != PROFILE_CORE) { + profile != PROFILE_CORE && + profile != PROFILE_ES2) { return NULL; } @@ -342,6 +343,9 @@ createContext(const Visual *_visual, Context *shareContext, Profile profile, boo switch (profile) { case PROFILE_COMPAT: break; + case PROFILE_ES2: + attribs.add(GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_ES2_PROFILE_BIT_EXT); + break; case PROFILE_CORE: // XXX: This will invariable return a 3.2 context, when supported. // We probably should have a PROFILE_CORE_XX per version.