Alessandro Borges wrote:

Florin is right.
But I still confuse :
* What is the real  meaning of that info given by  pixfmt ? Seens the
asked depth buffer in DirectX, but strange values in OpenGL...
* Does Java3D DirectX always uses as "default"
depthbuffer  D3DFMT_D24S8, i.e, 24 bits of depthBuffer plus 8 as stencil ?
* Does Java3D OpenGL uses 16bit depthbuffer as default ?


All this is to create a method to workaround those video cards which fails with "default" GraphicsConfiguration values, and check what kind of values of depthbuffer is possible to set from a Java3D application.



The default parameters are specify in GraphicsConfigTemplate3D default constructor min 16 bit depth buffer, 2 bit R/G/B.

OGL version of Java3D will invoke underlying ChoosePixelFormat()
with r/g/b, depth attributes set as above, then use  DescribePixelFormat()
to verify the return value indeed support the minimum requirement
(check out the OGL specification on these API)


The visual return is up to opengl library but it will return the best match. So it gives a better match if application can further limit the depthSize in GraphicsConfigTemplate3D.


For stencil buffer, Java3D first try stencil bit = 2 bit (so pixel format return has stencil buffer at least 2 bit), if fail it will fallback to stencil bit = 0 (DecalGroup will not work properly) and retry ChoosePixelFormat().


For D3D version, the current desktop color depth is used, only the depth buffer has effect when initialize the D3D context. So the only way to use different color depth is to switch display mode.

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

===========================================================================
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