public void CreateSurface(EGLConfig config) { if (refHolder == null) { CreatePBufferSurface(config); return; } IEGL10 egl = EGLContext.EGL.JavaCast <IEGL10> (); eglSurface = egl.EglCreateWindowSurface(eglDisplay, config, ((Java.Lang.Object)Holder), null); if (eglSurface == null || eglSurface == EGL10.EglNoSurface) { throw EglException.GenerateException("EglCreateWindowSurface", egl, null); } }