I just ran into a problem using multiple threads with java3d.

I have two BranchGroups bg1 and bg2. bg is live, bg2 is not (yet).

thread1 adds bg2 to bg1 :
  bg1.addChild(bg2);

... while thread2 adds something to bg2 :
  bg2.addChild(something).

someShape is never rendered, but when changing the code to :

thread1:
synchronized (bg2) {
  bg1.addChild(bg2);
}

thread2:
synchronized (bg2) {
  bg2.addChild(something);
}

... everything works like it should.

Because I am using java3d in conjunction with RMI I will probably run into many 
problems
of this kind ... my question is : Are there any plans to make java3d threadsafe 
(because
java3d is already using many threads internal, this sould not be to hard !?!) ?
Has anybody else worked with multiple threads and can tell me about pitfalls I will
encounter ? ;)

thnx,
  Niklas

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to