diff options
Diffstat (limited to 'gpu/demos/framework/plugin.cc')
-rw-r--r-- | gpu/demos/framework/plugin.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu/demos/framework/plugin.cc b/gpu/demos/framework/plugin.cc index b5278b1..dafcffe 100644 --- a/gpu/demos/framework/plugin.cc +++ b/gpu/demos/framework/plugin.cc @@ -92,7 +92,11 @@ Plugin::Plugin(NPP npp) } Plugin::~Plugin() { + // Destroy demo while GL context is current and before it is destroyed. + pglMakeCurrent(pgl_context_); + demo_.reset(); pglMakeCurrent(NULL); + pglDestroyContext(pgl_context_); } |