the reason why i need to use doubles as im writing a level editor and i want to make huge landscape level could i do this using D3DCREATE_FPU_PRESERVE flag as im using directx as my graphics api
thanks for your help
doubles instead of floats
Yes, if your editor is doing floating-point computations using doubles, you''ll want to use the D3DCREATE_FPU_RESERVE flag, since D3D will set the FPU to float precision internally for perforance reasons.
Keep in mind that D3D and HW will still only take floats. This means that before you draw a region of your landscape, you''ll need to offset your double coordinates so that they are close to zero and cast them to floats.
xyzzy
Keep in mind that D3D and HW will still only take floats. This means that before you draw a region of your landscape, you''ll need to offset your double coordinates so that they are close to zero and cast them to floats.
xyzzy
You may get more benefit by defining your level as a collection of sectors. It removes any issues with floats being too small and makes it easier to do things like page in sections of the level as needed.
Stay Casual,
Ken
Drunken Hyena
Stay Casual,
Ken
Drunken Hyena
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement