about eglCreatePixmapSurface

This topic contains 0 replies, has 1 voice, and was last updated by  ghccow 5 years, 9 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #30726

    ghccow
    Member

    All I want to say is about LG SU76 cell phone, android 2.2.2, OpenGL ES 2.0.    I tried to create a off-screen buffer via “eglCreatePixmapSurface”. Everything seem OK until “glLinkProgram”. After calling “glGetProgramiv ( nProgramObject, GL_LINK_STATUS, &linked );”, “linked” was zero. Further more, I tried “glGetBooleanv( GL_SHADER_COMPILER, &tag);”, the “tag” returned 0. I am sure that all the source code of GLSL is correct, because I run the on-screen rendering successfully with the same GLSL.  Does the powerVR support “eglCreatePixmapSurface” on device? If yes, would you please send me a simple test bed to show me how to use eglCreatePixmapSurface. Following are my code about creating pixmap surface.

            egl = (EGL10)EGLContext.getEGL();
            dpy = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

            int[] version = new int[2];
            egl.eglInitialize(dpy, version);

            int[] configSpec = {
                    EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PIXMAP_BIT,
                    EGL10.EGL_RENDERABLE_TYPE, 0x0004,
                    EGL10.EGL_RED_SIZE, 5,
                    EGL10.EGL_GREEN_SIZE, 6,
                    EGL10.EGL_BLUE_SIZE, 5,
                    EGL10.EGL_DEPTH_SIZE, 16,
                    EGL10.EGL_NONE
            };
            EGLConfig[] configs = new EGLConfig[1];
            int[] num_config = new int[1];
            egl.eglChooseConfig(dpy, configSpec, configs, 1, num_config);
            config = configs[0];

            int ContextAttrib[] = {0x3098, 2, EGL10.EGL_NONE };
            context = egl.eglCreateContext(dpy, config,
                    EGL10.EGL_NO_CONTEXT, ContextAttrib);

            native_pixmap = Bitmap.createBitmap(128, 128, Config.RGB_565);
            surface = egl.eglCreatePixmapSurface(dpy, config, native_pixmap, null);

            egl.eglMakeCurrent(dpy, surface, surface, context);
           

Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.