| 221 | namespace sfg { |
| 222 | |
| 223 | Canvas::Canvas( bool depth ) : |
| 224 | m_custom_draw_callback( std::make_shared<Signal>() ), |
| 225 | m_depth( depth ), |
| 226 | m_resize( false ) |
| 227 | { |
| 228 | m_custom_viewport = Renderer::Get().CreateViewport(); |
| 229 | SetViewport( m_custom_viewport ); |
| 230 | |
| 231 | m_custom_draw_callback->Connect( [this] { DrawRenderTexture(); } ); |
| 232 | |
| 233 | static auto checked = false; |
| 234 | |
| 235 | if( !checked ) { |
| 236 | non_legacy_supported = NonLegacyRenderer::IsAvailable(); |
| 237 | |
| 238 | checked = true; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | Canvas::~Canvas() { |
| 243 | sf::Context context; |
nothing calls this directly
no test coverage detected