internal/graphicsdriver/metal/ca/ca.go
func (ml MetalLayer) SetPixelFormat(pf mtl.PixelFormat) {
	e := C.MetalLayer_SetPixelFormat(ml.metalLayer, C.uint16_t(pf))
	if e != nil {
		panic(errors.New(C.GoString(e)))
	}
}
func (ml MetalLayer) SetPixelFormat(pf mtl.PixelFormat) {
	e := C.MetalLayer_SetPixelFormat(ml.metalLayer, C.uint16_t(pf))
	if e != nil {
		panic(errors.New(C.GoString(e)))
	}
}
func ( ml MetalLayer ) SetPixelFormat ( pf mtl . PixelFormat ) { e := C . MetalLayer_SetPixelFormat ( ml . metalLayer , C . uint16_t ( pf ) ) if e != nil { panic ( errors . New ( C . GoString ( e ) ) ) } }
// SetPixelFormat controls the pixel format of textures for rendering layer content.
//
// The pixel format for a Metal layer must be PixelFormatBGRA8UNorm, PixelFormatBGRA8UNormSRGB,
// PixelFormatRGBA16Float, PixelFormatBGRA10XR, or PixelFormatBGRA10XRSRGB.
// SetPixelFormat panics for other values.
//
// Reference: https://developer.apple.com/documentation/quartzcore/cametallayer/1478155-pixelformat.
SetPixelFormat controls the pixel format of textures for rendering layer content . The pixel format for a Metal layer must be PixelFormatBGRA8UNorm PixelFormatBGRA8UNormSRGB PixelFormatRGBA16Float PixelFormatBGRA10XR or PixelFormatBGRA10XRSRGB . SetPixelFormat panics for other values . Reference : https : // developer . apple . com / documentation / quartzcore / cametallayer / 1478155 - pixelformat .