Recommendations for improving bitmap display speed
- From: Dave Rayment <drayment@xxxxxxxxxxxxx>
- Date: Sun, 10 Apr 2005 14:55:02 -0700
Hi,
I'm working on an emulator at the moment, and I need to update the display
50 times a second. I'm using a 16-colour indexed bitmap, and generating it is
no problem (I'm using LockBits/UnlockBits and writing the data directly using
a lookup table). However, when it comes to outputing the bitmap to my form,
it's taking a long time - for the native resolution image (256 x 192) it's
around 3ms, but when I double the size to 512 x 384 it takes 10ms, which is
unacceptable. I have around 20ms for the whole emulation per-frame, so I'd
like the display to be as quick as possible.
I'm using NearestNeighbor interpolation when outputing at anything but the
native size, and I've experimented with double buffering and only updating
selective regions, but without much success.
Would anyone be able to recommend any way to improve things? I'm especially
interested in solutions for fast scaling to 2x or 3x sizes. Also, would I get
better speed by switching to managed DirectX? What about stretch blitting
using the Windows API through Interop?
I can post my current code if needed, which is written in C# for .NET 1.1.
Thanks for your time.
Cheers,
Dave
.
- Follow-Ups:
- Re: Recommendations for improving bitmap display speed
- From: Bob Powell [MVP]
- Re: Recommendations for improving bitmap display speed
- Prev by Date: ArgumentException @ Image.FromStream(stream)
- Next by Date: Multithreaded IntPtr Hdc problem - Common or obscure error?
- Previous by thread: ArgumentException @ Image.FromStream(stream)
- Next by thread: Re: Recommendations for improving bitmap display speed
- Index(es):
Relevant Pages
|