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: octree like data structure and sorting

  1. #1
    Junior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    127

    octree like data structure and sorting

    Hello,
    for my rendering purpose I actually don't need a reak octree, just a lot of regular boxes. For sorting them front to back I thought about to compare the dot products of the boxes center and the view vector and then sort the dot products from small to large. I tried it on a piece of paper with 8 boxes and 27 boxes and it seems to work.

    I can imagine to do kind of pre-sorting. For 3 axis I have 8 case of the viewing vector. e.g. x>=0, y>= 0, z>=0, etc.
    I want to create indices that I can use to access the
    correct index buffer (vbo+ibo) for rendering the boxes in the desired order.

    Anybody gained epxeriences with this kind of sorting ?
    May it work ? May it not work ?

    regards,
    lobbel

  2. #2
    Junior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    127

    Re: octree like data structure and sorting

    Solved

    regards,
    lobbel

Posting Permissions

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