Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (516)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  LWJGL vs JOGL  (Read 3759 times)
0 Members and 1 Guest are viewing this topic.
Offline grom358

Senior Newbie





« Posted 2005-06-22 15:02:07 »

What are the differences between them?

http://bytonic.de/html/benchmarks.html has reference to fastjogl . Is fastjogl available as standalone binding outside of Jake2?

Why does JNI have so much overhead?

How do the bindings perform on Linux and Mac?
Offline kevglass

JGO Kernel


Medals: 191
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2005-06-22 15:17:36 »

LWJGL provides bindings to both OpenAL and OpenGL and does this mostly through NIO buffers which are reputed to be faster on the native side but are harder to use.

JOGL provides bindings to only OpenGL, thought there is JOAL for OpenAL.

LWJGL has been around considerably longer and has gone through more iterations of developer. JOGL is backed by SUN and tends to get more support on these forums. LWJGL has more examples of quality games but JOGL has slightly more documentation.

I don't believe fastjogl has been made available by the Jake team.

The bindings on Mac and Linux have around the same performance penalty as they do on Windows. i.e. you'll get about 90-95% of the performance on non-trivial scenes. Microbenchmarking this will show considerbly worse performance.

Kev

Offline tom
« Reply #2 - Posted 2005-06-22 17:39:59 »

http://bytonic.de/html/benchmarks.html has reference to fastjogl . Is fastjogl available as standalone binding outside of Jake2?

fastjogl is not a OpenGL binding. It is a different rendering pipepline in their game. It's a renderer that uses vertex arrays instead of glBegin() and glVertex3f() etc.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #3 - Posted 2005-06-22 21:18:01 »

I've tried LWJGL on PC & Mac and found reasonable performance on both platforms, which is more than I can say for Java2D, which is really really slow on my Mac.  I've tried JOGL too.  Both LWJGL & JOGL give a thin veneer over OpenGL so there's not a huge amount of difference from a programming perspective.  JOGL passes data in arrays, while LWJGL passes data in NIO buffers, which are a touch trickier to use, but result in less data copying behind the scenes, and so should be faster.

Time flies like a bird. Fruit flies like a banana.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #4 - Posted 2005-06-22 23:22:05 »

Although the most important difference hasn't even been mentioned yet - Jogl's reliability is terrible compared to LWJGL, even more so when you attempt to do fullscreen.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #5 - Posted 2005-06-23 07:26:46 »

FUD. Show some stats.

I considered switching from jogl to lwjgl in wurm, but found the bugs in jogl far less annoying.
AFAIK, the mouse focus problem still hasn't been fixed in LWJGL.

Play Minecraft!
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #6 - Posted 2005-06-23 08:28:04 »

Only my personal experience with writing some pretty big Jogl and LWJGL apps. Anything other than a current nVidia card will likely not work with Jogl out in the real world. Angry

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #7 - Posted 2005-06-23 09:26:02 »

That's funny, Wurm has a lot of ati users.
Go figure.

Play Minecraft!
Offline Tomas

Junior Duke




Agency9


« Reply #8 - Posted 2005-06-23 12:19:49 »

Most of ATI problem is not JOGL related but related to issues with ATI OpenGL drivers and those issues will bite any developer regardless of language (C/C++/Java/Haskell....) and binding LWJGL, JOGL etc. Speed, stability etc. is completely binding independent and has nothing to do with JOGL or LWJGL it all depends upon your app. So use the binding that you for some reason feel more comfortable with since it's the only thing that matters.

// Tomas

CTO Agency9
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2005-06-23 14:56:39 »

That's not strictly true. There are a couple of issues with JOGL to do with how it gets fullscreen and its integration with AWT which render it slightly less reliable. This is to be expected, as LWJGL actually has a completely custome display that was engineered specifically to work whereas JOGL is retrofitted to AWT.

IMHO the biggest real difference between JOGL and LWJGL is the API style; LWJGL is a C-Like static library with thread context functions and JOGL is some sort of odd OO abstraction of the whole concept.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Tomas

Junior Duke




Agency9


« Reply #10 - Posted 2005-06-23 21:58:25 »

