This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Blit multisample GLSurfaceView to MediaCodec input surface in Android

Hello,

I'm trying to blit multisample GLSurfaceView to MediaCodec-provided input surface. Unfortunately, the target surface remains black. When I remove multisampling everything works fine. The multisampling setup is done using a subclass of GLSurfaceView.ConfigChooser. The blit is performed using the following code:

eglMakeCurrent(display, codecInputSurface, glSurface, context)

glReadBuffer(GL_COLOR_ATTACHMENT0)
val drawBufs = intArrayOf(GL_COLOR_ATTACHMENT0)
glDrawBuffers(1, drawBufs, 0)

glBlitFramebuffer(
0, 0, videoWidth, videoHeight,
0, 0, videoWidth, videoHeight,
GL_COLOR_BUFFER_BIT,
GL_NEAREST)

What am i doing wrong? Thanks in advance!

Parents Reply Children
No data