zaafar / ClickableTransparentOverlay

A library for creating transparent overlay using windows API & ImGui.NET
Apache License 2.0
87 stars 33 forks source link

How to implement VSync on Render loop #45

Closed BanditTech closed 1 year ago

BanditTech commented 1 year ago

Thank you for the extremely useful architecture. I have been making great use of this as I build up my app.

I have gotten to the point in my project where I need to optimize the rate at which I am sampling data and want to match with the rate at which the target game is being refreshed. I was hoping to ask you if you know how to do this?

My tenuous information so far is that I need to change a setting in Vortice.DXGI called SynchronizeWithVerticalRetrace to true But I am not sure how I would gain the handle to the device to set that. I was hoping you might be able to point me in the right direction.

zaafar commented 1 year ago

would this help? https://github.com/zaafar/ClickableTransparentOverlay/blob/master/Examples/SimpleExample/SampleOverlay.cs#L12

BanditTech commented 1 year ago

thank you greatly, I knew I was completely missing something.