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

Method Defaults

vgpu/surface.go:72–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72func (sf *Surface) Defaults() {
73 sf.NFrames = 3 // requested, will be updated with actual
74 sf.Format.Defaults()
75 sf.Format.Set(1024, 768, vk.FormatR8g8b8a8Srgb)
76 sf.Format.SetMultisample(4) // good default
77 sf.DesiredFormats = []vk.Format{
78 vk.FormatR8g8b8a8Srgb,
79 vk.FormatB8g8r8a8Srgb,
80 // vk.FormatR8g8b8a8Unorm, // these def too dark
81 // vk.FormatB8g8r8a8Unorm,
82 }
83}
84
85// Init initializes the device and all other resources for the surface
86// based on the vulkan surface handle which must be obtained from the

Callers 1

NewSurfaceFunction · 0.95

Calls 3

SetMultisampleMethod · 0.80
DefaultsMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected