Jump to content
  • Advertisement
Sign in to follow this  
thezbuffer

How does D3DXLine do the transforms?

This topic is 4591 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 added 3 lines to my scene just to show me where the axis are but I noticed occasionally the axis flip in tho oppisite direction. e.g. x axis is line from (0,0,0) to (5,0,0) I create a new Line object then .Begin .DrawTransform(array of the 2 points above, View/Proj matrix, color) .End All looks good 90% of the time but if I zoom in to the point where the (5,0,0) end passes through the near plane the axis is drawn as if it was (0,0,0) to (-5,0,0). As soon as I rotate or zoom out such that there is no near plane intersection then it draw correctly again. At 1st I assume the ViewProj was wrong but its the same view/proj that the rest of the scene uses and they don't flip. Instead, of course, as I zoom in the polygons are correctly clipped. So I would not have been surprised to see the axis disappear as one end gets clipped, but flipping the other way seems just wrong. Hopefully its something really obvious - since its just test code its just mildly annoying at the moment.

Share this post


Link to post
Share on other sites
Advertisement
I can't find it now, but there was a similar thread on this sort of thing a few days ago..

I've had it happen myself as well - I can't really think quite why it does this, but it's definitely something to do with near plane clipping.

If it's of any use, I've not had this problem using regular geometry and line lists / line strips.

hth
Jack

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!