mirror of
https://github.com/bloeys/assimp-go.git
synced 2025-12-29 08:28:20 +00:00
Compare commits
6 Commits
v0.4.0
...
0bc81ac5ba
| Author | SHA1 | Date | |
|---|---|---|---|
| 0bc81ac5ba | |||
| 6bb760fc0a | |||
| 362558c877 | |||
| 7e82370f34 | |||
| 58e13d1c5a | |||
| bfa7357ea2 |
20
.github/workflows/run-assimp-go.yml
vendored
Executable file
20
.github/workflows/run-assimp-go.yml
vendored
Executable file
@ -0,0 +1,20 @@
|
||||
name: Build-AssImp
|
||||
on:
|
||||
create:
|
||||
|
||||
jobs:
|
||||
Run-assimp-go-macos:
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- name: Install golang 1.17
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '^1.17'
|
||||
- name: Clone assimp-go
|
||||
run: git clone https://github.com/bloeys/assimp-go
|
||||
- name: Copy dylib
|
||||
working-directory: assimp-go
|
||||
run: sudo mkdir -p /usr/local/lib && sudo cp asig/libs/libassimp_darwin_amd64.dylib /usr/local/lib/libassimp.5.dylib
|
||||
- name: Run assimp-go
|
||||
working-directory: assimp-go
|
||||
run: go run .
|
||||
@ -1,5 +1,7 @@
|
||||
# assimp-go
|
||||
|
||||
[](https://github.com/bloeys/assimp-go/actions/workflows/run-assimp-go.yml)
|
||||
|
||||
A Handcrafted Open Asset Import Library (AssImp) wrapper for Go.
|
||||
|
||||
## Features
|
||||
@ -43,7 +45,7 @@ Download the **.dll** of the release you want, and place it in the **root** of y
|
||||
First, download the appropriate **.dylib** for your device (`_amd64` for Intel CPUs and `_arm64` for Apple CPUs).
|
||||
Next you will need to rename the lib to `libassimp.5.dylib` and move it to `/usr/local/lib` or `/usr/lib`.
|
||||
|
||||
You can use this command to do it: `sudo mkdir -p /usr/local/lib && sudo cp libassimp_*.5.dylib /usr/local/lib/libassimp.5.dylib`
|
||||
You can use this command to do it: `sudo mkdir -p /usr/local/lib && sudo cp libassimp_darwin*.dylib /usr/local/lib/libassimp.5.dylib`
|
||||
|
||||
### Running assimp-go
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ func parseNodes(cNodesIn **C.struct_aiNode, parent *Node, parentChildrenCount ui
|
||||
}
|
||||
|
||||
//Parse node's children
|
||||
nodes[i].Children = parseNodes(n.mChildren, nodes[i], parentChildrenCount)
|
||||
nodes[i].Children = parseNodes(n.mChildren, nodes[i], uint(n.mNumChildren))
|
||||
}
|
||||
|
||||
return nodes
|
||||
@ -519,6 +519,10 @@ func parseVertexWeights(cWeights *C.struct_aiVertexWeight, count uint) []VertexW
|
||||
}
|
||||
|
||||
func parseAiString(aiString C.struct_aiString) string {
|
||||
if aiString.length == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
return C.GoStringN(&aiString.data[0], C.int(aiString.length))
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user