MCPcopy Create free account
hub / github.com/cogentcore/core / ReConfigSwapchain

Method ReConfigSwapchain

vgpu/surface.go:311–319  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

309// This must be called when the window is resized.
310// It returns false if the swapchain size is zero.
311func (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
322func (sf *Surface) SetRender(rp *Render) {

Callers 1

AcquireNextImageMethod · 0.95

Calls 4

FreeSwapchainMethod · 0.95
ConfigSwapchainMethod · 0.95
ReConfigFramesMethod · 0.95
SetSizeMethod · 0.65

Tested by

no test coverage detected