Skip to main content
gamedev.net
🔒 Locked

Pixel Plotting

Started by oooaah Jun 10, 2002 at 2:45 PM 2 replies 400+ views
Original Post
oooaah
oooaah
After a bit of reading around I found that the lock/unlock mechanism allows pixel plotting to the screen. Hooray! A faster method than GDI''s SetPixel(). But then a lot of the articles I read said this method could be very slow. Is there any other method faster than this for pixel plotting with DirectX? An example of what I want to use a pixel plotter for is a ''rain effect'' in a game. Is lock/unlock suitable for this?
The early bird may catch the worm but the second mouse gets the cheese ;)
Mark Tanner
Mark Tanner
It will be fast enough as long as you don't lock and unlock between each individual pixel. Don't write a pixelplot function that locks and unlocks. Write one that assumes the surface is already locked, its pretty simple and it will be fast.

Mark

[edited by - Mark Tanner on June 10, 2002 3:56:37 PM]
oooaah
oooaah
Cheers fo the help guys. I have been using DirectDraw but was thinking about switching to D3D anyway as you can do far more with it.
The early bird may catch the worm but the second mouse gets the cheese ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.