Fix crash

This commit is contained in:
bloeys
2022-02-05 19:24:55 +04:00
parent f49c6bc9bb
commit ffc9b6aa7c
2 changed files with 3 additions and 2 deletions

View File

@ -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()
}

View File

@ -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},