comparison Framework/Scene2D/OpenGLCompositor.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 64e5f3ff6360
children 1091b2adeb5a
comparison
equal deleted inserted replaced
939:ab90628e70d9 942:685c9a2d115f
28 #include "Internals/OpenGLLinesProgram.h" 28 #include "Internals/OpenGLLinesProgram.h"
29 #include "Internals/OpenGLTextProgram.h" 29 #include "Internals/OpenGLTextProgram.h"
30 30
31 namespace OrthancStone 31 namespace OrthancStone
32 { 32 {
33 class OpenGLCompositor : 33 class OpenGLCompositor : public ICompositor, private Internals::CompositorHelper::IRendererFactory
34 public ICompositor,
35 private Internals::CompositorHelper::IRendererFactory
36 { 34 {
37 private: 35 private:
38 class Font; 36 class Font;
39 37
40 typedef std::map<size_t, Font*> Fonts; 38 typedef std::map<size_t, Font*> Fonts;
49 unsigned int canvasWidth_; 47 unsigned int canvasWidth_;
50 unsigned int canvasHeight_; 48 unsigned int canvasHeight_;
51 49
52 const Font* GetFont(size_t fontIndex) const; 50 const Font* GetFont(size_t fontIndex) const;
53 51
54 virtual Internals::CompositorHelper::ILayerRenderer* Create(const ISceneLayer& layer); 52 virtual Internals::CompositorHelper::ILayerRenderer* Create(const ISceneLayer& layer) ORTHANC_OVERRIDE;
55 53
56 public: 54 public:
57 OpenGLCompositor(OpenGL::IOpenGLContext& context, 55 OpenGLCompositor(OpenGL::IOpenGLContext& context,
58 const Scene2D& scene); 56 const Scene2D& scene);
59 57
60 virtual ~OpenGLCompositor(); 58 virtual ~OpenGLCompositor();
61 59
62 virtual void Refresh(); 60 virtual void Refresh() ORTHANC_OVERRIDE;
63 61
64 void SetFont(size_t index, 62 void SetFont(size_t index,
65 const GlyphBitmapAlphabet& dict); 63 const GlyphBitmapAlphabet& dict);
66 64
67 #if ORTHANC_ENABLE_LOCALE == 1 65 #if ORTHANC_ENABLE_LOCALE == 1
68 void SetFont(size_t index, 66 void SetFont(size_t index,
69 Orthanc::EmbeddedResources::FileResourceId resource, 67 Orthanc::EmbeddedResources::FileResourceId resource,
70 unsigned int fontSize, 68 unsigned int fontSize,
71 Orthanc::Encoding codepage); 69 Orthanc::Encoding codepage) ORTHANC_OVERRIDE;
72 #endif 70 #endif
73 71
74 virtual unsigned int GetCanvasWidth() const 72 virtual unsigned int GetCanvasWidth() const ORTHANC_OVERRIDE
75 { 73 {
76 return canvasWidth_; 74 return canvasWidth_;
77 } 75 }
78 76
79 virtual unsigned int GetCanvasHeight() const 77 virtual unsigned int GetCanvasHeight() const ORTHANC_OVERRIDE
80 { 78 {
81 return canvasHeight_; 79 return canvasHeight_;
82 } 80 }
83 }; 81 };
84 } 82 }