0

I'm simulating a depth camera in matlab (and I don't have the automated driving toolbox) and was trying to access the depth buffer (z-buffer) from the figure that matlab plots.

I've implemented twerdster's solution, but the depthData returns an empty 0x1084895568 size array.

I compiled the mex function with debug on and checked it out in visual studio (following this guide) and I saw that glGetIntegerv(GL_VIEWPORT, viewport); is setting viewport to [0, 0, 1084895568, 0]. Any ideas why?

Toby
  • 21
  • 4
  • Do you even have a valid GL context bound to your thread when you are calling that? – derhass Apr 03 '20 at 23:04
  • I'm not very familiar with how matlab uses openGL, but I did confirm openGL was being used by running `fig.Renderer` which returned `'opengl'` – Toby Apr 04 '20 at 18:27

0 Answers0