SFML community forums
General => General discussions => Topic started by: lruc on August 11, 2008, 08:57:57 pm
-
Why does sfml use the extension .hpp? I have never before before seen that used. Also, not that I know a lot about floating-point math, but why does it use floats? It seems kind've standard in C++ to use doubles.
-
hpp is common... Its the header for c++.....
-
Why does sfml use the extension .hpp? I have never before before seen that used. Also, not that I know a lot about floating-point math, but why does it use floats? It seems kind've standard in C++ to use doubles.
.h or .hpp are both C++ headers. Double-precision math is much slower computationally and only take 4 bytes instead of 8. Also graphics APIs are setup to deal with floats, not doubles. Furthermore, double precision is rarely needed in graphics anyway.
-
most people use .h(I think), but sfml is not the only lib which uses .hpp. Another (very popular) example would be boost.
However it doesn't matter which extension they have.
I think Float matters for vram, OpenGL and DirectX both use floats, so it wouldn't make sense that sfml takes doubles and then converts them.
-
OpenGL uses floats.