Darren,

See my notes in your file, OffScreen.jav after you note Fails:
there is another note Works: and where I made changes.  The
attached zip files containes the changed code.  It seems to
do what you want now.

Til later.

Brandie

On Fri, 3
Dec 1999, Darren Boyce wrote:

> Hi --
>
> I am working on a project that requires multiple document interfaces and
> 3D graphics. This requires a way to work around the problem of
> heavyweight canvas3D and the lightweight swing components. With the
> alpha release of j3d1.2 there is the option to render the canvas3D to an
> offscreen buffer. I am trying to use this to render the contents of a
> canvas to a BufferedImage and then draw this buffered image into a
> JPanel of an JInternalFrame. Following the example provided in the
> j3d1.2 I get the offscreen buffer after postSwap() and then send this
> buffer to be drawn in the JPanel of the JInternalFrame through
> paintComponent(Graphics g) [drawImage(BufferedImage)].
>
> The problem is that the buffer is always empty (seems empty), even
> though I do not fill the buffer until after the postSwap().
>
> I hope you do not mind me including the source code I have written (it
> is in WinZip format only 4k, included are 4 source files, I can send
> other compressed formats if you need them).
>
> Has anyone got any ideas of what I am doing wrong (or have I taken the
> wrong approach?), why the buffer never contains what I render in the
> canvas3D? I have been working on this for a while now and can not seem
> to resolve this problem so any input would be appreciated.
>
> [I am working on WindowsNT, jdk1.3 and j3d1.2]
>
> regards
> Darren
>
> --
> *******************************************************************************
>
> Darren Boyce, MSc.                       [Research Assistant]
> Room 2.01,                                    Telephone +44-1179-545239
> Department of Computer Science,   Email: [EMAIL PROTECTED]
> University of Bristol,                       Internet:
> http://paramount.cs.bris.ac.uk/
> Merchant Venturers Building,
> Woodlands Road, Bristol
> BS8 1UB, UK.
> *******************************************************************************
>
>
>

offscreen_wrks.zip

Reply via email to