# render-\>GetZ(x,y) error

**URL:** <https://discourse.vtk.org/t/render-getz-x-y-error/10908>\
**Category:** Development\
**Tags:** code\
**Created:** [March 7, 2023, 9:16am UTC](https://discourse.vtk.org/t/render-getz-x-y-error/10908 "2023-03-07T09:16:29Z")\
**Posts on this page:** 2\
**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:** [March 7, 2023, 9:16am UTC](https://discourse.vtk.org/t/render-getz-x-y-error/10908/1 "2023-03-07T09:16:29Z")

</div>

Dear People,  
I use render-\>GetZ(x, y) to get the Z value of my mouse in screen, but it can’t work,  
it will give an error in vtk window  
vtkOpenGLState.cxx:203 WARN| Error in cache state for GL\_READ\_FRAMEBUFFER\_BINDING  
…  
…

How to use GetZ to get the Z value?

---

<div class="post-metadata">

**Author:** ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)\
**Post date:** [March 10, 2023, 10:21pm UTC](https://discourse.vtk.org/t/render-getz-x-y-error/10908/2 "2023-03-10T22:21:51Z")

</div>

Hello,

Posting the code involved in the operation is a good start. 🙂

best,

Paulo
