Bundle raylib C sources and switch to develop branch

This commit is contained in:
Milan Nikolic 2017-01-28 17:19:06 +01:00
parent e2f3bed444
commit f89d1164a5
36 changed files with 54932 additions and 193 deletions

View file

@ -193,16 +193,6 @@ func LoadImageRaw(fileName string, width int32, height int32, format TextureForm
return v
}
// Load an image from rRES file (raylib Resource)
func LoadImageFromRES(rresName string, resId int32) *Image {
crresName := C.CString(rresName)
defer C.free(unsafe.Pointer(crresName))
cresId := (C.int)(resId)
ret := C.LoadImageFromRES(crresName, cresId)
v := NewImageFromPointer(unsafe.Pointer(&ret))
return v
}
// Load an image as texture into GPU memory
func LoadTexture(fileName string) Texture2D {
cfileName := C.CString(fileName)
@ -212,27 +202,6 @@ func LoadTexture(fileName string) Texture2D {
return v
}
// Load a texture from raw data into GPU memory
func LoadTextureEx(data unsafe.Pointer, width int32, height int32, textureFormat TextureFormat) Texture2D {
cdata := (unsafe.Pointer)(unsafe.Pointer(data))
cwidth := (C.int)(width)
cheight := (C.int)(height)
ctextureFormat := (C.int)(textureFormat)
ret := C.LoadTextureEx(cdata, cwidth, cheight, ctextureFormat)
v := NewTexture2DFromPointer(unsafe.Pointer(&ret))
return v
}
// Load an image as texture from rRES file (raylib Resource)
func LoadTextureFromRES(rresName string, resId int32) Texture2D {
crresName := C.CString(rresName)
defer C.free(unsafe.Pointer(crresName))
cresId := (C.int)(resId)
ret := C.LoadTextureFromRES(crresName, cresId)
v := NewTexture2DFromPointer(unsafe.Pointer(&ret))
return v
}
// Load a texture from image data
func LoadTextureFromImage(image *Image) Texture2D {
cimage := image.cptr()