Jump to content
  • Advertisement
Sign in to follow this  
coolTenchi

How to read an onscreen postion of a rendered D3D poly

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

Hi All, got what is probably an insanly simple question. How do I get the onscreen coordinates of a poly i've already drawn in D3D? I've seen a few iems on the forums here about it and it looks like you have to recalculate the vector using a function that seems to recalculate the vector and return the on screen postion but it seems rather wasteful to re calculate a postion thats already been calculated. Is it posible to read the onscreen postion created when the poly was drawn? Ta [Edited by - coolTenchi on December 1, 2005 9:23:00 AM]

Share this post


Link to post
Share on other sites
Advertisement
Hi,

No, you cannot get it back from the card after rendering (AFAIK).
Use D3DXVec3Project, wasteful or not :)

kp

Share this post


Link to post
Share on other sites
You can get the on-screen coordinates of a vector through shaders, but if you need it in the program, I think you're out of luck.

Share this post


Link to post
Share on other sites
Cheers,

Its only for some basic 2D collision detection so I'll probably just do normal radius based colisions, it'll be quicker than having to re calculate the on screen coordinates. ;)

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!