You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
SurfaceView implementation was merged with 99a4850, this resulted in a not supporting a correctly working snapshot api. We need to look into fixing this to work with a SurfaceView implementation. Original ticket of Snapshot functionality: #3466.
I'm currently looking into the code from Grafika. This is repo from Google where you can find a lot different code snippets related to graphics on Android.
The most promising snippet I could found was saveFrame in EglSurfaceBase. I'm looking into if that is useable for our use-case.
update: I think this would only work if we construct the Surface in java and use that reference as a base. Since we are managing this in native_map_view.cpp. I'm going to look into some NDK support on this.
I'm currently looking into a glReadPixels approach. This seems promising but wasn't able yet to pass back the bytes buffer through JNI to Java.
update: I got some code working that returns from JNI. Currently running into a java.lang.RuntimeException: Buffer not large enough for pixels exception. Some SO indicate to perform the wrap on the bytearray but that doesn't seem to resolve it.
Been getting some tips on how glReadPixels is used in this projec. Nodejs is using it through headless_view.ccp but more interesting is that macos is using it their print feature here. You can see there that the printing is executed as part of the render call, this ensures that the state is activated. Now looking into bringing that in.
Activity
tobrun commentedon Jul 27, 2016
I'm currently looking into the code from Grafika. This is repo from Google where you can find a lot different code snippets related to graphics on Android.
tobrun commentedon Jul 27, 2016
The most promising snippet I could found was
saveFramein EglSurfaceBase. I'm looking into if that is useable for our use-case.update: I think this would only work if we construct the Surface in java and use that reference as a base. Since we are managing this in
native_map_view.cpp. I'm going to look into some NDK support on this.tobrun commentedon Jul 27, 2016
This blog gives some insights into achieving off screen rendering into a bitmap through JNI.
tobrun commentedon Jul 27, 2016
I'm currently looking into a
glReadPixelsapproach. This seems promising but wasn't able yet to pass back the bytes buffer through JNI to Java.update: I got some code working that returns from JNI. Currently running into a
java.lang.RuntimeException: Buffer not large enough for pixelsexception. Some SO indicate to perform the wrap on the bytearray but that doesn't seem to resolve it.[android] #5587 - initial try to create a bitmap using glReadPixels
[android] #5587 - snapshot API on surface view, create Bitmap with a …
[android] #5587 - write bitmap to external storage
tobrun commentedon Jul 29, 2016
Been getting some tips on how
glReadPixelsis used in this projec. Nodejs is using it throughheadless_view.ccpbut more interesting is that macos is using it their print feature here. You can see there that the printing is executed as part of the render call, this ensures that the state is activated. Now looking into bringing that in.zugaldia commentedon Aug 15, 2016
Fixed via #5826.