gles20

How can i run GLES20.glReadPixels on separate thread in android?

不打扰是莪最后的温柔 提交于 2019-12-23 06:43:36
问题 I am currently working with ARCore to classify images and put objects on the images. But it seems like ARCore camera doesn't provide any way to get the pixelbuffer. then i came accross How to take picture with camera using ARCore and according this we can copy the frame from OpenGL using GLES20.glReadPixels . if i pass each frame at a time my classifier works fine but when i put GLES20.glReadPixels to get the pixel buffer in a separate thread i am getting all zeros. so basically it gives me

How can i run GLES20.glReadPixels on separate thread in android?

断了今生、忘了曾经 提交于 2019-12-23 06:42:00
问题 I am currently working with ARCore to classify images and put objects on the images. But it seems like ARCore camera doesn't provide any way to get the pixelbuffer. then i came accross How to take picture with camera using ARCore and according this we can copy the frame from OpenGL using GLES20.glReadPixels . if i pass each frame at a time my classifier works fine but when i put GLES20.glReadPixels to get the pixel buffer in a separate thread i am getting all zeros. so basically it gives me