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

Method SetSize

vgpu/render.go:211–223  ·  view source on GitHub ↗

SetSize sets updated size of the render target -- resizes depth and multi buffers as needed

(size image.Point)

Source from the content-addressed store, hash-verified

209
210// SetSize sets updated size of the render target -- resizes depth and multi buffers as needed
211func (rp *Render) SetSize(size image.Point) {
212 rp.Format.Size = size
213 if rp.HasDepth {
214 if rp.Depth.SetSize(size) {
215 rp.Depth.ConfigDepthView()
216 }
217 }
218 if rp.HasMulti {
219 if rp.Multi.SetSize(size) {
220 rp.Multi.ConfigStdView()
221 }
222 }
223}
224
225// SetClearColor sets the RGBA colors to set when starting new render
226func (rp *Render) SetClearColor(r, g, b, a float32) {

Callers

nothing calls this directly

Calls 3

ConfigDepthViewMethod · 0.80
ConfigStdViewMethod · 0.80
SetSizeMethod · 0.65

Tested by

no test coverage detected