double vs. float

I’ve been working away through the various NeHe JOGL ports and noticed that a number of times the vertex variable types were ported as float from c/c++ to float in Java. Nothing seem odd…? Reading an earlier post it was said that LWJGL hides the OGL double commands.

But to write a float we need to either write 1.0F or cast it where as doubles need no special treatment. Or does this increase the computation needed? ???

Thanks.

With current computers, floats are faster than doubles… Floats are 32 bits digits whereas Doubles are 64 bits one’s.

If you’re using a 64bits processor, you won’t see any speed difference. Else, use float. It’s alwais better.

Chman