Hi people I am trying to migrate an opengl sample that it used to work under the old (3) version of the sdk, and so far, I am not having much success...
this is my function for setting up the opengl environment: boolean initOpenGL() { egl = (EGL10) EGLContext.getEGL(); display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); int[] majorMinor = new int[2]; egl.eglInitialize(display, majorMinor)) int[] numConfigs = new int[1]; egl.eglGetConfigs(display, null, 0, numConfigs); int configAttributes[] = { EGL10.EGL_RED_SIZE, 5, EGL10.EGL_GREEN_SIZE, 6, EGL10.EGL_BLUE_SIZE, 5, EGL10.EGL_ALPHA_SIZE, 0, EGL10.EGL_DEPTH_SIZE, 16, // EGL11.EGL_STENCIL_SIZE, EGL11.EGL_DONT_CARE, // don't care about stencils EGL10.EGL_SURFACE_TYPE, EGL10.EGL_WINDOW_BIT, EGL10.EGL_NONE }; EGLConfig eglConfigs[] = new EGLConfig[numConfigs[0]]; egl.eglChooseConfig(display, configAttributes, eglConfigs, eglConfigs.length, numConfigs); EGLConfig eglConfig = eglConfigs[0]; glc = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, null); gl = (GL10) (glc.getGL()); surface = egl.eglCreateWindowSurface(display, eglConfig, mHolder, null); egl.eglMakeCurrent(display, surface, surface, glc); } The program crashes when calls "eglCreateWindowSurface()" The only thing I am not sure about in this function, is the parameter mHolder, which I got it like this: class myView extends SurfaceView implements SurfaceHolder.Callback { SurfaceHolder mHolder; public myView(Context context, AttributeSet attrs) { super(context, attrs); mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_GPU); } } Also, there are two strange things: - the override methods surfaceCreated, surfaceDestroyed, and surfaceChanged are never being called -in the adb logcat I get the following message after calling "eglGetDisplay()": "GLLogger couldn't load <libhgl.so> library (cannot find library)" does anybody have any idea what I am doing wrong? pleeeeeeeease! --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---