• Advertisement
Sign in to follow this  

Simple Direct3D

This topic is 4982 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

Can anyone please give me a small piece of code that plots pixels/draws line in Direct3D? I have already successfully created the surface etc. but would really appreciate a simple drawing example. Cheers!

Share this post


Link to post
Share on other sites
Advertisement
Direct3D nowadays is so heavily geared up to 3D hardware accelerated graphics that the old days of pixel plotting and line drawing are tricky to implement - at least at a decent speed. If you have the surface you can lock it and obtain a pointer to the data, use the pixel format and pitch and calculate the offset for pixel plotting etc. for line drawing you just need to implement your own bresenham.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement