jingwood / d2dlib

A .NET library for hardware-accelerated, high performance, immediate mode rendering via Direct2D.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

D2DControl usage

scomx opened this issue · comments

commented

Hi,

I am just starting to explore this library and looking for an example of proper D2DControl usage. My main question is what the best practice is for triggering OnRender? The only way I have been able to make it work is through a timer driven call that invokes Invalidate() every N milliseconds on my D2DControl derived control. This, however, results in 0 FPS with ShowFPS property enabled which makes me think I am not doing it right.

Thanks for any pointers or tips.

commented

If you're doing an animation, there are a lot of samples in the project.

If you're just doing some drawing, just call Invalidate() when your state changes.