You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix external texture issues on Android
#rb jack.porter #ROBOMERGE-SOURCE: CL 8210582 via CL 8210585 via CL 8211298 #ROBOMERGE-BOT: (v401-8057353) [CL 8211403 by dmitriy dyomin in Main branch]
This commit is contained in:
@@ -1694,6 +1694,7 @@ public class MediaPlayer14
|
||||
private int mTextureID = -1;
|
||||
private float[] mTransformMatrix = new float[16];
|
||||
private boolean mTextureSizeChanged = true;
|
||||
private int GL_TEXTURE_EXTERNAL_OES = 0x8D65;
|
||||
|
||||
private float mUScale = 1.0f;
|
||||
private float mVScale = -1.0f;
|
||||
@@ -1840,6 +1841,10 @@ public class MediaPlayer14
|
||||
frameUpdateInfo.VOffset = 1.0f - mVOffset;
|
||||
}
|
||||
|
||||
// updateTexImage binds an external texture to active texture unit
|
||||
// make sure to unbind it to prevent state leak
|
||||
GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
|
||||
|
||||
return frameUpdateInfo;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1333,6 +1333,7 @@ public class VideoDecoder
|
||||
private int mTextureID = -1;
|
||||
private float[] mTransformMatrix = new float[16];
|
||||
private boolean mTextureSizeChanged = true;
|
||||
private int GL_TEXTURE_EXTERNAL_OES = 0x8D65;
|
||||
|
||||
private float mUScale = 1.0f;
|
||||
private float mVScale = -1.0f;
|
||||
@@ -1482,6 +1483,11 @@ public class VideoDecoder
|
||||
Entry<Double,Double> frameTimeDuration = getFrameTimeDuration(getFrameTimestamp());
|
||||
frameUpdateInfo.Timestamp = frameTimeDuration.getKey();
|
||||
frameUpdateInfo.Duration = frameTimeDuration.getValue();
|
||||
|
||||
// updateTexImage binds an external texture to active texture unit
|
||||
// make sure to unbind it to prevent state leak
|
||||
GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
|
||||
|
||||
return frameUpdateInfo;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1387,6 +1387,7 @@ class WebViewControl
|
||||
private int mTextureID = -1;
|
||||
private float[] mTransformMatrix = new float[16];
|
||||
private boolean mTextureSizeChanged = true;
|
||||
private int GL_TEXTURE_EXTERNAL_OES = 0x8D65;
|
||||
|
||||
private float mUScale = 1.0f;
|
||||
private float mVScale = -1.0f;
|
||||
@@ -1516,7 +1517,11 @@ class WebViewControl
|
||||
// Get the latest video texture frame.
|
||||
|
||||
mSurfaceTexture.updateTexImage();
|
||||
|
||||
|
||||
// updateTexImage binds an external texture to active texture unit
|
||||
// make sure to unbind it to prevent state leak
|
||||
GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
|
||||
|
||||
return frameUpdateInfo;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user