0

I'm trying to draw a WriteableBitmap on the screen without having to use a form. This is because I want to draw an overlay for an existing game. I've managed to do this by using a form with an Image in it where I draw the WriteableBitmap to, but a transparent form by itself already uses a lot of CPU causing the game's FPS to drop quite a bit. Would it be possible to create some kind of drawing layer or a custom Hwnd to draw on to prevent this?

Update

I'm still trying to figure this out. I noticed creating a custom Hwnd does not seem to be possible, but what about a DrawingContext? Could this be created without having a window?

Tim
  • 123
  • 12
  • What is a *WriteableBitmap*? Are you using any particular technology (UI/graphics toolkit)? If so, please add the appropriate tag. – O. R. Mapper May 11 '14 at 12:36
  • It's a .NET class. Added the tag. – Tim May 11 '14 at 12:41
  • Thanks. After checking the [appropriate .NET docs](http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap%28v=vs.110%29.aspx), I found out that class is in the `System.Windows.Media.Imaging` namespace, hence I added the *WPF* tag. Assuming that that's what you are using, as there are various UI toolkits for .NET around. – O. R. Mapper May 11 '14 at 12:44
  • 1
    I apologize for the confusion! I, indeed, am using WPF to try this but I figured since transparency gives such big performance issues in WPF there might be better ways to achieve this than with WPF. – Tim May 11 '14 at 12:48

0 Answers0