Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SKREAMZ

doubles instead of floats

This topic is 5418 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how would i go about setting dx3d to use doubles instead of floats, i have tried but to no avail thanks for your help.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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 !

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!