Hi,

I don't think it's that expensive and anyway you are only using one node.  Put
it the background node and then see how costly it is.

Regards,
Renoir


Ben Arbel wrote:

> Hi,
>
> isn't there a cheaper solution ? the system im working on is performance
> dependent , i prefer
> not to use any unneeded objects, especially not the expensive j3d ones.. : )
>
> -----Original Message-----
> From: Renoir Sewjee [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 24, 2001 8:34 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] Canvas3D
>
> Hi,
>
> Use a background node:
>
> Background background;
>
>  .  .  .
>
>  background = new Background();
>  background.setCapability(Background.ALLOW_COLOR_READ);
>  background.setCapability(Background.ALLOW_COLOR_WRITE);
>  background.setApplicationBounds(everywhere);
>  rootGroup.addChild(background);        // rootGroup is the BranchGroup that
> contains everything
>
>  setBackgroundColour(Color.green);
>
>  .  .  .
>
>  public void setBackgroundColour(Color colour)
> {
>     background.setColor(colour.getRed()/255.0f,
>                                      colour.getGreen()/255.0f,
>                                      colour.getBlue()/255.0f);
>  }
>
> Ben Arbel wrote:
>
> > Hey 3D Guys
> >
> > A very simple question this time.. any idea why after i set the color for
> a
> > canvas3D
> > it goes back to being black ?
> > i tried using canvas.setBackground(java.awt.color.Green) and it changes
> for
> > a split second
> > and then goes back to black.. is this a bug ? am i doing something wrong ?
> >
> > thanks,
> >
> > Ben Arbel
> > Xtivia Technologies
> > Web
> > http://www.xtivia.com
> > http://www.comsoft.co.il
> > Contact
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > work phone(NJ): 732-248-9399
> > work phone(Israel):  972-9-9598999
> > cell phone: 972-51-404167
> >
> >
> ===========================================================================
> > 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".

Reply via email to