From: Terry Welsh (mogumbo++at++totalmail.com)
Date: 03/14/2003 11:05:46
I'm trying to use a pthread to load a model file. I call the following function as a seperate thread right before I start my main loop. With Performer 2.5 on Irix, I can see mymodel.flt on the screen. With Performer 3.0 on Linux, I can't see the model. I tried printing out the group's child address inside and outside the thread to be sure they match, and they do. I also tried recomputing all the geosets' display lists and turning off their display lists, but that didn't help either.
If I make the app sleep for a couple seconds before it starts the main loop, then I can see the model with Performer 3.0. It's as if the group node is looking at some cache that contains no data if I start trying to draw before the model finishes loading. Anyone have any theories about what could be causing this problem??
void* threadFunc(void* data){
pfGroup* root = (pfGroup*)pfdLoadFile("mymodel.flt");
group->addChild(root);
pthread_exit(NULL);
}
Terry
_____________________________________________________________
Get Your Free Email at http://www.totalmail.com
_____________________________________________________________
Select your own custom email address for FREE! Get you++at++yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
This archive was generated by hypermail 2b29 : Fri Mar 14 2003 - 11:06:34 PST