Golang C.SDL_DisplayFormat类(方法)实例源码

下面列出了Golang C.SDL_DisplayFormat 类(方法)源码代码实例,从而了解它的用法。

作者:gnanderso    项目:Go-SD   
// 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))
}

作者:kearsle    项目:Go-SD   
// 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)
}

作者:beora    项目:fung   
// 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)
}


问题


面经


文章

微信
公众号

扫码关注公众号