Skip to main content

additional canvas does not always render

2 replies [Last post]
pauldb
Offline
Joined: 2003-08-30

Hi,
I am attempting to have two Canvas3D - with the same View - in my application but not to provide a stereo view, merely a duplicate view on the same screen. One canvas is small, the other large.

Sometimes both canvases are rendered and everything is how it should be. However, in about 30% of cases, one or both of the canvases do not render.

Both are added to containers (JPanel) which are already shown on the screen. I have tried this using both OpenGl and Direct3D rendering and with and without DirectDraw for Java2D. I have tried playing with Canvas3D's stopRenderer and startRenderer methods but that does not seem to make a difference but maybe I'm using it wrongly.

Please could someone tell me:
1) how to get two Canvas3D's with the same View to display correctly;
2) how to safely add and remove Canvas3D from swing containers.

Thanks,
-Paul

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jada
Offline
Joined: 2004-03-17

The test program in issue 5 might be helpful to you. Check it out :
http://wiki.java.net/bin/view/Javadesktop/Java3DTestPrograms

- Chien.

pauldb
Offline
Joined: 2003-08-30

Hi Chien,
thanks for that. I am using an NVidia card but I'm also using 1.3.2 so presumably I have the fix that was done for issue 5. I've tried the MultiCanvas test program and it all works fine. I wonder whether my issue is because I'm actually creating and destroying universes - not merely canvases.

I will investigate further, and I will maybe try and change the test program to fit with my scenario. In the meantime, if anyone knows of problems with continually creating and destroying universes, please let me know.

BTW I am cleaning up the universe as prescribed in the wiki except my canvases are all onscreen so presumably I don't need the first step in the cleanup, i.e.
canvas3d.setOffScreenBuffer(null)
or do I?

Thanks,
-Paul