Add SDL backend

This commit is contained in:
Milan Nikolic 2023-11-04 13:08:38 +01:00
parent 15fba7e9ac
commit af9daf8452
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
24 changed files with 6485 additions and 89 deletions

View file

@ -438,7 +438,7 @@ func SetModelMeshMaterial(model *Model, meshId int32, materialId int32) {
func LoadModelAnimations(fileName string) []ModelAnimation {
cfileName := C.CString(fileName)
defer C.free(unsafe.Pointer(cfileName))
ccount := C.uint(0)
ccount := C.int(0)
ret := C.LoadModelAnimations(cfileName, &ccount)
v := (*[1 << 24]ModelAnimation)(unsafe.Pointer(ret))[:int(ccount)]
return v
@ -460,7 +460,7 @@ func UnloadModelAnimation(anim ModelAnimation) {
// UnloadModelAnimations - Unload animation array data
func UnloadModelAnimations(animations []ModelAnimation) {
C.UnloadModelAnimations((*C.ModelAnimation)(unsafe.Pointer(&animations[0])), (C.uint)(len(animations)))
C.UnloadModelAnimations((*C.ModelAnimation)(unsafe.Pointer(&animations[0])), (C.int)(len(animations)))
}
// IsModelAnimationValid - Check model animation skeleton match