comparison Framework/Viewport/WebGLViewport.h @ 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 6abd819aa534
comparison
equal deleted inserted replaced
1345:0d6a01ffa1dd 1346:df8bf351c23f
28 { 28 {
29 class WebGLViewport : public WebAssemblyViewport 29 class WebGLViewport : public WebAssemblyViewport
30 { 30 {
31 private: 31 private:
32 OpenGL::WebAssemblyOpenGLContext context_; 32 OpenGL::WebAssemblyOpenGLContext context_;
33 33
34 WebGLViewport(const std::string& canvasId); 34 WebGLViewport(const std::string& canvasId, bool enableEmscriptenMouseEvents);
35 35
36 protected: 36 protected:
37 virtual void Paint(ICompositor& compositor, 37 virtual void Paint(ICompositor& compositor,
38 ViewportController& controller) ORTHANC_OVERRIDE; 38 ViewportController& controller) ORTHANC_OVERRIDE;
39 39
40 virtual void UpdateSize(ICompositor& compositor) ORTHANC_OVERRIDE; 40 virtual void UpdateSize(ICompositor& compositor) ORTHANC_OVERRIDE;
41 41
42 public: 42 public:
43 static boost::shared_ptr<WebGLViewport> Create(const std::string& canvasId); 43 static boost::shared_ptr<WebGLViewport> Create(const std::string& canvasId, bool enableEmscriptenMouseEvents = true);
44 44
45 virtual ~WebGLViewport(); 45 virtual ~WebGLViewport();
46 46
47 bool IsContextLost() 47 bool IsContextLost()
48 { 48 {