diff options
author | Sooyoung Ha <yoosah.ha@samsung.com> | 2012-08-27 20:45:40 +0900 |
---|---|---|
committer | Sooyoung Ha <yoosah.ha@samsung.com> | 2012-08-27 20:45:40 +0900 |
commit | 34d76547b3cd4a76d9385b46ba629ae354c87073 (patch) | |
tree | 1e8095de5cae47915574d1e4704a4d764c272457 | |
parent | 3daab3cdcd10f1e545510a4ffe7bcd95c68d499a (diff) | |
download | simulator-opengl-34d76547b3cd4a76d9385b46ba629ae354c87073.tar.gz simulator-opengl-34d76547b3cd4a76d9385b46ba629ae354c87073.tar.bz2 simulator-opengl-34d76547b3cd4a76d9385b46ba629ae354c87073.zip |
apply khr-2does-enabling-libgl-v3.patch and pixmap-enabling-libgl-v3.patch.
-rwxr-xr-x | egl_1_4/35CreatePixmapSurface.c | 23 | ||||
-rwxr-xr-x | egl_1_4/3AGetProcAddress.c | 8 | ||||
-rwxr-xr-x | libGL/client_glx.c | 10 | ||||
-rwxr-xr-x | packaging/simulator-opengl.spec | 2 |
4 files changed, 38 insertions, 5 deletions
diff --git a/egl_1_4/35CreatePixmapSurface.c b/egl_1_4/35CreatePixmapSurface.c index a1285e9..915d7b1 100755 --- a/egl_1_4/35CreatePixmapSurface.c +++ b/egl_1_4/35CreatePixmapSurface.c @@ -82,7 +82,28 @@ EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, return EGL_NO_SURFACE; } } - GLXPixmap native = FNPTR(CreatePixmap)(pDisplay->native, pConfig->native, pixmap, NULL); + + Window root; + unsigned dummy, width, height; + if (XGetGeometry(pDisplay->native, (Pixmap)pixmap, &root, + &dummy, &dummy, &width, &height, + &dummy, &dummy) == 0) { + fprintf (stderr, "XGetGeometry failed.\n"); + EGLINTER(SetError)(EGL_BAD_NATIVE_PIXMAP); + return EGL_FALSE; + } + + /* Need pass the width & height, so put them in attrib_list although it + * should be NULL in normal */ + int buf[8]; + int* ptr = &buf[0]; + *ptr++ = GLX_WIDTH; + *ptr++ = width; + *ptr++ = GLX_HEIGHT; + *ptr++ = height; + *ptr++ = None; + + GLXPixmap native = FNPTR(CreatePixmap)(pDisplay->native, pConfig->native, pixmap, buf); EGLSurface unique = (EGLSurface)(native); struct SurfaceExtra* pSurface = EGLINTER(LookUpSurface)(unique); if (pSurface == NULL) { diff --git a/egl_1_4/3AGetProcAddress.c b/egl_1_4/3AGetProcAddress.c index 2d2e22b..a78660a 100755 --- a/egl_1_4/3AGetProcAddress.c +++ b/egl_1_4/3AGetProcAddress.c @@ -42,9 +42,17 @@ __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const cha return NULL; } } + char *error; + dlerror(); if ((fpAnswer = dlsym(EGLINTER(global).dlEGL, procname)) != NULL) { + if ((error = dlerror()) != NULL) { + fprintf(stderr, "edwin:%s\n", error); + } return fpAnswer; } + if ((error = dlerror()) != NULL) { + fprintf(stderr, "edwin:2:%s\n", error); + } void** ptrDLL = NULL; char* sofilename; char* libname; diff --git a/libGL/client_glx.c b/libGL/client_glx.c index 12d006f..77a9c76 100755 --- a/libGL/client_glx.c +++ b/libGL/client_glx.c @@ -1287,14 +1287,18 @@ GLAPI GLXPixmap APIENTRY glXCreateGLXPixmap( Display *dpy, Pixmap pixmap ) { CHECK_PROC_WITH_RET(glXCreateGLXPixmap); - /* FIXME */ - log_gl("glXCreateGLXPixmap : sorry, unsupported call and I don't really see how I could implement it..."); - return 0; + /* XXX: Not sure about this implementaiton + * Do thing but return pixmap as ID. New pixmap will be created via + * MakeCurrent in Emulator from host. After rendering done on the host, the + * buffer will be copied back when CopyBuffers. + */ + return pixmap; } GLAPI void APIENTRY glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ) { CHECK_PROC(glXDestroyGLXPixmap); + /* XXX:do nothing. Not sure about this implementation */ /* FIXME */ log_gl("glXDestroyGLXPixmap : sorry, unsupported call and I don't really see how I could implement it..."); } diff --git a/packaging/simulator-opengl.spec b/packaging/simulator-opengl.spec index 8ceeef5..74e8c05 100755 --- a/packaging/simulator-opengl.spec +++ b/packaging/simulator-opengl.spec @@ -1,7 +1,7 @@ #sbs-git:slp/sdk/simulator-opengl Name: simulator-opengl Summary: opengl-es acceleration module for emulator -Version: 0.1.28 +Version: 0.1.29 Release: 1 Group: TO_BE/FILLED_IN License: TO_BE/FILLED_IN |