Hello I am trying to load and bind textures in another thread while the rendering thread is showing a loading screen.
I am trying to create a shared context and set that to the current then do all the work and then set the context of the rendering thread back to current. This is the code in my loading thread (AsyncTask): EGL egl = EGLContext.getEGL(); EGLContext context = null; EGLContext sharedContext = null; EGL10 egl10 = (EGL10)egl; context = egl10.eglGetCurrentContext(); sharedContext = egl10.eglCreateContext(egl10.eglGetCurrentDisplay(), mEglConfig, context, null); javax.microedition.khronos.egl.EGLSurface drawSurface = egl10.eglGetCurrentSurface(EGL10.EGL_DRAW); javax.microedition.khronos.egl.EGLSurface readSurface = egl10.eglGetCurrentSurface(EGL10.EGL_READ); egl10.eglMakeCurrent(egl10.eglGetCurrentDisplay(), drawSurface, readSurface, sharedContext); // Load and bind textures mGL.glFlush(); egl10.eglMakeCurrent(egl10.eglGetCurrentDisplay(), drawSurface, readSurface, context); Right now I am stuck om eglGetCurrentSurface throws a IllegalArgumentException. Any pointers would be appreciated. Thx -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en