Loading Model into OpenGL

What is the proper way to load a model into the OpenGL window. I seem to be having difficulties loading a character into an OpenGL window to visually aid an editor i am working on for my project. I previously achieved this using the SceneComposerTopComponentcall openScene; however, I have no control over this method and I am unable to change certain things such as the SceneTopComponent’s window’s title until after the scene has opened in which i would have to get the request close the scene change the name then open it again as it seems I cannot change the modules name directly. I tried using the sceneRequest directly using the wiki, other projects and the SceneComposerTopComponent itself as a reference; as a result is the code snippet below and sceneRequested,sceneClosed and previewScene being copied from SceneComposerTopComponent; however it seems I am missing some features apparent in SceneComposerTopComponent and sometimes become unresponsive. Can anyone elaborate on the proper way to do this. It should be added that I have to declare a new ProjectAssetManager and register a locator so I can properly access the model file within the module itself, however this has not caused a problem as it loaded originally and is loading now despite the issues above.

cleanupControllers(); SceneApplication.getApplication().addSceneListener(this); //TODO: handle request change spat = getManager().loadModel("FlairAPI/src/Models/Test.j3o"); cmc = new CardManifestController(); loadAllAnimations(spat);
    Node rootNode = new Node("Root Node");


    JmeNode jmeNode = NodeUtility.createNode(rootNode, false);
    SceneRequest request = new SceneRequest(this, jmeNode, getManager());

    if (editorController != null) {
    editorController = new SceneEditorController(jmeNode, null);
    this.currentRequest = request;
    request.setWindowTitle("Flair Editor");
    request.setToolNode(new Node("SceneComposerToolNode"));

Basically you would have to copy what a plugin like SceneComposer or TerrainEditor or VehicleCreator do. What you posted looks ok so far, what happens?

Most of the time the window freezes and if it does not freeze then their is simply a lone Model loaded in a black window with absent of the directional axis or bounding box models. I am also unable to rotate or zoom in or out within the OpenGL window. The bottom panel is also missing though this may be do to the fact that the harness is out of date and every time I clean i have to re-update but the bottom is not really a problem.

All of the functionality is what the plugins do, so as said you would have to copy what they do. Maybe start by changing the SceneComposer a bit.

I figured I had most of what sceneComposer did since i also copied the ComposerCameraController, SceneToolController and SceneEditorController variables and copied the relevant calls which they where located which is why i copied:




from sceneComposerTopComponent. I guess I will look at the class again possibly I missed the proper call which made all of these controllers work properly as they seem to be the main functionality of SceneComposer.

Thanks for the quick replies