mirror of
https://github.com/bloeys/nmage.git
synced 2025-12-29 13:28:20 +00:00
Fix crash
This commit is contained in:
3
main.go
3
main.go
@ -360,8 +360,9 @@ func draw() {
|
||||
}
|
||||
simpleMat.SetUnifMat4("modelMat", &tempModelMat.Translate(gglm.NewVec3(float32(rowSize), -1, 0)).Mat4)
|
||||
}
|
||||
|
||||
simpleMat.SetUnifMat4("modelMat", &modelMat.Mat4)
|
||||
|
||||
drawUI()
|
||||
window.SDLWin.GLSwap()
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ func NewMesh(name, modelPath string, postProcessFlags asig.PostProcess) (*Mesh,
|
||||
mesh.Buf.SetLayout(layoutToUse...)
|
||||
|
||||
var values []float32
|
||||
if len(sceneMesh.ColorSets) > 0 {
|
||||
if len(sceneMesh.ColorSets) > 0 && len(sceneMesh.ColorSets[0]) > 0 {
|
||||
values = interleave(
|
||||
arrToInterleave{V3s: sceneMesh.Vertices},
|
||||
arrToInterleave{V3s: sceneMesh.Normals},
|
||||
|
||||
Reference in New Issue
Block a user