OpenGL or DirectX?

From the Java3D FAQ What is Java3D? “…It uses either DirectX or the OpenGL low level API to take advantage of 3D hardware acceleration.”

Can someone tell me what this means? Does it use both? I thought you had to use one or the other.

I am a gaming beginner…

thanks,

Barry

Open GL and DirectX are both APIs that let your code talk directly to the video card, letting it do the 3d stuff for you. They basically both do the same thing, but DX is proprietary to windows while opengl is not (although Microsoft owns half the patents it depends on…) an advantage of java3d is that it means you don’t have to make that choice - you just choose the one that works best for your video card.

Usually the openGL ones work best, so I would start there.

So you’re saying that it’s a configuration option or a method call that specifies to use OpenGL or DirectX?

It would seem since Java 3D is not specific on the underlying API, it would be better to use something like JOGL if you want to strictly use OpenGL. Am I wrong?

Its an installation option. Either install Java3D/DX or Java3D/OGL. Take a look to the download page and you will see…

Yes, if you want to do low-level OpenGL coding, use JOGL or LWJGL (just to mention to 2 most popular bindings those days). There is not one OpenGL or DirectX specific call in Java3D.

This isn’t always true. If you want to get some of the very low level details then JOGL is for you. However, if you’re too interested in the super latest features Java3D gives you a nice abstraction away from the low level details and gets your game done quicker.

Kev

From j3d.org: “we found the DirectX 1.2.1 implementation to be far more stable than the OpenGL 1.2.1 implementation”
And about performances, many ATI cards have a better support for DX than OGL. (On my machine, the framerate using DX impl. is twice the one using OGL).
This is just to point out that the OGL impl. isn’t always better, you need to test both to know which one works the best on your machine.

cheers.

yeeees, but that really depends… on the app, the card, the driver,…

If you use Java3D, better don’t care and let the customer choose the best for him :frowning:

As an average they are quite equal.

Darn, I missed something during my last round of updates then :frowning: I thought I’d cleaned out all the 1.2 references in the FAQ. Right now, it’s split as to the stability of the OGL v D3D versions of J3D. The OpenGL version has more complete support (D3D doesn’t have a number of the options at the low-level API, there’s a separate document on that on the j3d.org site). Mostly the difference these days is dependent on the video driver implementation. For example, ATI’s OpenGL drivers aren’t that crash-hot, so you’re better using the D3D version for those cards, and using OGL on nVidia cards.

I have found, broadly, that ATI plays much better with DX while everyone else is slightly better with OpenGL. NVidia much better with it.