comparison Framework/Viewport/WebGLViewport.cpp @ 1346:df8bf351c23f broker

The flag that allows the WebAssemblyViewport to **not** register the mouse events in the canvas (in case they are handled by other means) is now correctly passed down from the factory method.
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 06 Apr 2020 16:57:56 +0200
parents ab81ee8fce1f
children 1b8e37770d78
comparison
equal deleted inserted replaced
1345:0d6a01ffa1dd 1346:df8bf351c23f
77 throw; 77 throw;
78 } 78 }
79 } 79 }
80 } 80 }
81 81
82 WebGLViewport::WebGLViewport(const std::string& canvasId) : 82 WebGLViewport::WebGLViewport(const std::string& canvasId, bool enableEmscriptenMouseEvents) :
83 WebAssemblyViewport(canvasId), 83 WebAssemblyViewport(canvasId,enableEmscriptenMouseEvents),
84 context_(GetFullCanvasId()) 84 context_(GetFullCanvasId())
85 { 85 {
86 AcquireCompositor(new OpenGLCompositor(context_)); 86 AcquireCompositor(new OpenGLCompositor(context_));
87 } 87 }
88 88
89 boost::shared_ptr<WebGLViewport> WebGLViewport::Create( 89 boost::shared_ptr<WebGLViewport> WebGLViewport::Create(
90 const std::string& canvasId) 90 const std::string& canvasId, bool enableEmscriptenMouseEvents)
91 { 91 {
92 boost::shared_ptr<WebGLViewport> that = 92 boost::shared_ptr<WebGLViewport> that = boost::shared_ptr<WebGLViewport>(
93 boost::shared_ptr<WebGLViewport>(new WebGLViewport(canvasId)); 93 new WebGLViewport(canvasId, enableEmscriptenMouseEvents));
94
94 that->WebAssemblyViewport::PostConstructor(); 95 that->WebAssemblyViewport::PostConstructor();
95 return that; 96 return that;
96 } 97 }
97 98
98 WebGLViewport::~WebGLViewport() 99 WebGLViewport::~WebGLViewport()