Add new functions

This commit is contained in:
Milan Nikolic 2021-05-25 21:35:29 +02:00
parent a9172dcaf0
commit 6cfece1e81
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
2 changed files with 78 additions and 31 deletions

View file

@ -123,15 +123,6 @@ func GetImageData(img *Image) []Color {
return (*[1 << 24]Color)(unsafe.Pointer(ret))[0 : img.Width*img.Height]
}
// GetPixelDataSize - Get pixel data size in bytes (image or texture)
func GetPixelDataSize(width, height, format int32) int32 {
cwidth := (C.int)(width)
cheight := (C.int)(height)
cformat := (C.int)(format)
ret := C.GetPixelDataSize(cwidth, cheight, cformat)
return int32(ret)
}
// GetTextureData - Get pixel data from GPU texture and return an Image
func GetTextureData(texture Texture2D) *Image {
ctexture := texture.cptr()