Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  
  Questions  (Read 2058 times)
0 Members and 1 Guest are viewing this topic.
Offline DavidYazel

Junior Duke




Java games rock!


« Posted 2003-07-12 11:25:52 »

I am designing the xith3d engine to be agnostic to both LWJGL and JOGL and am attempting to design the interaction between my lowest level render peers and the higher level remderer logic.

I started looking over JOGL in more depth and had some questions:

1. Where is the documentation located?  I pulled what is in CVS but there isn't really much there.  The userguide.html is just a one page overview.  The two demo programs also don't give you too many clues as to how it is to be used.

2. What exactly should we be doing in the init method?  In the gear demo they are drawing geometry, in other places I have seen what looks like frame setup stuff (projection matrix, clearing background).  But I have also see the GL and GLU handles being fetched from the drawable interface.

3. Where is the documentation for GL and GLU?  In particular I would like to see the options for passing geometry to the interface (NIO Buffers, Arrays, etc).  I have plenty of docs on the opengl interface in general, what I need is the specifics (preferablly javadoc) for the JOGL interface to those methods.  For example LWJGL 0.6 uses system addresses against direct NIO buffers for passing in buffers, which is extremely fast.

4. What drove the decision to force AWT to underly the canvas implementations?  Is it possible to somehow abstract from that so we can have a third drawable (heavyweight componant, lightweight componant, OS level window).  

5. How have you found the performance of gathering mouse events through the AWT event mechanism?  I have found that in general WLToolkit under windows just sucks the life out applications, which is why the polling mechanism of LWJGL is attractive to many people.

6. How stable is the current release of JOGL right now under Lunix, Windows and MacOS?

Thanks!

David Yazel
Xith3D Project Founder
http://xith3d.dev.java.net

It may look complicated, but in the end it is just a bunch of triangles
Offline gregorypierce

Senior Duke




I come upon thee like the blue screen of death....


« Reply #1 - Posted 2003-07-12 13:04:38 »

Quote

1. Where is the documentation located?  I pulled what is in CVS but there isn't really much there.  The userguide.html is just a one page overview.  The two demo programs also don't give you too many clues as to how it is to be used.


Now come on, you know Sun is infamous for not writing a lot of documentation Smiley Heck you could find more documentation about the FullScreen API in weblogs than Sun's own website.

On a more serious note, I think that documentation will somewhat fall to the community. I've been writing a document that will help people get going with JOGL. Seems I'm becoming quite the Tech Writer of late.

Quote

2. What exactly should we be doing in the init method?  In the gear demo they are drawing geometry, in other places I have seen what looks like frame setup stuff (projection matrix, clearing background).  But I have also see the GL and GLU handles being fetched from the drawable interface.


While you can draw stuff in init, according to the code in GLCanvas and Animator you really should be doing any drawing in your GLEventListener's display,reshape, and displayChanged methods.

Quote

3. Where is the documentation for GL and GLU?  In particular I would like to see the options for passing geometry to the interface (NIO Buffers, Arrays, etc).  I have plenty of docs on the opengl interface in general, what I need is the specifics (preferablly javadoc) for the JOGL interface to those methods.  For example LWJGL 0.6 uses system addresses against direct NIO buffers for passing in buffers, which is extremely fast.


You'll have to generate the javadocs unless you download the source. When it builds it generates the docs in a directory javadoc_public.

Quote

4. What drove the decision to force AWT to underly the canvas implementations?  Is it possible to somehow abstract from that so we can have a third drawable (heavyweight componant, lightweight componant, OS level window).  


Can't answer that one, but GLCanvas is HW component, GLJCanvas is lightweight component and there is no OS level window - that's just wrong IMHO Smiley

Quote

5. How have you found the performance of gathering mouse events through the AWT event mechanism?  I have found that in general WLToolkit under windows just sucks the life out applications, which is why the polling mechanism of LWJGL is attractive to many people.


Use JInput.

Quote

6. How stable is the current release of JOGL right now under Lunix, Windows and MacOS?

Thanks!


I can confirm its stability on WIndowsXP, and OSX Panther. No issues whatsoever.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline DavidYazel

Junior Duke




Java games rock!


« Reply #2 - Posted 2003-07-12 13:37:19 »

Thanks for the replys!

Question regarding the current implementation.  It looks like Java arrays are passed in for geometry.  Isn't that horridly slow assuming that then that would need to be copied to a NIO buffer underneath?

I have all my geometry in NIO buffers, so I can of course get the buffer.array() to grab a java array to pass into the API.  Can it somehow detect that this is backed by a system memory area and optimize the passthru to the card?

It will be interesting to take the extact same scenegraph and run/profile jogl and lwjgl and see how they compare for performance.

David Yazel
Xith3D Project Founder
http://xith3d.dev.java.net

It may look complicated, but in the end it is just a bunch of triangles
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gregorypierce

Senior Duke




I come upon thee like the blue screen of death....


« Reply #3 - Posted 2003-07-12 13:47:48 »

I was somewhat surprised and confused to find that the API calls used arrays instead of ByteBuffers. Dunno why this is being done, but I have observed an impact on performance when rendering large numbers of random triangles.

Though strangely enough there are some methods which do take Buffers which doesn't make a whole lot of sense. Maybe the Sun folks could set up a chat one day so we could ask a bunch of questions and find out why they chose some of the things they did. Clearly this API was greatly inspired by GL4Java, but for some of us there is a reason why we didn't choose the GL4Java route Smiley

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161