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

Method CopyToImage

vgpu/framebuffer.go:134–137  ·  view source on GitHub ↗

CopyToImage copies the current framebuffer image to given image dest using given command buffer which must have the cmdBegin called already.

(toImg *Image, dev vk.Device, cmd vk.CommandBuffer)

Source from the content-addressed store, hash-verified

132// CopyToImage copies the current framebuffer image to given image dest
133// using given command buffer which must have the cmdBegin called already.
134func (fb *Framebuffer) CopyToImage(toImg *Image, dev vk.Device, cmd vk.CommandBuffer) {
135 toImg.TransitionForDst(cmd, vk.PipelineStageTransferBit) // no idea why, but SaschaWillems does
136 vk.CmdCopyImage(cmd, fb.Image.Image, vk.ImageLayoutTransferSrcOptimal, toImg.Image, vk.ImageLayoutTransferDstOptimal, 1, []vk.ImageCopy{toImg.CopyImageRec()})
137}

Callers 1

SetFrameImageMethod · 0.80

Calls 2

TransitionForDstMethod · 0.80
CopyImageRecMethod · 0.80

Tested by

no test coverage detected