This project is read-only.

Render using Hardware?

Jul 21, 2011 at 1:24 PM

Has anyone thought about how to render this nifty control using hardware acceleration?

Aug 11, 2011 at 6:30 AM

SourceGrid is using WinForms to draw everything, it's not the libraries responsibility to draw itself with hardware acceleration

Aug 11, 2011 at 2:50 PM

True, but if it were possible as a Custom Control to overload the drawing methods to use DirectX instead, it would give a major performance boost.

Aug 11, 2011 at 10:41 PM

>> but if it were possible as a Custom Control to overload the drawing methods to use DirectX instead

It is.

>>it would give a major performance boost.

Without proper measurements, it's difficult to guess how much performance we might gain.    Also, what do you mean by 'performance'?  I doubt that a casual WinForm app needs 60fps refresh rate.

Aug 14, 2011 at 3:14 PM

Sure.  A bit more background might help.

We're building a real-time grid-based application that requires frequent updating in a number of different ways.  We're currently using Source Grid version 2 since the latest version is not quite as fast.  We've added a lot of custom code/optimisations and we're at the point where the biggest hit is from the actual drawing to the screen.  We think our next step is going to have to be to move to WPF, but it would be so much easier if we could just draw the control using DirectX.  Just not sure how difficult that would be.

Aug 23, 2011 at 7:36 AM

Thanks for the background, that does really give a better picture of why you want to do that. I've worked some time ago with DirectX 6, and 7, so thats quite a time ago.

As I said, i think that it should not be a big problem to replace drawing with blitting straight to some DirectX surface, especilally when you have done already many code optimisations.. If you decide to give this idea a try, please let us know whether it pays off or not