EGLImpl: eglCreateContext: properly handle shared_context

This commit is contained in:
Mis012
2024-06-22 14:19:31 +02:00
parent 92e2c06347
commit da90302946
3 changed files with 25 additions and 25 deletions

View File

@@ -22,10 +22,10 @@ import android.view.SurfaceView;
import javax.microedition.khronos.egl.*;
public class EGLImpl implements EGL10 {
private native long native_eglCreateContext(long egl_display, long egl_config, EGLContext share_context, int[] attrib_list);
private native long native_eglCreateContext(long egl_display, long egl_config, long share_context, int[] attrib_list);
public EGLContext eglCreateContext(EGLDisplay display, EGLConfig config, EGLContext share_context, int[] attrib_list) {
long native_egl_context = native_eglCreateContext(display.native_egl_display, config.native_egl_config, share_context, attrib_list);
long native_egl_context = native_eglCreateContext(display.native_egl_display, config.native_egl_config, (share_context != null) ? share_context.native_egl_context : 0, attrib_list);
if (native_egl_context == 0) {
return EGL10.EGL_NO_CONTEXT;
}