Public Group

# Best way to plot lines/pixels in Direct3D 8

This topic is 4878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello all, this is my first post in the GameDev.net forums. My question is more related to DirectX programming than anything else, but I figured I was probably better off posting in the beginners forum first, due to my implicit beginner status. I'm writing a 2D based game in Direct3D using Kelly Dempski's tutorial from http://www.gamedev.net/reference/articles/article1434.asp It gives me much better "sprite" handling functionality than Direct Draw, but I don't know the best way to go about drawing the primatives that Direct Draw handles easily. First up: Pixels. Is there any way, or is it even a good idea to lock the back buffer in Direct 3D to plot pixels? Or would it be a better idea to make a quad that takes up the whole screen area and plot pixels to a texture? Secondly, lines: If it turns out to be efficient to plot pixels using the above two methods then I would just use line drawing algorithms in conjunction with them, but there were another couple of ways I could see of doing it that I would appreciate advice on. One is just to use wireframe polygons to simulate lines by having two of the vertices on the same point. The other way I could see would be to use rotated/scaled quads. This would give me lines that I can use transperancy on, but I was a bit sceptical about how slow they would be to draw. I also couldn't think of a way to draw diagonal lines of any size using this method without locking the vertex buffer (it seemed to me that manipulating them with matrices would skew the quad). Thanks for reading this, any help is much appreciated.

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5

• 12
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633314
• Total Posts
3011326
• ### Who's Online (See full list)

There are no registered users currently online

×