This class is defined under Android:
public abstract class EGLObjectHandle {
private final long mHandle;
protected EGLObjectHandle(long handle) {
mHandle = handle;
}
public long getNativeHandle() {
return mHandle;
}
}
and also
public class EGLContext extends EGLObjectHandle {
private EGLContext(long handle) {
super(handle);
}
}
now my problem is that I want to create an EGLContext with my handle. How to do this? before I do it with the function below but it's not working anymore on PIE
private android.opengl.EGLContext createSharedEGLContextObj(long handle) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
Class<?> classType =Class.forName("android.opengl.EGLContext");
Class<?>[] types = new Class[] { long.class };
Constructor constructor=classType.getDeclaredConstructor(types);
constructor.setAccessible(true);
Object object=constructor.newInstance(handle);
return (android.opengl.EGLContext) object;
}
I need an EGLContext
because I need to pass it to a procedure who require an EGLContext parameter, like for example: createEgl14( android.opengl.EGLContext sharedContext)