mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix:xr video player bug (#14121)
* fix:xr video player compatibility on some devices shader compile error * fix:release video player framebuffer
This commit is contained in:
@@ -145,10 +145,10 @@ public class CocosXRGLHelper {
|
||||
+ "precision mediump float; \n"
|
||||
+ "in vec2 texCoord; \n"
|
||||
+ "uniform samplerExternalOES texSampler2D; \n"
|
||||
+ "out vec4 gl_FragColor;\n"
|
||||
+ "out vec4 frag_color;\n"
|
||||
+ "void main() \n"
|
||||
+ "{ \n"
|
||||
+ " gl_FragColor = texture(texSampler2D, texCoord); \n"
|
||||
+ " frag_color = texture(texSampler2D, texCoord); \n"
|
||||
+ "}";
|
||||
float[] orthoQuadVertices = {
|
||||
-1.0f, -1.0f, 0.0f, 1.0f,
|
||||
|
||||
@@ -421,6 +421,7 @@ public class CocosXRVideoManager {
|
||||
for (Map.Entry<String, CocosXRVideoPlayer> entrySet : entrySets) {
|
||||
entrySet.getValue().onGLDestroy();
|
||||
}
|
||||
GLES30.glDeleteFramebuffers(1, new int[] {renderTargetFboId}, 0);
|
||||
EGL14.eglMakeCurrent(eglDisplay, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT);
|
||||
EGL14.eglDestroySurface(eglDisplay, pBufferSurface);
|
||||
EGL14.eglDestroyContext(eglDisplay, eglContext);
|
||||
|
||||
Reference in New Issue
Block a user