# VTK8.2: Color buffer depth

**URL:** https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402
**Category:** Development
**Created:** [March 5, 2019, 5:12am UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402 "2019-03-05T05:12:57Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![hmxhiu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/a4c791/32.png) [@hmxhiu](https://discourse.vtk.org/u/hmxhiu)
#### Post date: [March 5, 2019, 5:12am UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/1 "2019-03-05T05:12:57Z")

</div>

I’m currently running VTK8.2 and python3.7 on the new Mac Mini 2018. However, the vtkPropPicker throw the following error:

> ERROR: In /VTK 8.2.0/Rendering/Core/vtkHardwareSelector.cxx, line 288  
> vtkOpenGLHardwareSelector (0x7fa1d4a9aa80): Color buffer depth must be at least 8 bit. Currently: 0, 8, 8

The vtkPropPicker was working with VTK8.1 but not sure why it does not work with VTK8.2

---

<div class="post-metadata">

### Author: ![ken-martin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ken-martin/32/884_2.png) [@ken-martin](https://discourse.vtk.org/u/ken-martin)
#### Post date: [March 5, 2019, 6:18pm UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/2 "2019-03-05T18:18:35Z")

</div>

I believe this is fixed in VTK master.

---

<div class="post-metadata">

### Author: ![hmxhiu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/a4c791/32.png) [@hmxhiu](https://discourse.vtk.org/u/hmxhiu)
#### Post date: [March 6, 2019, 2:42am UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/3 "2019-03-06T02:42:12Z")

</div>

Yes. This problem is resolved in VTK-master.

---

<div class="post-metadata">

### Author: ![cvandijck](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cvandijck/32/562_2.png) [@cvandijck](https://discourse.vtk.org/u/cvandijck)
#### Post date: [June 25, 2019, 9:22pm UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/4 "2019-06-25T21:22:40Z")

</div>

Hi,

I’m still experiencing issues with the colorbuffer in my picker. Is this problem resolved in the final 8.2.0 release (current release branch 3bea923b3c)?

If not, could you point me to the commit that fixed the issue in the master branch?

Thanks,  
Christophe

---

<div class="post-metadata">

### Author: ![ken-martin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ken-martin/32/884_2.png) [@ken-martin](https://discourse.vtk.org/u/ken-martin)
#### Post date: [June 26, 2019, 2:33pm UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/5 "2019-06-26T14:33:42Z")

</div>

Fixed in [https://gitlab.kitware.com/vtk/vtk/merge\_requests/4940](https://gitlab.kitware.com/vtk/vtk/merge_requests/4940) which is 7 months old but too new for 8.2

---

<div class="post-metadata">

### Author: ![cvandijck](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cvandijck/32/562_2.png) [@cvandijck](https://discourse.vtk.org/u/cvandijck)
#### Post date: [June 26, 2019, 2:54pm UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/6 "2019-06-26T14:54:37Z")

</div>

Hi Ken,

Thanks for the info. I fixed my issues by turning off FXAA anti-aliassing, don’t really know why that influenced the color buffer.

---

<div class="post-metadata">

### Author: ![ken-martin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ken-martin/32/884_2.png) [@ken-martin](https://discourse.vtk.org/u/ken-martin)
#### Post date: [June 26, 2019, 4:04pm UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/7 "2019-06-26T16:04:41Z")

</div>

I can answer that 🙂 The color buffer code checks for error conditions and if it finds an error it returns 0 for that color. Unfortunately the old code did not clear any prior errors before checking. So any prior OpenGL error would cause the red channel to report 0 depth. In this case it seems FXAA is causing an OpenGL error on your system which then causes the issue in reporting the color depth. The fixed code should be immune to prior opengl errors.

---

<div class="post-metadata">

### Author: ![Maximilien\_Mayya](https://discourse.vtk.org/user_avatar/discourse.vtk.org/maximilien_mayya/32/1416_2.png) [@Maximilien\_Mayya](https://discourse.vtk.org/u/Maximilien_Mayya)
#### Post date: [March 6, 2020, 5:27pm UTC](https://discourse.vtk.org/t/vtk8-2-color-buffer-depth/402/8 "2020-03-06T17:27:44Z")

</div>

Hello,  
I’m running into the same problem here on tag v8.2.0, running under iOS simulator.  
I tried turning the FXAA off with no success. I also applied the error cleaning part of the patch mentioned above (couldn’t apply the patch directly - too far from v8.2.0):

> // make sure we clear any errors before we start  
> // otherwise we may get incorrect results  
> while (glGetError() != GL\_NO\_ERROR)  
> {  
> }

Error persists!  
Would the iOS simulator and OpenGL2 combination be the problem?  
Thanks a lot in advance
