Issue
I've been studying opengl es recently and trying to access the camera on android platform. All I need to do is to load camera data frame by frame through ndk and then load it into GL texture for further process. Is there any help or suggestion? It is highly appreciated if there is sample code! thank you!
Solution
Send the camera output to a SurfaceTexture. Each frame will be available as an "external" GLES texture. This is significantly more efficient than receiving camera frames in a buffer and manually uploading them with glTexImage2D()
.
See Grafika (https://github.com/google/grafika) for multiple examples. The code there is written in the Java language, but GLES is essentially the same in Java or C/C++.
Answered By - fadden
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.