Hello Guest

Trouble using Assimp.

  • 0 Replies
Trouble using Assimp.
« on: October 13, 2019, 21:18:20 »
I'm trying to write some code to generate a 3D model, and save that model.
At this point, I just want to write something that can make a single face, or a cube, or something simple.

This code, however, crashes the JVM, and I'm not entirely sure why.
I'm new to LWJGL, so it is very likely I am using it wrong.

Could someone help me turn this code into something which will create and save a basic 3D model?
Thanks for the help!

Code: [Select]
public static void exportModel(File outputFile) {
    AIScene scene = AIScene.create();
    AIMesh mesh = AIMesh.create(scene.mMeshes().get(0));
    mesh.mVertices().put(0, AIVector3D.create().x(0).y(0).z(0)); // THIS CRASHES THE JVM.
    Assimp.aiExportScene(scene, "dae", outputFile.getPath(), 0);