Hi Simon,
I was similar problems with DirectDraw, i recommend you to download the J3D
version to OpenGL, it is more stable. I think there is a new version to
DirectDraw but I didn�t proved.
- to add children at runtime two things to consider:
1. Add the capabilities to the parent (no necessary a BranchGroup):
BranchGroup parent = new BranchGroup();
parent.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
parent.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
parent.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
// if you want to detach the branchgroup at runtime
parent.setCapability(BranchGroup.ALLOW_DETACH);
:
2.Only BranchGroups can be added at runtime(as you know):
BranchGroup child = new BranchGroup();
: // add any objects to child
:
parent.addChild(child); // add
Simon Fischer wrote:
> Hi.
>
> I want to add children (leaves, nodes, groups, whatsoever) to my
> VirtualUniverse or a BranchGraph at runtime (As far as i know only
> BranchGroups can be added). My code actually compiles fine and - well -
> to some degree works (without textures). But after a while the
> application becomes slow and the system runs out of memory.
> With textures an exception is thrown immediately: DirectDraw doesn't
> have enough memory to perform the operation.
>
> Can anybody give an example code which demonstrates how to add objects
> to a universe at runtime?
>
> Thanks a lot, Simon
>
> ===========================================================================
> 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".
===========================================================================
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".