Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebGLViewport.h @ 1331:ab81ee8fce1f broker
- Viewport is not passed and stored as a shared_ptr instead
of raw reference.
- ViewportController can now be injected with an undo
stack (not a ctor param anymore, as a preparation for the
move of the undo stack to an interactor)
- Added (temp) flag to disable emscripten events registration
in the WebAssemblyViewport (because legacy client code
deals with them directly)
- Added emscripten_clear_timeout in ~WebGLViewportsRegistry
- Removed GenericToolbox::HoldingRef whose responsibility is
better served with proper callback un-registration.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 30 Mar 2020 14:23:46 +0200 |
parents | cbfdba08e039 |
children | df8bf351c23f |
comparison
equal
deleted
inserted
replaced
1329:8d3e669f01a2 | 1331:ab81ee8fce1f |
---|---|
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); | |
35 | |
34 protected: | 36 protected: |
35 virtual void Paint(ICompositor& compositor, | 37 virtual void Paint(ICompositor& compositor, |
36 ViewportController& controller) ORTHANC_OVERRIDE; | 38 ViewportController& controller) ORTHANC_OVERRIDE; |
37 | 39 |
38 virtual void UpdateSize(ICompositor& compositor) ORTHANC_OVERRIDE; | 40 virtual void UpdateSize(ICompositor& compositor) ORTHANC_OVERRIDE; |
39 | 41 |
40 public: | 42 public: |
41 WebGLViewport(const std::string& canvasId); | 43 static boost::shared_ptr<WebGLViewport> Create(const std::string& canvasId); |
42 | |
43 WebGLViewport(const std::string& canvasId, | |
44 boost::weak_ptr<UndoStack> undoStackW); | |
45 | |
46 WebGLViewport(const std::string& canvasId, | |
47 const Scene2D& scene); | |
48 | 44 |
49 virtual ~WebGLViewport(); | 45 virtual ~WebGLViewport(); |
50 | 46 |
51 bool IsContextLost() | 47 bool IsContextLost() |
52 { | 48 { |