Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebAssemblyViewport.h @ 942:685c9a2d115f
Added missing ORTHANC_OVERRIDE + preparation for lost GL context handling + stubs for GL context event handlers
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 05 Aug 2019 12:27:27 +0200 |
parents | a6c12fe88bcb |
children | 1091b2adeb5a |
comparison
equal
deleted
inserted
replaced
939:ab90628e70d9 | 942:685c9a2d115f |
---|---|
45 | 45 |
46 class WebAssemblyOpenGLViewport : public WebAssemblyViewport | 46 class WebAssemblyOpenGLViewport : public WebAssemblyViewport |
47 { | 47 { |
48 private: | 48 private: |
49 OpenGL::WebAssemblyOpenGLContext context_; | 49 OpenGL::WebAssemblyOpenGLContext context_; |
50 OpenGLCompositor compositor_; | 50 std::auto_ptr<OpenGLCompositor> compositor_; |
51 | 51 |
52 public: | 52 public: |
53 WebAssemblyOpenGLViewport(const std::string& canvas); | 53 WebAssemblyOpenGLViewport(const std::string& canvas); |
54 | 54 |
55 WebAssemblyOpenGLViewport(const std::string& canvas, | 55 WebAssemblyOpenGLViewport(const std::string& canvas, |
58 // This function must be called each time the browser window is resized | 58 // This function must be called each time the browser window is resized |
59 void UpdateSize(); | 59 void UpdateSize(); |
60 | 60 |
61 virtual ICompositor& GetCompositor() | 61 virtual ICompositor& GetCompositor() |
62 { | 62 { |
63 return compositor_; | 63 return *compositor_; |
64 } | 64 } |
65 | |
66 bool OpenGLContextLost(); | |
67 bool OpenGLContextRestored(); | |
68 | |
69 private: | |
70 void RegisterContextCallbacks(); | |
65 }; | 71 }; |
66 | 72 |
67 class WebAssemblyCairoViewport : public WebAssemblyViewport | 73 class WebAssemblyCairoViewport : public WebAssemblyViewport |
68 { | 74 { |
69 private: | 75 private: |