Hi
The book "Pro Java 6 3D game development" shows how this could be done. You can probably google on "Active rendering" and find
some more information about this.
The code in the book is rather old, so i guess you have to replace the code that initialize the rendering canvas with something like this:
1 2 3 4 5 6 7 8 9
| AWTGraphicsScreen screen = ( AWTGraphicsScreen)AWTGraphicsScreen.createDefault(); AWTGraphicsConfiguration config = ( AWTGraphicsConfiguration )GraphicsConfigurationFactory .getFactory( AWTGraphicsDevice.class ).chooseGraphicsConfiguration( caps, null, screen );
NativeWindow win = NativeWindowFactory.getNativeWindow( this, config );
GLProfile profile = GLProfile.get( GLProfile.GL2 ); this.drawable = GLDrawableFactory.getFactory( profile ).createGLDrawable( win ); this.context = drawable.createContext( null ); |
thanks, i solved it before although this is basically what i had

but now for some reason java is throwing an exception:
1 2 3 4 5 6 7 8 9
| Exception in thread "Thread-3" java.lang.RuntimeException: Unable to initialize JAWT at com.sun.nativewindow.impl.jawt.JAWT$1.run(JAWT.java:100) at java.security.AccessController.doPrivileged(Native Method) at com.sun.nativewindow.impl.jawt.JAWT.getJAWT(JAWT.java:95) at com.sun.nativewindow.impl.jawt.windows.WindowsJAWTWindow.lockSurface(WindowsJAWTWindow.java:69) at com.sun.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:130) at com.sun.opengl.impl.windows.wgl.WindowsWGLDrawable.setRealized(WindowsWGLDrawable.java:70) at org.peehpee.gl.ui.Canvas3D.run(Canvas3D.java:66) at java.lang.Thread.run(Unknown Source) |
i've never had this before, any ideas?