GDI+ performance for pixel level rendering [closed]
I am doing some animation based on an algorithm that is supposed to render a scene at 800 x 600 resolution. It will essentially be redrawing each pixel for 开发者_如何学Cevery "frame" at, hopefully, no less than 30 FPS.
Would this be possible?
I guess I would be drawing bitmaps.
Thanks
The fastest bitmap pixel format on most hardware is 32PArgb. A 800x600 bitmap takes about 8.5 milliseconds on my laptop when drawn unscaled with Graphics::DrawImage(). It has decent graphics hardware. This goes up to 12 msec for other pixel formats.
What you can't predict is how much time you'll burn rendering the scene. That's going to set your true FPS limit. Graphics libraries like DirectX and XNA store texture bitmaps in video memory to speed up the rendering, you won't get this from GDI+.
You haven't told us how you intend to draw the scene (using what method). If by "pixel level" rendering you mean calling SetPixel()
method, you should take a look at things like http://supercomputingblog.com/graphics/using-lockbits-in-gdi/
The push of modern hardware is way, way, way in excess of those demands.
精彩评论