Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: OpenGL vs.(?) Java3D

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    east norwalk, ct, usa
    Posts
    184

    OpenGL vs.(?) Java3D

    I have a few questions about using OpenGL with Java.

    1. If you utilize the Java3D api doesn't it, in turn, utilize the
    underlying OpenGL implementation of the operating system?

    2. Is Java3D just an OO wrapper for native OpenGL calls?

    3. What's the real scoop? Do people use GL4Java or the Java3D api?

    thanks all.

  2. #2
    Member Newbie
    Join Date
    Mar 2001
    Posts
    44

    Re: OpenGL vs.(?) Java3D

    1 - If you have the OpenGL version of Java3D then yes.

    2 - No. Java3D is a higher level of abstraction.

    3 - Truth be told neither is used that much. Java3D is still new and uses massive amounts of memory for simple scenes. I like GL4Java and Magician. But you will be programming for a limited audiance.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    east norwalk, ct, usa
    Posts
    184

    Re: OpenGL vs.(?) Java3D

    thanks for the reply gkw,

    i'm just learning java and need something
    compelling to keep it interesting. i also
    want to help support opengl (vs. direct3d).

    now all i need to figure out is if i have
    java3d on my system (hmm... does it come
    with jdk1.3?) and, if i do, if it's the
    OpenGL version.

    if anyone wants to offer further info, i've
    got mandrake7.2 linux and the jdk1.3 installed.

    thanks again.

  4. #4
    Member Newbie
    Join Date
    Mar 2001
    Posts
    44

    Re: OpenGL vs.(?) Java3D

    Java3D is something that you need to download from Sun. Sun doesn't like to bloat the basic jre so more people will use it. Unless you have a kickass workstation I would suggest using GL4Java or Magician. The memory consumption is far less than Java3D, and you will actually learn OpenGL. If you want to use magician you can take a look at my site, operecitato.freeservers.com.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    east norwalk, ct, usa
    Posts
    184

    Re: OpenGL vs.(?) Java3D

    thanks again groundskeeper,

    i clicked around your site and followed the link to
    magician.

    i'm in.

  6. #6
    Member Newbie
    Join Date
    Dec 2000
    Location
    Canada
    Posts
    34

    Re: OpenGL vs.(?) Java3D

    A good reason to keep learning Java is network stuff - it is far easier than the Windows equivalent.

    A good reason (IMHO) is not 3D programming, either OpenGL or peseudo-OpenGL. Stick to C for that - you'll get far better performance, and be able to reach a broader audience (as noted above).

  7. #7
    Member Newbie
    Join Date
    Mar 2001
    Posts
    44

    Re: OpenGL vs.(?) Java3D

    There are people out there making 3D tile based games. You just cannot make a fps with Java. The way the event queue is set up means any fps is going to run very slow. But any 3D game that is not dependant on high framerates will work just fine. There are several other non-graphics related problems that come into play with a fps that Java would not handle well. But you definately could make a Civilization type multiplayer game in 3D. You may even be able to do an rts.

  8. #8
    Member Newbie
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    35

    Re: OpenGL vs.(?) Java3D

    just thought i should add a few comments.
    i haven't really used Magician that much, just downloaded it and wrote a few test applications. i didn't like it, mostly because it's not a direct wrapper around OGL.
    i liked GL4Java better, it's almost a direct wrapper (or interface, or whatever you want to call it) and is quite easy to get into.

    after playing around for about two weeks in Java with OpenGL, i decided there HAD to be a memory leak SOMEWHERE, since after testrunning my apps about 50 times i had almost no free memory, and i never seemed to get that allocated memory back until i rebooted.
    as we all know, Java has automatic GC (which is one of the reasons it might not yet be such a good idea to write an FPS engine in it, but also one of the reasons it's so nice), so i knew my Java code wasn't the problem.
    GL4Java however, use native C code to call OpenGL etc. so i downloaded the source and took a look at it.

    ****. it's fugly. it's in dire need of some serious clean up. the best thing would probably be if it was rewritten. i would personally think twice before using it in a "serious" product.

    still, Java is a damn fine language for testing new algorithms. it may not be a good idea to write your engine in it, but if you just want to try a new shadow algorithm, a new subdivision surface or whatever, Java is great.

    just my two cents.

  9. #9
    Member Newbie
    Join Date
    Mar 2001
    Posts
    44

    Re: OpenGL vs.(?) Java3D

    I have not used gl4java in a while but there are known memory leaks in the last couple jre's. I think there is a slight memory leak in magician, 8-12k, but it is hard to tell since it may be the jre. I don't know what you mean about magician not being a wrapper. It has every gl call that I can do in c. Besides the guy who wrote it has been using Java since it was Oak. I figure he might know a little something.

  10. #10
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    east norwalk, ct, usa
    Posts
    184

    Re: OpenGL vs.(?) Java3D

    thanks all for the great comments.

    i was impressed by the magician site
    http://arcana.symbolstone.org/produc...ian/index.html

    since i'm interested in using it while learning java
    and also to draw "pretty pictures"(tm) i think it'll
    suit me just fine. i've already got a little ogl
    experience so i should be golden.

Page 1 of 2 12 LastLast

Similar Threads

  1. OpenGL 4.4: missing 3d model with Java3D
    By ItsMagic in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-08-2014, 03:08 AM
  2. Java3D or OpenGL
    By lazneb in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-22-2005, 02:22 AM
  3. OpenGL ES and Java3D on Nokia 6650
    By in forum OpenGL: General
    Replies: 4
    Last Post: 05-11-2003, 02:23 AM
  4. OpenGL, OpenGL for Java or Java3d
    By SeraphimPunk in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-03-2002, 09:12 AM
  5. OpenGL with Java3D
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-26-2000, 07:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean