Screenshots fixed

Screenshots were broken in the JOGL CanvasPeerImpl. I fixed this. And just as Goliat suggested, I implemented a mechanism to let the BufferedImage generation and the file writing run in a separate thread to safe time. Works perfectly.

I set the getSnapshot methods in View and CanvasPeer(Impl) to deprecated and added createScreenshot(File) methods to CanvasPeer(Impl) and Canvas3D, that work partly asynchronously. So they’re accessable from Canvas3D, where they belong to. I checked the Java3D API and couldn’t find any method for screenshot generation. Certainly there is, but they’re not in View. So the compatiblity to Java3D is not decreased.

Any objections?

Marvin

No objections. Just double-check test cases which does screenshots silently (i think they were deleted some time ago).

[quote="<MagicSpark.org [ BlueSky ]>,post:2,topic:27976"]
No objections. Just double-check test cases which does screenshots silently (i think they were deleted some time ago).
[/quote]
I have removed the screenshot generation from one or two test cases, since it is overkill for those ones. And I decided create a dedicated testcase for screenshots, so that this one becomes more clear to everyone. See org.xith3d.test.render.ScreenshotTest.

Are you talking about a specific one?

I have removed the screenshot generation from one or two test cases, since it is overkill for those ones. And I decided create a dedicated testcase for screenshots, so that this one becomes more clear to everyone. See org.xith3d.test.render.ScreenshotTest.

Are you talking about a specific one?
[/quote]
No I’m not.
Alright, good job (as always :wink: ).

I’ve just introduced an interface called com.xith3d.utility.screenshots.ScreenshotEngine, which is implemented by CanvasPeer and Canvas3D. This will help to pass an instance of ScreenshotEngine to a part of your code to produce screenshots.

Actually I have taken parts of my old org.xith3d.render.base.ScreenshotEngine to code it. And renamed my interface to EnvScreenshotEngine extending the new com.xith3d. interface.