xamarin / urho

Code to integrate with the Urho3D engine
Other
463 stars 122 forks source link

UrhoSharp starves WinForms message queue #325

Open qwertie opened 6 years ago

qwertie commented 6 years ago

On my laptop (Core i5 2.35GHz - no speed demon, but some games like L4D2 are playable), the UrhoSharp FeatureSamples (WinForms version) is virtually unusable because Urho somehow blocks the WinForms message queue so that no input can be processed (including WASD and mouse control). The WPF version works okay.

Certain demos (Sprites, AnimatingScene, Physics, SoundEffects, Chat...) work fine, but most samples completely lock out user input and the app must be terminated via Task Manager. This behavior seems to be tied to whether or not the sample can reach 60fps. For example StaticScene normally locks out user input, but by holding W, eventually (after 10-30 seconds) it processes the message queue which allows the camera to move forward until the framerate increases. As I move the camera around it becomes obvious that it stops processing mouse input whenever the framerate drops below 60.

qwertie commented 6 years ago

P.S. The BasicTechniques sample works 50% of the time. The other 50% it looks like this...

image

or like this...

image

And PBRMaterials is always blank.