comparison Framework/Viewport/WebAssemblyViewport.h @ 905:88bf49aebc13

introduced ICompositor and allow SdlViewport to work with a CairoCompositor (to run on machines without OpenGL drivers)
author Alain Mazy <alain@mazy.be>
date Wed, 17 Jul 2019 16:56:53 +0200
parents 0aff28f15ea2
children 722ee73e6ba2
comparison
equal deleted inserted replaced
904:ecdb2ceaa925 905:88bf49aebc13
37 WebAssemblyViewport(const std::string& canvas); 37 WebAssemblyViewport(const std::string& canvas);
38 38
39 WebAssemblyViewport(const std::string& canvas, 39 WebAssemblyViewport(const std::string& canvas,
40 boost::shared_ptr<Scene2D>& scene); 40 boost::shared_ptr<Scene2D>& scene);
41 41
42 virtual void Refresh()
43 {
44 compositor_.Refresh();
45 }
46
47 virtual unsigned int GetCanvasWidth() const
48 {
49 return context_.GetCanvasWidth();
50 }
51
52 virtual unsigned int GetCanvasHeight() const
53 {
54 return context_.GetCanvasHeight();
55 }
56
57 // This function must be called each time the browser window is resized 42 // This function must be called each time the browser window is resized
58 void UpdateSize(); 43 void UpdateSize();
59 44
60 OpenGLCompositor& GetCompositor() 45 ICompositor& GetCompositor()
61 { 46 {
62 return compositor_; 47 return compositor_;
63 } 48 }
64 }; 49 };
65 } 50 }