user1036756
user1036756

Reputation: 137

Faster Way to change pixels than SetPixel()

I have been trying to use SetPixelV for windows to display an image directly on the screen, as I am sure you know it is unbearably slow, and too slow for what I wan't to use it for. Could anyone point me in the right direction of how to Display Directly to the Screen (not in a window) that is faster the SetPixelV? (Does not have to be platform-independent)

Upvotes: 6

Views: 5162

Answers (3)

Mark Ransom
Mark Ransom

Reputation: 308530

You can build up your image in memory and use SetDIBitsToDevice to copy it.

Upvotes: 6

ebutusov
ebutusov

Reputation: 573

Maybe BitBlit is what you're looking for.

Upvotes: 2

Rob Kennedy
Rob Kennedy

Reputation: 163357

You could call BitBlt. That's assuming you already have the whole image — it doesn't set individual pixels (unless you blit a bunch of one-pixel images, but then you'd probably be in a worse position than where you started, speed-wise).

Upvotes: 3

Related Questions