Rendering mode - what do I have to know?

Hi!

I’ve already read a few tutorials on Java3d and I want to write my own little engine soon.
There are 3 rendering modes in Java3d:

immediate mode, retained mode & compiled-retained mode.

I want to write a little terrain engine, load some (animated) models and maybe add a tiny physics engine.
It’s just a project in my free-time now, but it should be possible to make sth. bigger out of it in the future.
What do I have to think about when I want to write my engine and have to choose one of these modes?
On the one hand I don’t want to use (compiled-)retained mode to find out that something gets too complicated to realize because of some restrictions.
On the other hand I don’t want to use immediate mode and code everything on my own, when j3d could take much work off of me…

Maybe you have some experiences you could share with me?

Thanks in advance, Adam.

The old problem of choosing the right tool… I used java3d for a while, but switched to a gl binding (gl4java and later lwjgl) after a few months of development. Here are my (probably biased) thoughts:

  1. Java3D is and will always be far behind current 3d hw technology compared to a thin binding. Almost per definition, as Sun has to do much more work to integrate a new feature in java3d. But also because Sun seemingly isn’t working very hard to support java games programming directly.

  2. Java3D is very high level compared to e.g. OpenGL so you will get a lot of free benefits by using it. However, if you just want to apply some common 3d algorithm you found on the net, like a terrain renderer, you will spend a lot of time converting the OpenGL based ideas to java3d. Java3d contains very little documentation, at least compared to OpenGL.

  3. The last time I played with java3d (1.2.1 and version 1.3 beta), the immediate mode sucked. Don’t ever consider using it. It’s buggy, even less documented and overall seems more like an add-on to please OpenGL/DirectX developers. And it’s not even that immediate as the name states. So if you are worried about flexibillity and performance, consider using an OGL binding instead.

  4. You mentioned that you are going to work on the project as a hobby, in which case java3d might be more appropriate, given the amount of work you have to do in OpenGL to get anything ‘running’.

  • elias