libgdx/gdx-video

Play a video using modelInstance

suhaibroomy opened this issue · 1 comments

I want to manage the texture using model instance as it manages the transforms and all. I figured I can achieve this if i can play it on the GLTexture instance instead of the Android Texture. But I can't figure out a way to replace android Texture with GLTexture of libGDX. Android's Media Player requires a Surface in which we can pass a SurfaceTexture but not GLTexture.

 private int[] textures = new int[1];
 GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, textures[0]);
 player.setSurface(new Surface(new SurfaceTexture(textures[0])));

Any help would be appreciated

I would say that it isn't feasible. The amount of performance needed to copy the texture over on 30fps would make it painfully slow. Therefore I would recommend against trying something like this.

Instead, just get the transform matrix of the model instance, and use that for the video transform.