Update C sources

This commit is contained in:
Milan Nikolic 2019-11-25 03:34:31 +01:00
parent 02424e2e10
commit bd6bf15356
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
53 changed files with 62247 additions and 9914 deletions

View file

@ -162,11 +162,12 @@ func DrawGizmo(position Vector3) {
C.DrawGizmo(*cposition)
}
// LoadMesh - Load mesh from file
func LoadMesh(fileName string) Mesh {
// LoadMeshes - Load mesh from file
func LoadMeshes(fileName string) Mesh {
cfileName := C.CString(fileName)
defer C.free(unsafe.Pointer(cfileName))
ret := C.LoadMesh(cfileName)
ccount := C.int(0)
ret := C.LoadMeshes(cfileName, &ccount)
v := newMeshFromPointer(unsafe.Pointer(&ret))
return v
}
@ -197,7 +198,7 @@ func UnloadModel(model Model) {
// UnloadMesh - Unload mesh from memory (RAM and/or VRAM)
func UnloadMesh(mesh *Mesh) {
cmesh := mesh.cptr()
C.UnloadMesh(cmesh)
C.UnloadMesh(*cmesh)
}
// ExportMesh - Export mesh as an OBJ file
@ -308,11 +309,12 @@ func GenMeshCubicmap(cubicmap Image, size Vector3) Mesh {
return v
}
// LoadMaterial - Load material data (.MTL)
func LoadMaterial(fileName string) Material {
// LoadMaterials - Load material data (.MTL)
func LoadMaterials(fileName string) Material {
cfileName := C.CString(fileName)
defer C.free(unsafe.Pointer(cfileName))
ret := C.LoadMaterial(cfileName)
ccount := C.int(0)
ret := C.LoadMaterials(cfileName, &ccount)
v := newMaterialFromPointer(unsafe.Pointer(&ret))
return v
}