Quote
There are a couple of issues with JOGL to do with how it gets fullscreen and its integration with AWT which render it slightly less reliable.
Yes there are a few JOGL context issues... but they are not a problem as long as you do the init in certain order and remember the flag -Dsun.java2d.noddraw=true. If your refer to that AWT don't support true full screen, only simulated,  on linux then it’s a real issue if you need it but the issue is AWT as you pointed out. Yes, AWT/SWING can be a blessing and a nightmare, it’s java style and people tend to know and it has some real strength.... but also some annoying limitations and quirks.

Quote
[IMHO the biggest real difference between JOGL and LWJGL is the API style; LWJGL is a C-Like static library with thread context functions and JOGL is some sort of odd OO abstraction of the whole concept.
I totally agree with you. LWJGL is a horribly C-Like static library and JOGL is bit nicer OO abstraction of the whole concept. Although OO and OpenGL in the same sentence is contradiction in terms Wink

The whole concept relay boil done to taste. Use the library that feels and smells right for you. Skip the general "LWJGL vs JOGL"  FUD comments you can find in various forums; they are both very good and competent libraries with small differences.


// Tomas Smiley








CTO Agency9
Offline Jeff

JGO Coder




Got any cats?


« Reply #11 - Posted 2005-06-26 23:51:13 »

Why does JNI have so much overhead?

Its actually a good deal more complex then that simple sentance.  For a good discussion of
where the over-head coems from in certain JNI operations see this classic text... (that I wrote Wink

http://java.sun.com/docs/books/performance/1st_edition/html/JPNativeCode.fm.html#18062

Once you've read it, it will be much clearer to you why Native Direct Byte Buffers, which allow Java code to work directly with C-heap memory, provide so much improvement.

JNI overhead today is actually so small as to be trivial IF you use JNI correctly.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Bombadil

Senior Duke





« Reply #12 - Posted 2005-06-27 07:24:27 »

Although the most important difference hasn't even been mentioned yet - Jogl's reliability is terrible compared to LWJGL, even more so when you attempt to do fullscreen.

I can backup Markus' statement (who didn't agree to the above).
For my JOGL game project I've no real problems with window or fullscreen mode, aside the usual "ATI's OpenGL driver can cause many more problems than Nvidia's"...

I've had no problems with Nvidia graphic cards so far but a few with Ati's. However the many workarounds in JOGL for exactly these ATI bugs solve the current issued. Of course you never know which bugs ATI's going to "implement" in a future Catalyst, but Ken tends to react fast.

My game isn't a Swing GUI'ed JOGL app. Maybe Orangy's is? I only use a few Swing components laying next to the JOGL GLcanvas and these work with no problems.

Speaking for my game project (which isn't finished yet), JOGL's reliability isn't terrible but actually very good.
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #13 - Posted 2005-06-27 11:35:23 »

The reliability issue is actually a bit anachronistic... JOGL had its ups and downs and LWJGL was always pretty consistently reliable, but they're both now about as reliable as each other. Especially as LWJGL is actually implemented on top of AWT now for Linux and OSXjust like JOGL is Smiley
<edit> Fixed typo Smiley

Cas Smiley

Offline elias

Senior Duke





« Reply #14 - Posted 2005-06-27 13:38:35 »

Especially as LWJGL is actually implemented on top of AWT now for Linux and OSXjust like JOGL is Smiley

This is the second time I have to correct you on this Smiley. The linux implementation is not based on AWT (except for AWTGLCanvas of course). Only the AWT locking features are used, to provide synchronized access to X (which is not generally threadsafe). This is especially evident in fullscreen, where LWJGL has a fully featured fullscreen mode on linux, while AWT only has the lame fullscreen-sized-window.

Furthermore, the Mac OS X version of LWJGL is based on AWT alright, but is also providing some workarounds for some nasty bugs in Mac OS X < 10.4. Some of these workarounds are native code, so they would not as easily implemented in a JOGL client application.

 - elias

Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #15 - Posted 2005-06-27 15:24:05 »

Ok ok, partially implemented on top of AWT then Roll Eyes

Cas Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (33 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (41 views)
2014-10-26 19:37:11

Luminem (22 views)
2014-10-26 10:17:50

Luminem (27 views)
2014-10-26 10:14:04

theagentd (33 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (58 views)
2014-10-16 15:22:06

Norakomi (47 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!