Jump to content
  • Advertisement
Sign in to follow this  
flashinpan

Drawing horiz and vert lines in DirectX 9

This topic is 4861 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

I am trying to learn some DirectX basics in VC++ Express 2005. I have a demo program which draws a "primitive" which I guess turns out to be a triangle filled with shades of yellow. Cool, I guess. I was wondering how I could draw a grid with 7 columns and 6 rows? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
You could have a multi dimensional array of points set out as that grid and load it in wireframe

The only problem would be that you have the diagonal line across each square.

Maybe you should use GDI+?

As an educated guess render the PrimitiveType as a pointlist instead of a triangle strip?

Share this post


Link to post
Share on other sites
Quote:
Original post by Xpyder
You could have a multi dimensional array of points set out as that grid and load it in wireframe

The only problem would be that you have the diagonal line across each square.

Maybe you should use GDI+?

As an educated guess render the PrimitiveType as a pointlist instead of a triangle strip?



Do GDI+ and DirectX mix well together? My focus is on learning DirectX.


The Primitive in question seems to be "built-into" DirectX. I don't see anything setting up the points of the triangle. Just ONE call to draw the Triangle..that is it.

Share this post


Link to post
Share on other sites
Thats what i mean Tom - as me and pulpfist said there are different ways to render it - triangle list is the usual but you should consider LineLists when you call DrawPrimitives

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!