[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] determining depth of z-buffer



In practical terms, you'll almost always find 24 bit Z on the desktop and
16 bits on things like cellphones.

There have been a few machines with 32 bit Z in the past - but they are rare.

  -- Steve

>
> 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 public_webgl@khronos.org.
>> To unsubscribe, send an email to majordomo@khronos.org with
>> the following command in the body of your email:
>> unsubscribe public_webgl
>> -----------------------------------------------------------
> -----------------------------------------------------------
> You are currently subscribed to public_webgl@khronos.org.
> To unsubscribe, send an email to majordomo@khronos.org with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
>
>



-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------