Skip to content

Commit

Permalink
fixes the crash on runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
net-cscience-raphael committed Jun 17, 2024
1 parent c582799 commit 42242c7
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ private static float[] processNormals(AIMesh aiMesh) {
LOGGER.trace("Start processing Normals");
var buffer = aiMesh.mNormals();
if (buffer == null) {
return new float[]{};
return new float[aiMesh.mNumVertices() * 3];
}
var data = new float[buffer.remaining() * 3];
var pos = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ private List<float[]> embedMultipleImages(List<BufferedImage> images) {
private float[] embedModel(IModel model) {
//Options for window
var windowOptions = new WindowOptions() {{
this.hideWindow = true;
this.hideWindow = false;
this.width = 600;
this.height = 600;
}};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public GLTextureCache() {
public void cleanup() {
this.textures.values().forEach(GLTexture::cleanup);
this.textures.clear();
this.textures.put("default", new GLTexture(new Texture()));
}

/**
Expand Down
Loading

0 comments on commit 42242c7

Please sign in to comment.