Maintain Floating Point Precision after Device Creation

Language:

When a Device object is created, the common language runtime will change the floating-point unit (FPU) to single precision to maintain better performance. To maintain the default double precision FPU, which is default for the common language runtime, use the CreateFlags.FpuPreserve flag when creating a Device object as in the sample code below.

[C#]
Device device = null; // Create rendering device PresentParameters presentParams = new PresentParameters(); device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing | CreateFlags.FpuPreserve, presentParams);


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center