Skip to main content
gamedev.net
🔒 Locked

Simple Direct3D

Started by themadhacker 0 replies 600+ views
Original Post
themadhacker
themadhacker
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!
Trip99
Trip99
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.
------------------------See my games programming site at: www.toymaker.info

Topic Locked

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

Sign in to reply to this topic.