Skip to main content

Offscreen rendering

No replies
mdomin
Offline
Joined: 2007-08-16
Points: 0

Hi!

I have a Canvas3D, showing a scene that can be manipulated with an OrbitBehavior. A second canvas' camera view should correspond to the camera view of the first canvas. The reason is that I want some sort of an orientation for the user, showing him his orientation in space, e.g. where he is looking to.
My first approach was to copy the rotational part of the camera transformation of the first, interactive canvas to the camera of the second, orientation canvas, putting the second canvas simply on top of the first with absolute layout positioning.

(panel.setLayout(null);
canvas01.setBounds(...);
canvas02.setBounds(...);
panel.add(canvas01);
panel.add(canvas02);)

I'm developing under MacOS X and here this "trick" works flawlessly. Windows XP doesn't show the second canvas and I wasn't able to find out, why.

Now I'm looking for another option. I found the example for offscreen rendering, but I'm not sure wether this would work in my case.
Does anybody here have one or two helpful hints?