Smith, David wrote:

Thanks Kelvin.

I removed the threading aspect.  And that caused me
to reorg my code a little, and voila, no NullPointerException.

However, I get only the background color in my buffer.

The things I noticed differently in the examples, is
that they add the off screen canvas to the view, before
they add the scene to the scene graph, and the fact that
they use a Raster object to display the image.

Are either of these things required?


No.

My basic design is to create an offscreen canvas on the fly,
attach it to my view, render into it, dump the data, and
remove the canvas from the view.

Does this sound reasonable?


This should work. What thread are you using to run the code:

View  view = ...
view.addCanvas3D( offscreencanvas );
view.stopView();
view.renderOnce();
view.startView();

offscreencanvas.renderOffScreenBuffer();
offscreencanvas.waitForOffScreenRendering();
view.removeCanvas3D( offscreencanvas );


Don't use Behavior callback, try running on user thread. A simple test case would be [EMAIL PROTECTED] for us to see what's wrong.

- Kelvin
-----------
Java 3D Team
Sun Microsystems Inc.

===========================================================================
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