ReConfigSwapchain does a re-initialize of swapchain, freeing existing. This must be called when the window is resized. It returns false if the swapchain size is zero.
()
| 309 | // This must be called when the window is resized. |
| 310 | // It returns false if the swapchain size is zero. |
| 311 | func (sf *Surface) ReConfigSwapchain() bool { |
| 312 | sf.FreeSwapchain() |
| 313 | if !sf.ConfigSwapchain() { |
| 314 | return false |
| 315 | } |
| 316 | sf.Render.SetSize(sf.Format.Size) |
| 317 | sf.ReConfigFrames() |
| 318 | return true |
| 319 | } |
| 320 | |
| 321 | // SetRender sets the Render and updates frames accordingly |
| 322 | func (sf *Surface) SetRender(rp *Render) { |
no test coverage detected