Hi,
I wanna change provider from LWJGL to JOGL. How can I make this?
I see that default provider is LWJGL and I can’t it change to LWJGL.
Here is code on which I test it (17 line in above part of code):
http://code.google.com/p/jmonkeyengine/source/browse/trunk/src/jmetest/util/JMESwingTest.java
Here is fragment which I changed:
[java]// make the canvas:
DisplaySystem display = DisplaySystem.getDisplaySystem(JOGLSystemProvider.SYSTEM_IDENTIFIER);
display.registerCanvasConstructor(“AWT”, JOGLAWTCanvasConstructor.class);
canvas = (JOGLAWTCanvas)display.createCanvas(width, height);
canvas.setUpdateInput(true);
canvas.setTargetRate(60);
// add a listener… if window is resized, we can do something about
// it.
canvas.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent ce) {
doResize();
}
});
// Setup key and mouse input
KeyInput.setProvider(KeyInput.INPUT_AWT);
KeyListener kl = (KeyListener) KeyInput.get();
canvas.addKeyListener(kl);
AWTMouseInput.setup(canvas, false);[/java]
Program threws me exception(at 17 line of above code):
Exception in thread “main” java.lang.IllegalStateException: Provider may only be changed before input is created!
ok, i fixed it. Solve was found in jmetest.utitl.JMEJOGLAWTTest.java