[Public WebGL] determining depth of z-buffer

Vladimir Vukicevic [email protected]
Wed Feb 2 12:50:50 PST 2011


Yep, you can call

   gl.getParameter(gl.DEPTH_BITS)

to obtain the number of bits of depth precision.  (Similarly with RED/GREEN/BLUE/ALPHA.)  Note that this returns the bits of the currently bound FBO, so if you're using FBOs, make sure that you're querying the right FBO (or null to get the backbuffer).

   - Vlad

----- Original Message -----
> Following up on my clipping problem setting the far clip plane I was
> wondering how to tell how many bits the Z-buffer has and
> whether I can find out using WebGL directly.
> 
> I've just started using the GLView Extensions Viewer
> (http://www.realtech-vr.com/glview/) to browse a great deal of OpenGL
> and
> video card data and while lookingto see if I can see what my Z-buffer
> depth is I found the following:
> 
> Pixel Formats:Depth Buffer Modes
> 0 bpp
> 16 bpp
> 24 bpp
> 
> Are these the available Z-buffer depths?
> 
> Is there a way I can find the Z-buffer depth using WebGL so I can
> either collect forensic data from deployments or optionally
> use different near and far clipping planes?
> -----------------------------------------------------------
> You are currently subscribed to [email protected]
> To unsubscribe, send an email to [email protected] with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------




More information about the public_webgl mailing list