That's
tricky, so you need to use tricks ;)
The
problem is that the renderer runs in another thread that the one in which you're
modifying the shape3d.
1.
first option is to stop the renderer before you remove the geometries and start
it again after you've finished adding. pros: very easy to implement. cons: if
the addition is time consuming, you may have rendering artifacts on the screen -
the renderer is stopped !
2.
have a special branch group for your shape 3d. Then when you want to modify it,
you detach the branch from the scenegraph, do your changes and attach it again.
cons: detaching / attaching may be time consuming.
3. use
the flip technique: you have a switch with two components. At a given time, only
one of them is displayed. You always modify the invisible one, then flip the
switch. cons: a little more code to write, but that one gives the best visual
experience.
4. use
immediate mode. cons: for profis ;)
Cheers,
Florin
=========================================================================== 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". |
- [JAVA3D] Shape3D problem Brobbey,Isaac (neuron)
- [JAVA3D] Shape3D problem Ibrahim Z Mohammad
- Re: [JAVA3D] Shape3D problem Florin Herinean
- Re: [JAVA3D] Shape3D problem Ibrahim Z Mohammad
- Re: [JAVA3D] Shape3D problem T.J.Hunt
- Re: [JAVA3D] Shape3D problem Ibrahim Z Mohammad
- Re: [JAVA3D] Shape3D problem Florin Herinean
- Re: [JAVA3D] Shape3D problem Ibrahim Z Mohammad
- Re: [JAVA3D] Shape3D problem pumpkin