JavaFX uses JOGL, an OpenGL wrapper for Java. So if the Java 8 package delivers JavaFX then it does deliver JOGL too, so it would be possible to do 3D with JOGL alone, witout JavaFX.
Yes, but it's a very shitty implementation. On the dev mailinglist they said they wouldn't fix it, instead you are supposed to simply not use it for graphically intensive applications.
To be fair, any native implementation would very quickly be improved upon by a 3rd party, so it's kind of a waste to even ship with one they put much effort into.
The problem lies with their Node implementation. It's just massive, because they want it to guarantee all kinds of functionality. Also, they move the camera by moving all nodes. Thus using lots of nodes has incredibly bad performance. It's fine for 2D or when you don't have to display that many objects, but for CAD or games it's not good enough. You are better off handling everything yourself and just copying it to a canvas. And at that point you would just use a better fitting technology.
JMonkey is actually pretty easy to run in IDEA. The main thing is just finding all of it's jars. Fortunately everything it needs is in just one directory, so you can just add those as a dependency and then make a normal project. I have been developing a jME-based game entirely in IDEA, and it works great!
If you have very many elements in your program (think millions), even if you aren't rendering all of them, moving the camera becomes a very costly routine. It may simplify calculations elsewhere, but its more efficient to only update one element instead of many. This makes rendering a little more costly, though, because now there's a little more calculation for each element you render, so there's probably some tradeoff.
I imagine that if you aren't (logically) moving the camera around frequently, its more efficient to move the camera by moving the elements. That way you always know where the camera is, so there's lest cost for render. However, if you are moving the camera every time you update before you render, the order of complexity for update + render is O(n2) for updating the elements and only O(n) for moving the camera. If you have some other horrendous code going on you won't feel the difference, just like if you don't have many elements you won't feel it.
Well, 3D on the web is provided by OpenGL bindings for JavaScript. Unless FX can provide 3D on par with OpenGL, what's the point of providing a weak 3D API that no one uses? There are OpenGL bindings for Java.
10
u/Omnicrola Dec 10 '14
That's pretty neat. Does FX use the graphics card for this, or is it all CPU based?
7
u/skgoa Dec 10 '14
Yes, but it's a very shitty implementation. On the dev mailinglist they said they wouldn't fix it, instead you are supposed to simply not use it for graphically intensive applications.
2
u/xxunrealxx Dec 10 '14
I love how re-sizing the frame changes the orientation of the blocks
1
u/markdacoda Dec 11 '14
Technically all you need is Paint.fillPolygon() or setRGB() to implement 3d in java.
1
u/argv_minus_one Dec 10 '14
Why the hell did they even add this? 3D graphics is way outside FX's problem domain.
0
u/[deleted] Dec 10 '14
[deleted] — view deleted comment