JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

classic Classic list List threaded Threaded
215 messages Options
1 ... 567891011
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Andreas
Hi,

thanks for the hint. You're completely right. I just copied the code from OrbitCamControl and I did not notice that I should remove those lines.

But since these line where useless anyway, the right mouse button is still not working.

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
Andreas wrote
But since these line where useless anyway, the right mouse button is still not working.
What does it mean? Does it mean that there is no event produced when you use the right mouse button? Does it mean that there is an event produced but the operation you try to perform on the right click doesn't work as expected?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
In reply to this post by Andreas
Actually, you probably broke the code by ignoring too much events. Rather make a single TriggerAction if you really want to ignore the first event.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Andreas
In reply to this post by gouessej
Sorry for the missing information.

If I'm using the following line
        final Predicate<TwoInputStates> rightDownMouseMoved = Predicates.and(TriggerConditions.rightButtonDown(),
                TriggerConditions.mouseMoved());
the perform method of the TriggerAction is never called. If I switch from rightButtonDown to middleButtonDown() or leftButtonDown() it workes. But I need all three buttons.

The code to ignore the first event is taken von the OrbitCamControl of Ardor3D. And due to the comment "Test boolean to allow us to ignore first mouse event. First event can wildly vary based on platform." I thought it's ok t leave it.

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
Try to use a simpler predicate first, only composed of TriggerConditions.rightButtonDown(), in order to determine whether the problem comes from combining the 2 predicates or from the right click intercepted elsewhere.

Edit.: I advise you to use the debug mode to see how the logical triggers are used on a right click.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
In reply to this post by Andreas
I've looked at the source code of my first person shooter. I use a single predicate with the condition TriggerConditions.mouseMoved().

I'll have to make an effort to put the binary builds of JogAmp's Ardor3D Continuation into the Maven development repository so that the developers can use them. It will be helpful to create IDE agnostic Java projects using this engine. My projects are IDE agnostic most of the time even without using Maven, the eclipse project files can be completely ignored in other IDEs but my Ant script is complicated.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
In reply to this post by Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Andreas
In reply to this post by gouessej
I tried to debug the problem and think I found the reason.

In line 278 of the AwtMouseWrapper a "break;" is missing.
https://github.com/gouessej/Ardor3D/blob/master/ardor3d-awt/src/main/java/com/ardor3d/input/awt/AwtMouseWrapper.java#L278

If you're pressing the right button, which should be button 3, the code is changing the state for button 4.

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
This post was updated on .
Excellent finding! I'll fix it very soon and I'll mention your post in the commit log of course :) Big kudos to you. "Errare humanum est", I'm just a human being ;) I broke this feature when adding the support of more mouse buttons :s It's not missing in the SWT mouse wrapper and in the NEWT mouse wrapper.

Edit.: I'll provide a fresh build in some hours.

Edit.2: Feel free to make a pull request. I defend the paternity rights, I like attributing the works to the right persons.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Andreas
I created the pull request.

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
Merged ;)
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
I've just updated the documentation and the build. Enjoy.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Andreas
Hi,

I'm having a next problem. If using a JoglSwingCanvas there seems to be a problem if a mesh has RenderState set to a WireframeState. This happens if there are only meshes with WireframeState. This is shown in the two pictures

WireframeState not set for the teapot
Non-Wireframestate

WireFrameState set for the teapot
Wireframestate

There is a white space/line between the two black triangles, where you can sea a part of the wireframe of the teapot.

This does not happen in case of JoglAwtCanvas, JoglNewtAwtCanvas. But both take many seconds to get closed in my tabbed example.

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
Hi

Do you reproduce your bug in the simple examples provided with JogAmp's Ardor3D Continuation? Do you reproduce your bug when setting jogl.gljpanel.noglsl to true when running your program?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
In reply to this post by Andreas
Do you use glutSolidTeapot? If it's the case, you will probably not reproduce this bug with a real mesh using the build-in class of the engine.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
In reply to this post by Andreas
Please call glutSolidTeapot and gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2GL3.GL_LINE); in this program:
https://gist.github.com/gouessej/3420e2b6f632efdddf98

Then, replace the GLCanvas by GLJPanel and let me know whether you reproduce your bug.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Andreas
In reply to this post by gouessej
Hi,

I was able to reproduce this with the JoglSwingExample. You have to add

box.setRenderState(new WireframeState());

at line 87 of RotatingCubeGame.java and to remove the BasicText at line 112, 113 of RotatingCubeGame.java

It is working correct if jogl.gljpanel.noglsl is set to true.

Andreas

Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
Ok, I'll set noglsl to true by default, Runiter had a similar problem. Thank you. I hope that setting it (System.setProperty("jogl.gljpanel.noglsl", "true");) in the static initializer of JoglSwingCanvas is enough.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Andreas
Hi,

is there something similar to the Raster class (https://github.com/hharrison/java3d-core/blob/master/src/javax/media/j3d/Raster.java) from Java3D in Jogamp's Ardor3D Continuation?

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

gouessej
Administrator
I'm not sure. Please can you describe a typical use of this class?
Julien Gouesse | Personal blog | Website
1 ... 567891011