Hi everybody,
First of all I'm relatively new in developing with Equalizer. As a
student at the university of Kempten (Germany), I'm currently working
on a project to create an application running on a cluster, consisting
of four workstations, each harbouring two Nvidia Quadro Cards. This
cluster is used to drive a CAVE consisting of three walls, with two
beamers for each wall, to achieve passive stereoscopic rendering.
The goal of the whole project is to develop a simple game on top of an
already existing scenegraph, that has to be integrated into Equalizer.
So far integrating the scenegraph has run pretty well - but now I have
reached a point, where I could use some advice...
Generally my implementation is using the concept of dynamic data distribution.
A few days ago I noticed that my current implementation is running,
but has some severe memory leaks:
Each frame the application is leaking a huge amount of memory, and
even more of it if I'm doing transformations on scenegraph nodes or
dynamically add more nodes to the graph.
Currently the root node of my graph, distDSG::DistNode resides in the
FrameData object derived from co::Serializable.
All the scenegraph nodes themselves, are implementing co::Serializable
as well. (DELTA changetype)
When adding a child node to a parent, I set an appropriate DirtyBit
(DIRTY_CHILDREN) in the parent node.
In distDSG::DistNode::serialize() I serialize the ID of both children
and in distDSGNode::deserialize(), I create a new instance of the
appropriate class (via an also serialized class identifier) and map it
to the ID:
...
LeftChild = getInstanceOf(leftChildClass);
localNode->mapObject(LeftChild, leftChildID);
...
I'm manipulating the graph via eq::Config, through functions mapped to
keyboard shortcuts.
After manipulating or adding a node of the graph, I set the
appropriate DirtyBits of the the node itself, as well DirtyBits on all
of it's parents up to the root node, that mark a node that has dirty
children.
In eq::Config::startFrame() commit() gets called on the FrameData object.
Calling commit() on FrameData or a node of the graph, automatically
passes the call on to all children, so that every node gets committed
for each frame. On calling commit I store the version value for the
root node inside the FrameData object and the versions for a the
children of a node inside the parent-node itself.
Now in eq::Channel::frameDraw() I draw the graph using a simple class
called Renderer, which is member of eq::Window, calling
Renderer->Render() invokes sync(frameID) on the root node and
afterwards the traversal of the graph.
Similarly to the commit() call that gets passed on, I pass on the
sync() call through the whole graph, using the version values stored
inside the parent nodes.
Generally my implementation seems to be working, but in its current
state it is leaking those huge amounts of memory every frame, after
adding nodes to the graph and even more, when performing
transformations onto graph nodes.
I'm pretty sure that I got something wrong in the way manipulations on
nodes are distributed and synchronized, but even after days of testing
I couldn't find a solution to my problem.
The project is still running until the month July and I already spoke
to the other people involved, that once we have reached a final and
working state we might be willing to hand our source out, to serve as
an example application. Unfortunately right now there seems to be no
freely available implementation of a dynamic scenegraph based on
Equalizer(?).
Anyways I would greatly appreciate if someone could point me towards
the cause of the described issue...
Thanks and best regards,
Matteo
_______________________________________________
eq-dev mailing list
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com