On 23 January 2015 at 07:59, Tapani Pälli <tapani.pa...@intel.com> wrote: > Patch creates and initializes pp::Graphics3D context for OpenGL ES 2.0. > > Signed-off-by: Tapani Pälli <tapani.pa...@intel.com> > --- [...]
> @@ -37,6 +43,10 @@ nacl_container_dtor(waffle::nacl_container *nc) > { > if (!nc) > return; > + + nc->ctx = pp::Graphics3D(); I would guess that you want to nuke the Graphics3D ctx first ? > + nc->glSetCurrentContextPPAPI(0); > + nc->glTerminatePPAPI(); > + Imho the teardown should be symmetrical to the setup - i.e. create a new function nacl_context_fini (or similar) which has the above three calls, and gets executed in nacl_context_destroy. > +static bool > +nacl_context_init(waffle::nacl_container *nc, struct nacl_config *cfg) > +{ [...] > + > + dlclose(glapi); > + Calling the function pointers after closing the handle causes segfaults on my Archlinux machine. Am I the only one or does nacl has something special in this regard ? > diff --git a/src/waffle/nacl/nacl_container.h > b/src/waffle/nacl/nacl_container.h > index 61d935c..81472cc 100644 > --- a/src/waffle/nacl/nacl_container.h > +++ b/src/waffle/nacl/nacl_container.h > @@ -25,13 +25,21 @@ > > #ifdef __cplusplus > > +#include <dlfcn.h> > + > extern "C" { > #endif > > +#include "nacl_config.h" > +#include "wcore_error.h" > + > +#define NACL_GLES2_LIBRARY "libppapi_gles2.so" > + Please move the above hunk to nacl_container.c. -Emil _______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle