Results 1 to 4 of 4

Thread: Vertex Lists and Frustum culling question

  1. #1
    Guest

    Vertex Lists and Frustum culling question

    After reading several sources I am still a bit confused about using vertex lists and hidden object removal/frustum culling, clipping, etc.

    If I created a terrain mesh larger than what can be seen in my view frustum and loaded it up in vertex lists, how then, do you go about having protions of the vertex list taken out that are out of view?

    Obviously I want to limit the items that have to be sent to the video card but I don't know how that would be applied when using vertex lists.

    I have built a Quadtree implementation from scratch and I use the leaf nodes from it to draw out a mesh. Right now I loop through in immediate mode drawing each polygon out one by one. I want to convert this to vertex arrays and have the ones outside the frustum to not even make it to the drawing pipeline. So far Is till don't understand how to accomplish this.

    If someone can explain or provide links to something that explains how this is done I would be very appreciative.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    569

    Re: Vertex Lists and Frustum culling question

    From my understanding the OpenGL pipeline will perform clipping and culling (if you enable it) and will automatically discard fragments that lie outside of your view frustum at this stage. True they will still make it to the pipeline but they will be only subject to transformations which isn't all that bad. The overhead of trying to determine which vertices would end up outside of the view frustum and dynamically updating your vertex arrays would probably end up being more work anyway.

    additionally, vertex arrays (VARS) need to upload vertex data from system memory to video memory each time they are rendered. To further optimize you should investigate vertex buffer objects (VBOs) which allow your vertex data to be uploaded once to video memory and reside there which does away with the need to access the bus in order to upload your vertex data.

    cheers.

  3. #3
    Guest

    Re: Vertex Lists and Frustum culling question

    So you are basically saying I really don't have to do anything but but a couple glEnable calls?

    If that is the case then what is the purpose of quadtrees and octrees etc? I guess they would be used to keep different vertex lists out of the pipeline. Is that correct?

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Vertex Lists and Frustum culling question

    For this kind of optimization to work, you'll need a coarse grain, because it would be slower to send the card only needed vertices each frame.
    It is a good thing to cull by big chunks.

Similar Threads

  1. Question about frustum culling
    By somboon in forum OpenGL: General
    Replies: 15
    Last Post: 08-16-2010, 12:09 PM
  2. Frustum Culling
    By wow in forum OpenGL: General
    Replies: 11
    Last Post: 02-03-2004, 07:32 PM
  3. question related to frustum culling
    By candy in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 01-22-2004, 05:59 PM
  4. octrees with frustum culling question
    By Walantis in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 02-04-2002, 09:38 AM
  5. Frustum Culling with a set of Index Vertex Arrays?
    By Pete Bassett in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 01-14-2001, 08:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean