Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ElGrimo

Best way to draw individual pixels?

This topic is 5750 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am currently trying to draw single pixels with Direct3D8, but I don''t know what''s the most efficient way to do it. I tried to lock the backbuffer, but it does not work... The only other solution I can think of is creating a surface, lock it, write my pixels, then use CopyRects... does not seem really efficient to me... Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
How about rendering vertices? (mmm??)

[edited by - xaxa on December 23, 2002 7:31:54 PM]

Share this post


Link to post
Share on other sites
You can lock the backbuffer with most newer 3d cards I think, but you need to specify D3DPRESENTFLAG_LOCKABLE_BACKBUFFER in the presentation parameter "Flags". This is however not recommended, although I haven''t found a faster method when doing fullscreen individual pixelplotting (for instance when drawing a fractal).

The other method I''ve used is a textured quad using D3DPOOL_MANAGED for storage. Lock the texture surface and modify directly though the pointer. This method was about 30-40% slower than the first method on my hardware when plotting all pixels on a screen. (You don''t need to use copyrects)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!