gdx-video
gdx-video copied to clipboard
surface texture resolution does not change
since the texture id never changes the surfarce texture always has the same resolution even when the video resolusion changes.
this is what i did to fix it:
private void initializeMediaPlayer()
{
if (handler == null)
handler = new Handler(Looper.getMainLooper());
Gdx.app.postRunnable(() -> {
textureBuffer = BufferUtils.newIntBuffer(1);
Gdx.gl.glGenTextures(1, textureBuffer);
textureID = textureBuffer.get(0);
Gdx.gl.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, textureID);
handler.post(() -> {
player = new MediaPlayer();
videoTexture = new SurfaceTexture(textureID);
initialized = true;
});
});
}
Do you mind making a PR with a fix?