I forgot to spell out what the loop implied. To get view.getRenderManager(tpf, true) to work, you need a new RenderManager for each view (camera/display pair). To get a RenderManager to which the camera and ViewPorts and scene are added, you need a Renderer (lwjgl/jogl level connection). To get a Renderer(), you need a Context which gets you the right Renderer according to your system and settings and a Canvas to draw on. You can get a Context from JmeSystem.newContext(settings, JmeContext.Type.Canvas) which SimpleApplication does for you. So,
view.getRenderManager(tpf, true) has the canvas, camera, renderer – all it needs. Offscreen stuff is not needed because the render writes to the canvas.
I already copied and edited all the files up to Context:
LwjglContext
→ LwjglAbstractDisplay
→ LwjglCanvas
→ KeyInput
→ MouseInput
But, I went back to just getting a context from the JmeSystem.
It should just work.
I’m getting an error: No OpenGL context found in the current thread.
I have one thing to try. In looking up the error, people had trouble running Minecraft after installing Win 10. Turns out that rolling back to Java 8 Update 51 avoids the problem. I’ll have to do a rollback, but I don’t have time for it now and I don’t think that, that’s the problem.
- Does lwjgl only support one thread?
- Does jogl support multiple threads?