comparison Framework/Viewport/SdlViewport.h @ 909:7a7e4e1f558f

SdlCairo resizable
author Alain Mazy <alain@mazy.be>
date Thu, 18 Jul 2019 09:41:10 +0200
parents 722ee73e6ba2
children 685c9a2d115f
comparison
equal deleted inserted replaced
908:2f16ad9d30ad 909:7a7e4e1f558f
56 { 56 {
57 57
58 } 58 }
59 59
60 virtual SdlWindow& GetWindow() = 0; 60 virtual SdlWindow& GetWindow() = 0;
61
62 virtual void UpdateSize(unsigned int width,
63 unsigned int height) = 0;
61 }; 64 };
62 65
63 class SdlOpenGLViewport : public SdlViewport 66 class SdlOpenGLViewport : public SdlViewport
64 { 67 {
65 private: 68 private:
85 } 88 }
86 89
87 virtual SdlWindow& GetWindow() 90 virtual SdlWindow& GetWindow()
88 { 91 {
89 return context_.GetWindow(); 92 return context_.GetWindow();
93 }
94
95 virtual void UpdateSize(unsigned int width,
96 unsigned int height)
97 {
98 // nothing to do in OpenGL, the OpenGLCompositor::UpdateSize will be called automatically
90 } 99 }
91 }; 100 };
92 101
93 102
94 class SdlCairoViewport : public SdlViewport 103 class SdlCairoViewport : public SdlViewport
122 return window_; 131 return window_;
123 } 132 }
124 133
125 virtual void Refresh(); 134 virtual void Refresh();
126 135
136 virtual void UpdateSize(unsigned int width,
137 unsigned int height);
138
139 private:
140 void UpdateSdlSurfaceSize(unsigned int width,
141 unsigned int height);
127 }; 142 };
128 } 143 }