diff options
author | José Fonseca <jfonseca@vmware.com> | 2013-10-29 19:22:04 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-10-29 19:22:04 +0000 |
commit | 0d3dd0b3c03fe3328ae39fc6bbb177d4d982cc21 (patch) | |
tree | 7e822636037b1105f1964e0d5ab15ab3ae4507f0 /retrace/glws_egl_xlib.cpp | |
parent | 797901bd8e97bae66d45c2fe84c5bf762964294d (diff) |
glretrace: Cleanup profile specification.
We were specifying the profile both on visual and on context creation,
and they had to be consistents for things to work. So instead specify
profile only when creating the visual.
Diffstat (limited to 'retrace/glws_egl_xlib.cpp')
-rw-r--r-- | retrace/glws_egl_xlib.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/retrace/glws_egl_xlib.cpp b/retrace/glws_egl_xlib.cpp index 04e1d2e1..125d5f4f 100644 --- a/retrace/glws_egl_xlib.cpp +++ b/retrace/glws_egl_xlib.cpp @@ -49,7 +49,8 @@ public: EGLConfig config; XVisualInfo *visinfo; - EglVisual() : + EglVisual(Profile prof) : + Visual(prof), config(0), visinfo(0) {} @@ -256,8 +257,8 @@ class EglContext : public Context public: EGLContext context; - EglContext(const Visual *vis, Profile prof, EGLContext ctx) : - Context(vis, prof), + EglContext(const Visual *vis, EGLContext ctx) : + Context(vis), context(ctx) {} @@ -317,7 +318,7 @@ cleanup(void) { Visual * createVisual(bool doubleBuffer, Profile profile) { - EglVisual *visual = new EglVisual(); + EglVisual *visual = new EglVisual(profile); // possible combinations const EGLint api_bits_gl[7] = { EGL_OPENGL_BIT | EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT, @@ -400,8 +401,9 @@ createDrawable(const Visual *visual, int width, int height, bool pbuffer) } Context * -createContext(const Visual *_visual, Context *shareContext, Profile profile, bool debug) +createContext(const Visual *_visual, Context *shareContext, bool debug) { + Profile profile = _visual->profile; const EglVisual *visual = static_cast<const EglVisual *>(_visual); EGLContext share_context = EGL_NO_CONTEXT; EGLContext context; @@ -443,7 +445,7 @@ createContext(const Visual *_visual, Context *shareContext, Profile profile, boo eglBindAPI(api); - return new EglContext(visual, profile, context); + return new EglContext(visual, context); } bool |