Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: rendering a scene graph with a constant number of draw calls

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2006
    Location
    San Francisco, California
    Posts
    23

    Lightbulb rendering a scene graph with a constant number of draw calls

    My app's renderer does some batching of geometry but the draw calls issued are still proportional to scene graph size. I'm still CPU bound, because of scene traversal, among other things. I can continue to optimize that, but I also wanted to consider other options.

    The vast majority of geometry doesn't change between frames, so I'm wondering if this sort of architecture would be a good idea:

    To render a frame:

    1. The renderer processes a list of scene changes and updates the VBO(s) representing the entire scene
    2. The renderer calls glDrawElements a constant number of times (not proportional to scene size) to render all geometry


    VBOs of different usage (GL_STATIC/DYNAMIC/STREAM_DRAW) could be used according to the frequency with which things in the scene change.

    The main upside is that there's potentially very little work outside of GL to be done each frame if not much has changed. But if the tessellation size of something in the scene has changed, then there's possibly a lot of shuffling and re-indexing of the VBO to be done.

    Any thoughts appreciated!

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2006
    Location
    San Francisco, California
    Posts
    23
    Thinking a bit more: if I were to use a dynamic allocation scheme for regions in the VBO, then I would only need to shuffle around the index buffer when something changes size.

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
  •