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

Function NoDisplayGPU

vgpu/gpu.go:564–574  ·  view source on GitHub ↗

NoDisplayGPU Initializes the Vulkan GPU and returns that and the graphics GPU device, with given name, without connecting to the display.

(nm string)

Source from the content-addressed store, hash-verified

562// and the graphics GPU device, with given name, without connecting
563// to the display.
564func NoDisplayGPU(nm string) (*GPU, *Device, error) {
565 if err := InitNoDisplay(); err != nil {
566 return nil, nil, err
567 }
568 gp := NewGPU()
569 if err := gp.Config(nm, nil); err != nil {
570 return nil, nil, err
571 }
572 dev, err := NewGraphicsDevice(gp)
573 return gp, dev, err
574}

Callers 1

NewOffscreenSceneFunction · 0.92

Calls 4

ConfigMethod · 0.95
InitNoDisplayFunction · 0.85
NewGPUFunction · 0.85
NewGraphicsDeviceFunction · 0.85

Tested by

no test coverage detected