Patrick Martin wrote:There is a whole thread about this you know, its not like you are the first one to get up in the morning and wonder about this stuff.
You are very optimistic!
I wouldn't hold my breath on FX supplanting HTML5. I don't see that happening.Not really difficult to reason since Oracle itself has expressed this.
and I'd rather see JavaFX stay focused on delivering a solid UI experience rather than spread themselves too thin by trying to tackle a custom 3D framework.On THAT we -fully- agree. There are plenty of good third party 3D solutions like LWJGL or JogAmp for low level stuff, LibGDX for middle level and something like JMonkeyEngine for high level abstraction.
KonradZuse wrote:Open Source projects that start as Open Source projects don't die so easily. Closed source projects that then become open source have a far short shelf life. Just check out java.net, its full of ghosts of abandoned babies.
FX and HTML are RIA's. FX NEEDS 3D. WebGL is okay and all, but it's just for the web? How big is it? Supported? In Java Currently there is JOGL(rare support last updated in 2008) and LWJGL which has more support. Problem is these are open source projects that might die soon.
There is no set help for either also.Plenty of books. Not on the APIs themselves but that's because they are only thin wrappers; you need to learn OpenGL, not JOGL or LWJGL.
Very limited tuts, and help all on the web.Plenty of tuts, if you search in the correct context (OpenGL, OpenAL).
Why should we have to rely on 3rd party when Oracle can do it themselves?Why not? It has worked perfectly fine for the past 15 years. Java Enterprise wouldn't be what it is today without the efforts of Apache, JBoss, IBM, ... Heck the JDK itself contains third party additions.
why rely on a 3rd party that might die?JavaFX 1 died. Java3D died. JMF died. JAI died. J2ME is on life support. Heck: Sun died! And that's not third party stuff.
You might do [url https://wikis.oracle.com/display/OpenJDK/3D+Features]something like this as is described here :
//Draw the same shape twice, but with different positions. //Pass the appropriate arrays into OpenGL. glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, vertices); glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_DOUBLE, 0, normals); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2, GL_DOUBLE, 0, textureCoordinates); //Draw the shape the first time. glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_INT, indices); //Apply a translation matrix. glTranslate3f(32, 0, 0); //Draw the shape a second time. glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_INT, indices); //Deactivate vertex arrays after drawing glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY);
Less flexible, but in a much more convenient object model.
// Create a mesh TriangleMesh mesh = new TriangleMesh(); mesh.setPositions(positions); mesh.setTexCoords(texCoords); mesh.setFaces(faces); // Create a couple mesh views with the same shape, but different positions. MeshView mv = new MeshView(mesh); MeshView mv2 = new MeshView(mesh); mv2.setTranslateX(32);