Пример #1
0
// Converts a surface to the display format
func DisplayFormat(src *Surface) *Surface {
	p := C.SDL_DisplayFormat((*C.SDL_Surface)(cast(src)))
	return (*Surface)(cast(p))
}
Пример #2
0
// Converts a surface to the display format
func (s *Surface) DisplayFormat() *Surface {
	s.mutex.RLock()
	p := C.SDL_DisplayFormat(s.cSurface)
	s.mutex.RUnlock()
	return wrap(p)
}
Пример #3
0
// This function takes a surface and copies it to a new surface of the
// pixel format and colors of the video framebuffer, suitable for fast
// blitting onto the display surface.
//
// If you want to take advantage of hardware colorkey or alpha blit
// acceleration, you should set the colorkey and alpha value before
// calling this function.
//
// If the conversion fails or runs out of memory, it returns NULL
func displayFormat(surface *C.SDL_Surface) *C.SDL_Surface {
	return C.SDL_DisplayFormat(surface)
}