CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Location
    Estonia
    Posts
    235

    [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!

  2. #2
    Join Date
    Mar 2004
    Location
    KL, Malaysia
    Posts
    63

    Re: Limit OpenGL viewable(visible) area?

    Check out the View Frustum Culling.

    Regards,
    Kevin Choong

  3. #3
    Join Date
    May 2005
    Location
    Estonia
    Posts
    235

    Re: Limit OpenGL viewable(visible) area?

    Excellent, just what i need.


    Thanks alot Kevin.
    Rate my post if i it was useful!

  4. #4
    Join Date
    Mar 2004
    Location
    KL, Malaysia
    Posts
    63

    Re: Limit OpenGL viewable(visible) area?

    Quote Originally Posted by BytePtr View Post
    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
  •  





Click Here to Expand Forum to Full Width

Featured