doubles instead of floats

Started by
12 comments, last by SKREAMZ 20 years, 3 months ago
how would i go about setting dx3d to use doubles instead of floats, i have tried but to no avail thanks for your help.
Blaaaaa Blaaaa Blaa errrrr!!!! Bla?
Advertisement
You can''t

Regards,
If you mean the D3DX libraries, then no, I don''t think there''s a way to make them use doubles instead of floats.

But if you''re talking about the rendering pipeline, you can create your D3D device by using the D3DCREATE_FPU_PRESERVE flag. This will make the hardware use doubles instead of floats to calculate things inside the card. Note that this will cause a performance hit.

neneboricua
Of course you can. Use D3DCREATE_FPU_PRESERVE in your device create flags.
________________________________________________Chris McGuirkLead Programmer - Axiom 3D EngineC# gaming, the way of the future!http://www.axiom3d.org
Of course you can. Use D3DCREATE_FPU_PRESERVE in your device create flags.
________________________________________________Chris McGuirkLead Programmer - Axiom 3D EngineC# gaming, the way of the future!http://www.axiom3d.org
quote:Original post by neneboricua19
If you mean the D3DX libraries, then no, I don''t think there''s a way to make them use doubles instead of floats.

But if you''re talking about the rendering pipeline, you can create your D3D device by using the D3DCREATE_FPU_PRESERVE flag. This will make the hardware use doubles instead of floats to calculate things inside the card. Note that this will cause a performance hit.

neneboricua


That''s Right !
All the D3DCREATE_FPU_PRESERVE flag does, is tell D3D to save/restore the floating point control word at all API entrypoints. I don''t believe there is any way to tell D3D to use doubles internally. Even if you could, it would not matter really, since to my knowledge, there is no consumer 3D hardware available which supports them anyway.

xyzzy

quote:Original post by neneboricua19
But if you''re talking about the rendering pipeline, you can create your D3D device by using the D3DCREATE_FPU_PRESERVE flag. This will make the hardware use doubles instead of floats to calculate things inside the card. Note that this will cause a performance hit.


No, this isn''t what D3DCREATE_FPU_PRESERVE does. As its name suggests it simply preserves the FPU state when it makes it''s own calls which requires that it save the save, do it''s own work with floats, then restore the state. And it does this with EVERY D3D call you make. So unless you really need it, don''t do it.


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena
quote:Original post by xyzzy00
I don''t believe there is any way to tell D3D to use doubles internally. Even if you could, it would not matter really, since to my knowledge, there is no consumer 3D hardware available which supports them anyway.


Well, even without hw support, it would help with any calculations done in software. Even if those values are truncated down to a float when passed to hw, they''d be calculated at a higher resolution. But it''s a moot point since you can''t do it anyway.


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena
quote:Original post by DrunkenHyena
No, this isn''t what D3DCREATE_FPU_PRESERVE does. As its name suggests it simply preserves the FPU state when it makes it''s own calls which requires that it save the save, do it''s own work with floats, then restore the state. And it does this with EVERY D3D call you make. So unless you really need it, don''t do it.

My mistake then. I must have missunderstood the docs on this.

Thanks to xyzzy and DrunkenHyena for clearing this up.

neneboricua

This topic is closed to new replies.

Advertisement