[RESOLVED] Limit OpenGL viewable(visible) area?
I created simple map renderer for GTA2.
Im just creating new editor for it. So far it's good. Renders fine.
Original editor is limiting the viewable or visible area. If whole map will be visible at one time then the FPS will decrease dramatically. That's why only small area of map should be viewable at one time. Anything that is outside of specific boundaries will not be visible (Black).
For example: you look the map like through keyhole.
You move camera and now what was hidden will become visible and anything there was before will be now outside of the viewable area.
I guess i need to limit the viewport?
I started with OpenGL only 1,5 months ago. So i don't know all commands.
Here is example. Like you see, only very small portion is visible, rest is black.
http://img258.imageshack.us/img258/7712/areaview.jpg
So, question: how to do that? I don't need you to code for me but just hints or links somewhere.
Re: Limit OpenGL viewable(visible) area?
Check out the View Frustum Culling.
Regards,
Kevin Choong
Re: Limit OpenGL viewable(visible) area?
Excellent, just what i need.
Thanks alot Kevin.
Re: Limit OpenGL viewable(visible) area?
Quote:
Originally Posted by
BytePtr
Excellent, just what i need.
Thanks alot Kevin.
Hey BytePtr, you are welcome. :)