Hi!
I want to make an assumption about the GraphicsContext3D.readRaster().
There are two parts of Java3D color buffer: back and front one (Java3D
operates in double-buffered mode). OpenGL glReadPixels() (readRaster() calls
glReadPixels()...) reads color data from the back buffer by defaults (the
behavior is controlled by glReadBuffer() function - Java3D Raster.setType()
analogue). Generally, the content of the back buffer is undefined when the
swap operation is complete (there are two possible cases of the back buffer
content: blit - the buffer remains as is; and flip - the buffer contains
previous frame and/or garbage). So, it seems to me the pixels reading after
the swap is incorrect. The right place for this operation is the
Canvas3D.postRender() method.
Off-screen rendering.
Why? Rendering to off-screen in system memory is impossible for most 3D
hardware, so such rendering will be in software only or in hardware with
readRaster() call. All that you need to produce large high-quality images is
available today with hardware acceleration support. Don't try to produce
large image at one rendering cycle. Divide the image by manageable parts,
render them with readRaster() call in postRender(), then combine them into
the final large. I think it's possible by using mixed-mode rendering.
Alexey Zhukov,
Software Manager,
Maris Multimedia Ltd.
e-mail: [EMAIL PROTECTED]
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/