Java applets with hardware accelerated 3D graphics? OpenGL and / or DirectX

I can not find a clear answer to this question with all my search.

If I need a web applet, is there a Java library that takes advantage of hardware accelerated graphics drivers on a client machine, like in OpenGL and directx? I write driver detection code before launching the applet to detect the capabilities of 3D graphics.

I understand that there are many Java 3D libraries, but I cannot figure it out.

I got the impression that you can do this, but you cannot find it.

While I ask, what about Flash and Silverlight? I thought all of their 3D graphics is software?

EDIT:

I see the answer to the question: yes, Java has support for 3D hardware. Thanks for all the info!

I think my real question is (what am I getting):

1) To what extent is it supported for full use? For example, can you use DirectX or OpenGL shaders? I might expect some features to be absent as they tend to abstract things out. Can I make a GPUID program or utility that details the capabilities of a client’s GPU?

2) Is it practical? Can I port an old 3D game like Quake to a Java applet and have decent performance? (of course, depends on the client system)

+4
source share
7 answers

The applet-launcher project should help:

JNLPAppletLauncher is a universal JNLP applet launching class for deploying applets that use extension libraries that contain native code. This allows applets to easily use extensions such as Java 3D, JOGL, and JOAL , with a few additional <applet> tag parameters in versions of Java SE back in 1.4.2.

JOGL has an example applet here , and Java3D has two samples.

+3
source

DirectX is a proprietary Microsoft 3D system, so if you are not sure that you will only work on Microsoft systems, I would avoid DirectX.

JOGL and Java3D are very different. JOGL is a thin layer on top of OpenGL with all the advantages and disadvantages arising from this. Java3D is a complete scene system.

+2
source

You can fully write java applets that access 3D hardware. The env3d project ( http://env3d.org ) is exactly that - the java 3D engine that creates 3D-accelerated 3D applets. The website provides many sample programs to demonstrate the use of hardware accelerated 3D inside your browser. The only requirement is that Java must be installed and the user must explicitly allow the applet permission to access local resources.

Env3D is based on lwjgl, opengl / gaming wrapper for Java. It even supports shaders and other advanced features.

+1
source

Support for hardware accelerated graphics has been in Java since 1.5.

See release notes for how to do this . Note: this is for 2D.

For 3D, J2SE has Java3D .

0
source

Flash supports pseudo-3D, but not any OpenGL accelerated full-screen 3D (mostly just promising warping effects). There are also software-oriented solutions (e.g. Papervision3D).

Silverlight will support pseudo-3D as well as version 3.0 this year. As far as I know, there are currently no plans to create full 3D.

It is assumed that 3D support is planned for a later version of the JavaFX initiative, which (if it ever happens) will slightly improve support in applets.

0
source

It may also be useful to note that in new versions of Java (I think version 1.6 is version 10?) There were significant improvements in the graphics pipeline for windows.

0
source

You will not have shaders, the last time I checked; you get basically a scenegraph API on top of what you might consider DX5 or DX6 level functionality, depending on what you do.

0
source

All Articles