JOGL Applets versus WebGL
Asked Answered
D

1

6

Are there any significant technical differences between using JOGL in applets versus WebGL? I'd like to focus on two things in particular:

  • Performance: Is there significantly more overhead in rendering 3D using WebGL?
  • Functionality: How well do the two support the OpenGL standard?

I'm developing a 3D web application and I'd like to know more about the technical capabilities of the two.

Decry answered 18/6, 2012 at 16:56 Comment(0)
S
3

I think the pure GL rendering speed will be similar, in particular if you do a lot of work in a small amount of calls. For other code, Java tends to be roughly 5-10x faster than Javascript: http://blog.j15r.com/2011/12/for-those-unfamiliar-with-it-box2d-is.html

There are other differences:

  • JOGL requires that you can run applets / signed webstart (I am not sure whether this is still enabled by default on most browsers)
  • WebGL requires a WebGL enabled browser (modern Chrome, Safari or Firefox, does not work on IE)....
  • WebGL is based on GL ES 2.0, i.e. there is no support for the GL fixed function pipeline. This means you'll need to implement your own shaders or use a library such as three.js
Sennar answered 18/6, 2012 at 21:53 Comment(6)
JOGL doesn't run on phones and is never likely to. Java is a known security problem in browsers and many companies don't allow it. (goo.gl/vmPVx)Eutrophic
p.s.: PlayN and LibGDX both provide GL 2.0 interfaces and can use WebGL, LWJGL or Android GL bindings internally. This allows you to target Android, Java and HTML with a single code base.Sennar
@Eutrophic It was already wrong in 2008. JOGL has worked on J2ME phones for years and it works under Android whereas WebGL is atrociously slow on a Samsung Galaxy S3 4G i9305. On one hand, there is the Java Plugin for the web browsers (deprecated in Java 9) and Java as a language and a runtime environment which is still very popular in companies. As far as I know, there are some vulnerabilities in WebGL and Adobe Flash too. If you look for a solution without security flaws, shut down your computer and stop using it. There are security flaws in other plugins, web browsers and operating systems too.Hubblebubble
Moreover, WebGL seems to be unable to handle very large meshes, especially in 32-bit web browsers which often hang or in the best case ends up by displaying them extremely slowly. Lots of developers have to perform some non conservative mesh optimizations at runtime which isn't always wanted, it depends on your use case.Hubblebubble
@StefanHaustein LibGDX supports JOGL too, there was an official backend at the beginning and some JogAmp contributors (including me) have maintained an unofficial one for several years.Hubblebubble
J2ME phone still exist? In what market is that? BTW did you know the person that made JOGL is chairman of the WebGL group?Eutrophic

© 2022 - 2024 — McMap. All rights reserved.