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

Function NewGraphicsDevice

vgpu/device.go:134–140  ·  view source on GitHub ↗

NewGraphicsDevice returns a new Graphics Device, on given GPU. This is suitable for no display offscreen rendering. Typically use the Surface Device for rendering to a display window.

(gp *GPU)

Source from the content-addressed store, hash-verified

132// This is suitable for no display offscreen rendering.
133// Typically use the Surface Device for rendering to a display window.
134func NewGraphicsDevice(gp *GPU) (*Device, error) {
135 dev := &Device{}
136 if err := dev.Init(gp, vk.QueueGraphicsBit); err != nil {
137 return nil, err
138 }
139 return dev, nil
140}

Callers 1

NoDisplayGPUFunction · 0.85

Calls 1

InitMethod · 0.95

Tested by

no test coverage detected