Jump to content
  • Advertisement
Sign in to follow this  
ToR911

OpenGL Using OpenGL to calculate area of sight

This topic is 3792 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'm trying to find a good algorithm for calculating an area of sight for a camera stationed at a certain point in a 3d map faced in a certain angle. since thats what GFX cards do half the time, i was wondering, if i could somehow use OpenGL and the power of the GFX card by sending it the 3d map, and camera settings and recieve back to the code, which points on the map are visible by the camera Thanks

Share this post


Link to post
Share on other sites
Advertisement
It would be lovely but there's no such point.
The first issue is related to HW-in-the-loop. By the day your poll travels to the GPU and back you would have wasted a ton of perf in PCIe transactions and driver overhead. GPUs typically come to render a at least a frame later - and I'm being optimistic.
The second issue is that, by letting your GPU do that, you're basically losing the benefit so, since you're doing that anyway, why to not render as well?
I'm not sure I understand your question.

Share this post


Link to post
Share on other sites
I think you're going to have to be more specific as to what it is you want to do.

If you simply render the scene, from the camera's perspective, to the backbuffer then what you might consider that what get drawn are the all points visible by the camera.

If all you want to know is the size of visible volume then you can calculate that from the view frustum.

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!