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

Method InitGraphics

vgpu/system.go:73–82  ·  view source on GitHub ↗

InitGraphics initializes the System for graphics use, using the graphics device from the Surface associated with this system or another device can be initialized by calling sy.Device.Init(gp, vk.QueueGraphicsBit)

(gp *GPU, name string, dev *Device)

Source from the content-addressed store, hash-verified

71// or another device can be initialized by calling
72// sy.Device.Init(gp, vk.QueueGraphicsBit)
73func (sy *System) InitGraphics(gp *GPU, name string, dev *Device) error {
74 sy.GPU = gp
75 sy.Render.Sys = sy
76 sy.Name = name
77 sy.Compute = false
78 sy.Device = *dev
79 sy.InitCmd()
80 sy.Mem.Init(gp, &sy.Device)
81 return nil
82}
83
84// InitCompute initializes the System for compute functionality,
85// which creates its own Compute device.

Callers 5

NewGraphicsSystemMethod · 0.95
ConfigSurfaceMethod · 0.80
ConfigFrameMethod · 0.80
mainFunction · 0.80
ConfigFrameMethod · 0.80

Calls 2

InitCmdMethod · 0.95
InitMethod · 0.65

Tested by

no test coverage detected