Esempio n. 1
0
func OpenSurface(name string) (*Surface, error) {
	img, err := glimage.OpenImage(name)
	if err != nil {
		return nil, err
	}
	return LoadSurface(img)
}
Esempio n. 2
0
// OpenTexture opens an image, converts it into a OpenGL compatible image format and calls LoadTexture.
// Supported formats: bmp, tiff, gif, jpeg, png
func OpenTexture(name string) (*Texture, error) {
	img, err := glimage.OpenImage(name)
	if err != nil {
		return nil, err
	}
	return LoadTexture(img)
}