Lag and stuttering in WPF.

I have a planetary simulation, a very basic one and when I move the blue ball around the yellow one like earth orbiting the sun, it stutters a lot. I have 32gb of ram and a good computer, anyone have any ideas on why WPF has such bad performance when executing this code. Here is my code: https://codeshare.io/WLNMLd Thanks for the help!
No description
8 Replies
Buddy
Buddy5mo ago
Use D3DImage
Gabiel Thanos Vozimov
what is that? a sort of timer?
Buddy
Buddy5mo ago
It is a Direct3D surface, meaning you can render 3D objects on it very fast.
Gabiel Thanos Vozimov
Ah ok, would that make it very difficult? Ive never used 3d shapes before
Buddy
Buddy5mo ago
Oh, it's 2D that you are doing I suggest making a custom control and drawing directly Because with the layout controls it has to calculate the layout meaning it will be slow if you want good fps You can override the OnRender and draw from there
Gabiel Thanos Vozimov
How? Im a complete beginner so most terms dont really make sense yet.
Gabiel Thanos Vozimov
OK thanks, Ill try to learn how to do that.
Want results from more Discord servers?
Add your server
More Posts