Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect mathematical calculations when used in 32-bit applications #49

Open
iborzenkov opened this issue Apr 13, 2021 · 1 comment
Open
Labels
3.0 bug Something isn't working needs verification
Milestone

Comments

@iborzenkov
Copy link

I created a primitive application (.NET Framework 4.6.1) by simply placing the GLWpfControl component in the WPF window.
BugDemo.zip

In the project settings, I specified that the application is 32-bit.

The screenshot below shows the result of calculating the sum of two variables before initializing the GLWpfControl and after initializing it. It can be seen that after initialization, there are problems in calculating the sum.
picture

If I specify in the project settings that the application is 64-bit, then the amount is calculated correctly.

I use OpenTK 3.3.1, OpenTK.GLWpfContol 3.3.0

@NogginBops NogginBops added bug Something isn't working needs verification 3.0 labels Mar 21, 2022
@NogginBops
Copy link
Member

It's possible this is because we don't specify FPU_PERSERVE when we create the DirectX 9 context which can affect rounding modes for the FPU in 32-bit processes. Would be weird if it effected the sum this much though.

@NogginBops NogginBops added this to the 3.3.1 milestone May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 bug Something isn't working needs verification
Projects
None yet
Development

No branches or pull requests

2 participants