-
March 19th, 2009, 04:21 PM
#1
[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.
Last edited by BytePtr; March 19th, 2009 at 04:23 PM.
Rate my post if i it was useful!
-
March 20th, 2009, 04:13 AM
#2
Re: Limit OpenGL viewable(visible) area?
Check out the View Frustum Culling.
Regards,
Kevin Choong
-
March 20th, 2009, 04:53 AM
#3
Re: Limit OpenGL viewable(visible) area?
Excellent, just what i need.
Thanks alot Kevin.
Rate my post if i it was useful!
-
March 20th, 2009, 08:36 PM
#4
Re: Limit OpenGL viewable(visible) area?
Originally Posted by BytePtr
Excellent, just what i need.
Thanks alot Kevin.
Hey BytePtr, you are welcome.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|