Hi, Thank you for taking interest in my problem.
a) Of course I add geodes to the tree, I just thought that is not an interesting part of the code. [code]rest=marchingCubesGPU(visualizing, highTh, lowTh); osg::ref_ptr<Group> grp=new osg::Group; grp->addChild(rest); //isosurface grp->addChild(vert); //interesting parts mainForm.vis->setSceneData(grp); mainForm.vis->frame(); //rest->getDrawable(0)->setDrawCallback(0); //causes exceptions //rest->getDrawable(1)->setDrawCallback(0); //causes exceptions[/code] b) It is done the same way in the currently working code, and the only possible problem is memory leaking. This is a research project, not a production level code, and my 12GB of RAM balance out any memory leaks :D I know I have memory leaks, and I tried once to eliminate them - at least the large ones, like leaking the entire 3D image (I narrowed it down to osgVolume, but could not do much about it). But my leak finding attempts failed after having spent a few days on them. One of the things I tried was compiling it on Linux and using Valgrind, but that turned out to be unfeasible, because just opening the "Open file dialog" takes 5 minutes when running the program under Valgrind, and it floods the output with "definitely leaked 4 byes here and possibly 70 bytes there" even while executing only QT code, thus completely killing my enthusiasm. If you find reduced code disadvantageous for pinpointing problem, I attach here the whole file - both the currently working version and the attempt to do away with copying arrays needlessly. Since it links to HMPC, this code is also under GPL, if anyone finds it interesting. Cheers, Dženan ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27550#27550 Attachments: http://forum.openscenegraph.org//files/marchinggpu_not_working_137.cpp http://forum.openscenegraph.org//files/marchinggpu_139.cpp _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

