-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Produced SurfaceTexture is only 1 color #96
Comments
I think it has to do with wrong UV mapping of the texture |
I think it is only sampling the color of the left bottom pixel of the image and displaying it as whole |
Hello, which texture do you draw? The producedSurfaceTexture or something defined by yourself? And what's your producedSurfaceTexture? |
And what about the sample code of the MediaPlayer?Does it work on your device? |
Yes, the media player sample works fine. I follow the same code structure that is shown in the sample. I use the producedSurfaceTexture as tge second arg in the drawSurfaceTexture function |
Could you share your code as a project or snippet with enough information? |
https://github.com/Bosa17/TimBerr The concerned activities are ArtWorkDisplayActivity and PreviewSurfaceTextureView |
Sceneform just renders output to the surface. |
Do you know which color format outputed from the sceneform? Usually for media or camera the surface is YUV format so the ProducedTextureTarget should be GLES11Ext.GL_TEXTURE_EXTERNAL_OES. But for format like Bitmap ARGB8888, the ProducedTextureTarget should be GLES20.GL_TEXTURE_2D. |
I tried using both. The GLES20.GL_TEXTURE_2D produces no result and onGlDraw is only called once. The other format produces the same single color results |
Is there any scenario where RawTexture just gives 1 cokor resukt? |
onGlDraw only called once. That's to say, onFrameAvailable is only called once. Maybe you can check whether the sceneForm has triggered rendering the surface |
It may not has relation with the RawTexture.. |
I check the startMirroringToSurface again. |
I am trying to use sceneform's startMirroringtoSurface method on the GLSurfaceTextureProducerView inherited views following MediaPlayer exmple. But I am getting single color results when using canvas.drawSurfaceTexture
Please help me to understand how this is happening or how I can rectify it
The text was updated successfully, but these errors were encountered: