LightBox: Performance-Test

Using an OpenGL-Viewport, a curious behaviour takes place:

rendering ~1000 items (partially overlapping) is slow if they are painted directly onto the scene background.

If however an item covers the area they’re all in and lies in the background, rendering is a *lot* faster.

 

A performance test function should help determining bottlenecks in display performance:

 

void performanceTest(ETestMode mode)
{
  // disable loading & rendering of textures
  // create a grid of 200x200 items, non-overlapping 
  // or overlapping, depending on the mode
  switch (mode)
  {
    case eNonOverlapping:
      break;
    case eOverlapping:
      break;
    default:
      break;
  }
}

aging items in effect

here’s a first screenshot of an item that has its age connected to its size (-> it’s growing – very slowly). The ‘age’ property is output in ms, so in order to have it scale slowly, it has to be multiplied by a very small value.

a box that is slowly growing as it's getting older

spring cleaning

some management in the event handlers to make sure gui items being processed don’t get removed/moved around in the item queue.

serialization of items has been expanded to allow for local copies of items including their full hierarchy. Child objects that reference other objects within the hierarchy should now be guaranteed to point to the same (relative) item within the copy, while references pointing at items outside the hierarchy should remain the same on a copied item.

I’ve found a neat little code profiler that allows me to find bottlenecks in my program flow:

Very Sleepy

Continue reading

…and from the chaos a scenegraph emerged

the tree view class is working, albeit with a few glitches still.

In order to get the scene graph tree working, there were a whole lot of problems with the grid class to be solved. That took its sweet time, but it’s (mostly) behaving the way it’s intended now.

What remains to be done is icon support in list views / labels, as well as the implementation of the eventhandler in the scene graph tree view.

After all, we want to be able to interact with the tree, not just look at all those pretty names.