Sign in to follow this  

DirectX Pixel Plotting

This topic is 4750 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 a directdraw coder who thinks its time to switch to direct3d. However, the applications I develope require me to work at pixel level, meaning i draw the screen pixel by pixel. I have searched the web with no luck on ways to do something like this in direct3d. Anyone have any ideas? Thanks. [Edited by - aprentice on December 14, 2004 11:23:35 AM]

Share this post


Link to post
Share on other sites
Many of the same techniques can still be applied. You can lock the back buffer and index indiviual pixels just like a surface. Dx9 still supports surfaces. Some prefer to create a simple textured quad though, and do manipulations to the texture.

If you use a quad, specify your coordinate position to be D3DFVF_XYZRHW, which gives screen relative positioning.

Share this post


Link to post
Share on other sites
Quote:
Original post by aprentice
However, the applications I develope require me to work at pixel level, meaning i draw the screen pixel by pixel.


Have you considered an alternative approach to drawing your graphics? Modern graphics accelerators work most efficiently when large batches of data are processed in parallel - exactly as opposed to per-pixel manipulation.

If you do absolutely want to draw in "software", I recommend creating system-memory textures as the intermediate surfaces, performing all data manipulation on them, and finally transfer the complete frames to the video memory to be drawn as a texture (via a screen-filling quad, as davidx9 also recommends). However, you'll miss most benefits of 3d acceleration this way.

Share this post


Link to post
Share on other sites
The application i'm working builds pixels out of a non standard image data. I guess using one tex quad that covers the whole screen could do the job, but how would it be speed wise?

Share this post


Link to post
Share on other sites
You might just as well stick with DirectDraw. Locking a texture and manipulating the pixels isn't any faster than writing directly to the screenbuffer. Besides that, you're pulling up your system requirements for no benefit.

Share this post


Link to post
Share on other sites

This topic is 4750 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this