M
M
Monokl2020-05-24 22:15:30
OpenGL
Monokl, 2020-05-24 22:15:30

How to draw a depth buffer on a square in OpenGL ES?

How can you "see" what is drawn in the depth buffer? The bottom line is to draw the depth on a square and use these "pixels" to calculate the distance to the point where there was a click on the smartphone screen (translating screen coordinates to world coordinates) on OpenGL ES 2 or 3, where it is not possible to read from depth using glReadPixels (or did I make a mistake?), if there is a more beautiful way to do this, then tell us about it, thanks for your attention!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question