Skip to main content

Switch question

2 replies [Last post]
nitro
Offline
Joined: 2004-09-12
Points: 0

I have got a BranchGroup with several subbranches. What is the difference between using a switch and detaching / reataching the subbranches to the BranchGroup when needed or not.

Are there some performance improves when using a switch?
Can I use a switch on a compiled scenegraph?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Alessandro Borges

As far as I know Switch is the less traumatic option.
It just enable/disable BG rendering. All BG sub scene still are there.
I think attach/dettach/reattach is hard work.
Unless you really want to release a BG sub-scene and never user it again, go for Switch.

Yes, you can compile, just check Javadoc about CapabilityBits you must set.

Alessandro

java3d-interest@javadesktop.org wrote:
I have got a BranchGroup with several subbranches. What is the difference between using a switch and detaching / reataching the subbranches to the BranchGroup when needed or not.

Are there some performance improves when using a switch?
Can I use a switch on a compiled scenegraph?
---
[Message sent by forum member 'nitro' (nitro)]

http://www.javadesktop.org/forums/thread.jspa?messageID=37133àp

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
[att1.html]

jada
Offline
Joined: 2004-03-17
Points: 0

Yes, you should consider using Switch node if you plan to reuse the sub-scene graphs. Dettach scenegraph is very hard work for j3d and it isn't MT safe at present. You have to do it with care.

- Chien.