Jump to content
  • Advertisement
Sign in to follow this  
Quasius

OpenGL How to read back transformed coordinates

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

Is it possible in the OpenGL API to transform (rotate) a point and then save the result? I don't just want to apply rotations for rendering with glRotatef. I want to rotate a point and then save the result. Or do I just need to build my own rotation functions for this?

Share this post


Link to post
Share on other sites
Advertisement
On SM4 hardware, that should be possible with "transform feedback", but I would think twice (actually... thrice) before using it.

Rotating some points (if that's all you need) is really a lot easier by using standard rotation functions (possibly paired with translation). It's something that works out of the box and pretty much "for free". Or, compose your own matrix and feed that to the GL.
Doing your own rotation math will work too, and it will probably be a lot easier than transform feedback, too (and won't require newest generation hardware).

Share this post


Link to post
Share on other sites
Why would you want to do that? Are you intending to use OpenGL to compute stuff you need in your game logic? If that's the case, it probably is better to write your own routines.

Share this post


Link to post
Share on other sites
Quote:
Original post by SnotBob
Why would you want to do that? Are you intending to use OpenGL to compute stuff you need in your game logic? If that's the case, it probably is better to write your own routines.


Yes, that's what I wanted to do. I just wrote my own routines based on these replies. Thanks.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!