sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.69k stars 641 forks source link

Register to render loop #1032

Closed Ixiodor closed 6 years ago

Ixiodor commented 6 years ago

Hello, there is a way to register to a renderloop without actually using RenderLoop.Run? What i want is a controllated render loop(V-Sync working) and a callback to "Draw" in my form to notify me when to draw.

xoofx commented 6 years ago

Use RenderLoop.NextFrame and you can handle your loop on your own, that's what RenderLoop.Run is doing:

https://github.com/sharpdx/SharpDX/blob/bdb12ec420d2b6ff32da184453c722380596ceb8/Source/SharpDX.Desktop/RenderLoop.cs#L206-L219