func (p *PixelFormat) SetPalette(pal *Palette) error { if C.SDL_SetPixelFormatPalette(p.c(), pal.c()) != 0 { return getError() } return nil }
// SetPalette sets the palette for format. // PixelFormat (https://wiki.libsdl.org/SDL_SetPixelFormatPalette) func (format *PixelFormat) SetPalette(palette *Palette) error { r := C.SDL_SetPixelFormatPalette((*C.SDL_PixelFormat)(unsafe.Pointer(format)), (*C.SDL_Palette)(unsafe.Pointer(palette))) if r != 0 { return GetError() } return nil }