Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 20

Thread: Q: Space Partitioning Trees.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Intern Contributor
    Join Date
    Apr 2015
    Well, so rebuilding the VBO is not a practice with culling ? What is then ? I am just looking for a definitive answer, method.
    Can you elaborate
    ... unnecessary. You can use glMultiDrawElements to draw 5-6 separate ranges from the (static) VBO. The octree search would append one element onto the count and indices arrays for each node which passes.
    Also the other obvious solution to that is maybe to have a VBO/VAO for each leaf , then only rebind the leaves which intersect the frustum. So here arises the Question is rebinding bettter than rebuilding ? Guess yes ?

    Code :
    bool view_Culling(CFrustum& frusrum, COctree *node)
    if (!node)
        return false;
    if (frusrum.CubeInFrustum(node->GetCenter().x, node->GetCenter().y, node-       >GetCenter().z,(node->GetWidth()/2.0f)))
        if (node->IsSubDivided())
            view_Culling(frusrum, node->OctreeNodes()[TOP_LEFT_FRONT]);
            view_Culling(frusrum, node->OctreeNodes()[TOP_LEFT_BACK]);
            view_Culling(frusrum, node->OctreeNodes()[TOP_RIGHT_BACK]);
            view_Culling(frusrum, node->OctreeNodes()[TOP_RIGHT_FRONT]);
            view_Culling(frusrum, node->OctreeNodes()[BOTTOM_LEFT_FRONT]);
            view_Culling(frusrum, node->OctreeNodes()[BOTTOM_LEFT_BACK]);
            view_Culling(frusrum, node->OctreeNodes()[BOTTOM_RIGHT_BACK]);
            view_Culling(frusrum, node->OctreeNodes()[BOTTOM_RIGHT_FRONT]);
            //use prebuilded vbo here
            //or push these vertices here in a list later build a dynamic vbo
            //from them
            return true;
    return false;
    Last edited by Asmodeus; 08-27-2015 at 03:28 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts