Closed jianhui1012 closed 7 years ago
@jianhui1012 The texture is invalid when you use it in a new thread. If you want to take a screen shot, glReadPixels method will take a lot of time. I think using OpenGL PBO is a better way for screen shot.
Thank you for answer ! Are there any reference documents or examples available by the way of OpenGL PBO?
OtherWise,Why The texture is invalid when you use it in a new thread? I know The onDrawFrame Method is called at a GLThread. I guess if call gl.glReadPixels method in a new thread ,the gl object in the onDrawFrame Method is locked and cannot be read,I checked the API 23 related source code, did not find.
I found directly onDrawFrame Method for screenshots with 2 seconds delay,then try start a thread for screenshots is blank ,i don't know what's caused it ?