# How to highlight the covered object?

**URL:** <https://discourse.vtk.org/t/how-to-highlight-the-covered-object/8673>\
**Category:** Development\
**Tags:** proposal\
**Created:** [June 7, 2022, 2:06am UTC](https://discourse.vtk.org/t/how-to-highlight-the-covered-object/8673 "2022-06-07T02:06:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ren](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/ed655f/32.png) [@Ren](https://discourse.vtk.org/u/Ren)\
**Post date:** [June 7, 2022, 2:06am UTC](https://discourse.vtk.org/t/how-to-highlight-the-covered-object/8673/1 "2022-06-07T02:06:50Z")

</div>

Hello, guys!  
I would like to highlight the object, if the object is covered by the other, it also can been saw.  
In OpenGL, it use GL\_DEPTH\_TEST, I don’t know how to do in VTK, anyone knows?Thanks

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mau_igna_06/32/8064_2.png) [@mau\_igna\_06](https://discourse.vtk.org/u/mau_igna_06)\
**Post date:** [June 7, 2022, 10:04am UTC](https://discourse.vtk.org/t/how-to-highlight-the-covered-object/8673/2 "2022-06-07T10:04:24Z")

</div>

I think this will serve you as starting point  
[https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx)

---

<div class="post-metadata">

**Author:** ![Ren](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/ed655f/32.png) [@Ren](https://discourse.vtk.org/u/Ren)\
**Post date:** [June 8, 2022, 7:14am UTC](https://discourse.vtk.org/t/how-to-highlight-the-covered-object/8673/3 "2022-06-08T07:14:32Z")

</div>

I think the property should be used in single actor, instead of whole render window.
