History

Don't create share context for web while running nsight

Brad Davis committed 8 years ago

Commit 17899d51 parent 6313e3e1 file · +7 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+7−5
@@ -2225,11 +2225,13 @@ void Application::initializeGL() { · 2224 unmodified lines
2225 2225
2226 gl::initModuleGl();2226 gl::initModuleGl();
2227 _glWidget->makeCurrent();2227 _glWidget->makeCurrent();
2228 _chromiumShareContext = new OffscreenGLCanvas();2228 if (!nsightActive()) {
2229 _chromiumShareContext->setObjectName("ChromiumShareContext");2229 _chromiumShareContext = new OffscreenGLCanvas();
2230 _chromiumShareContext->create(_glWidget->qglContext());2230 _chromiumShareContext->setObjectName("ChromiumShareContext");
2231 _chromiumShareContext->makeCurrent();2231 _chromiumShareContext->create(_glWidget->qglContext());
2232 qt_gl_set_global_share_context(_chromiumShareContext->getContext());2232 _chromiumShareContext->makeCurrent();
2233 qt_gl_set_global_share_context(_chromiumShareContext->getContext());
2234 }
2233 2235
2234 _glWidget->makeCurrent();2236 _glWidget->makeCurrent();
2235 gpu::Context::init<gpu::gl::GLBackend>();2237 gpu::Context::init<gpu::gl::GLBackend>();