Link to home
Start Free TrialLog in
Avatar of Plague1392
Plague1392

asked on

How Do You Draw A Line With Direct Draw?

Is there a Direct Draw or DirectX function to allow you to draw a line on the back buffer?  I couldn’t find one so I’m currently using the LineTo() GDI function to draw straight on the screen.  If there isn’t a function available can you use LineTo() to draw on the back buffer?  If not is there another way of doing it.

Thanks a lot for your help
Avatar of thresher_shark
thresher_shark

What version of directX are you using and what language?
Avatar of Plague1392

ASKER

Ooops, Sorry about that.  I'm using C and DirectX 8, but the book I'm reading is actually based on version 6 so a lot of what I'm using is probably more version 6.  I've been using the latest version of the DirectX data types though, e.g. LPDIRECTDRAW7, LPDIRECTDRAWSURFACE7 etc.  
I draw my lines and other curves by using algorithms and plotting individual pixels.

Jonn
ASKER CERTIFIED SOLUTION
Avatar of mh2
mh2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the help and for naming an algorithm.  I'd been searching for an appropriate algorithm but couldn't find one.