SFML community forums
Help => General => Topic started by: __fastcall on September 28, 2008, 12:07:30 am
-
Is there any significant reason SFML uses floats instead of doubles? I know that OpenGL API likes to use floats, but if doubles are as fast as floats, why not use doubles and pick up some extra precision? :D
EDIT:
After searching the forums and reading this topic (http://www.sfml-dev.org/forum/viewtopic.php?t=281&highlight=float+double), I've concluded that a temporary solution would be to derive my own double-precision sprite class. But the question remains, why use floats?
-
Does one really need this precision for sprite-placement-management and such?
And I guess that one argument against using doubles instead fo float is
the size where float takes up 4 bytes and doubles uses 8 bytes.
-
Doubles are (generally) slower, use more memory, will need conversions because GPUs only understand floats, and most of all, are completely useless in this context.
You'll never see any graphics API using doubles.