Simple Direct3D
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!
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement