Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
SFML Precision (C++)
Print
Pages: [
1
]
Author
Topic: SFML Precision (C++) (Read 3852 times)
0 Members and 1 Guest are viewing this topic.
__fastcall
Newbie
Posts: 8
SFML Precision (C++)
«
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?
EDIT:
After searching the forums and reading
this topic
, I've concluded that a temporary solution would be to derive my own double-precision sprite class. But the question remains, why use floats?
Logged
r1nux
Newbie
Posts: 9
SFML Precision (C++)
«
Reply #1 on:
September 28, 2008, 01:11:31 am »
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.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
SFML Precision (C++)
«
Reply #2 on:
September 28, 2008, 10:03:45 am »
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.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
SFML Precision (C++)
anything