Login  Register

Re: JME3 Unified Renderer - Canvas Use Issue

Posted by dardzull@yahoo.com on Feb 06, 2013; 8:02pm
URL: https://forum.jogamp.org/JME3-Unified-Renderer-Canvas-Use-Issue-tp4028152p4028164.html

gouessej wrote
Hi

You can easily do it with Ardor3D as you can see here.

Please post the whole class cast exception you get. You should have a look at existing examples here. This example shows how to use JMonkeyEngine 3 with several canvases in a JFrame.
That JME3 example works in windows, but not the RPI (no display).  THanks.  However when i try to get the GLCanvas there still runs the issue of getting the following error:

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.media.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
        at javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1096)
        at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:529)
        at com.jme3.system.jogl.JoglAbstractDisplay$1.addNotify(JoglAbstractDisplay.java:98)
        at java.awt.Container.addNotify(Container.java:2769)
        at java.awt.Window.addNotify(Window.java:770)
        at java.awt.Frame.addNotify(Frame.java:487)
        at java.awt.Window.pack(Window.java:807)
        at appTest$1.run(appTest.java:132)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:682)
        at java.awt.EventQueue$3.run(EventQueue.java:680)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)