• Advertisement
Sign in to follow this  

creating a grid.

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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--

Share this post


Link to post
Share on other sites
Of course you can draw lines with the DirectX API. Use DrawPrimitive for example with the D3DPT_LINELIST or D3DPT_LINESTRIP primitive type.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement