creating a grid.

Started by
2 comments, last by hunta 18 years, 9 months ago
Hello! I've started working on a mission editor for my game and I thought having a grid would be helpful to place objects on. I'de like each axis to have a different color. I'm guessing I could draw it manually playing with vertices but I'm wondering if there is a simpler way. Suggestions?
Advertisement
No, there's no other way than doing it manually. but it's really an easy task. Simply make two loops. The first draws all horizontal lines, the second loop all vertical lines.
I really don't have the specifics right now, as I'm not on my computer, but I know you can draw lines with DX. That's how I do my grids.

--Vic--
Of course you can draw lines with the DirectX API. Use DrawPrimitive for example with the D3DPT_LINELIST or D3DPT_LINESTRIP primitive type.

This topic is closed to new replies.

Advertisement