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

Method Config

vgpu/render.go:84–90  ·  view source on GitHub ↗

Config configures the render pass for given device, Using standard parameters for graphics rendering, based on the given image format and depth image format (pass UndefType for no depth buffer).

(dev vk.Device, imgFmt *ImageFormat, depthFmt Types, notSurface bool)

Source from the content-addressed store, hash-verified

82// based on the given image format and depth image format
83// (pass UndefType for no depth buffer).
84func (rp *Render) Config(dev vk.Device, imgFmt *ImageFormat, depthFmt Types, notSurface bool) {
85 rp.NotSurface = notSurface
86 rp.SetClearColor(0, 0, 0, 1)
87 rp.SetClearDepthStencil(1, 0)
88 rp.VkClearPass = rp.ConfigImpl(dev, imgFmt, depthFmt, true)
89 rp.VkLoadPass = rp.ConfigImpl(dev, imgFmt, depthFmt, false)
90}
91
92func (rp *Render) ConfigImpl(dev vk.Device, imgFmt *ImageFormat, depthFmt Types, clear bool) vk.RenderPass {
93 // The initial layout for the color and depth attachments will be vk.LayoutUndefined

Callers

nothing calls this directly

Calls 3

SetClearColorMethod · 0.95
SetClearDepthStencilMethod · 0.95
ConfigImplMethod · 0.95

Tested by

no test coverage detected