Hi Guang,

  Some more comment on this. Some PC graphics cards don't
support a separate Z-buffer for the right and left eye,
but instead share the same Z-buffer. In this case we
have to clear left and right buffer separately instead of
setting STEREO_BOTH and clear only once at the beginning of
each loop. In retained mode (non-pure immediate mode)
Java3D will do this automatically when property
j3d.sharedstereozbuffer is set (by default).
Note that this doesn't affect the
buffer swap.

Thanks.

- Kelvin
----------
Java 3D Team
Sun Microsystems Inc.

------------- Begin Forwarded Message -------------

Delivered-To: [EMAIL PROTECTED]
MIME-Version: 1.0
Date: Fri, 30 Nov 2001 15:03:49 -0800
From: Kelvin Chung <[EMAIL PROTECTED]>
Subject: Re: [JAVA3D] Images not stable
Comments: To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]


>Delivered-To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>Date: Fri, 30 Nov 2001 14:59:29 -0800
>From: Kelvin Chung <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] Images not stable
>Comments: To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>
>Hi Guang,
>
>   There is bug in the test program
>(1) In renderRight()
>        gc.clear();
>        gc.setBufferOverride(true);
>        gc.setStereoMode(GraphicsContext3D.STEREO_RIGHT);
>
>    clear() will only clear STEREO_LEFT buffer since
>    it is set before. We should put this after
>    gc.setStereoMode(GraphicsContext3D.STEREO_RIGHT);
>    Best of all, setting GraphicsContext3D.STEREO_BOTH
>    will only invoke clear() once instead of twice.
>(2) There is no need to invoke swap() two times
>    - one for each buffer. Instead swap() will swap
>    both left/right buffer.
>(3) No need to invoke
>         gc.setBufferOverride(true);
>    every frame, only one at the beginning is good
>    enough.
>(4) There is no distingiush between left and right
>     GraphicsContext3D.
>     gc = canvas.getGraphicsContext3D();
>     ...
>     gcLeft = canvas.getGraphicsContext3D();
>     They are the same.
>
>I've modify your program (see attachment)
>and it seems to run fine.
>

I attach the wrong file without setBufferOverride(true)
Here it is again.

- Kelvin

------------- End Forwarded Message -------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to