~marcoil/glcompbench/glproxy-one-exec

« back to all changes in this revision

Viewing changes to src/composite-canvas-egl.cc

  • Committer: Marc Ordinas i Llopis
  • Date: 2011-12-05 15:44:29 UTC
  • mfrom: (62.1.3 glproxy)
  • Revision ID: marc.ordinasillopis@linaro.org-20111205154429-7b5bohfv13i6rh2e
Merged previous glproxy port.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR_;
40
40
PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR_;
 
41
PFNPROXYEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES_;
41
42
 
42
43
bool
43
44
CompositeCanvasEGL::check_eglimage_extensions()
55
56
    }
56
57
 
57
58
    Log::debug("==== EGL extensions ====\n%s\n", extString.c_str());
58
 
    if (extString.find("EGL_KHR_image_pixmap") != std::string::npos) {
59
 
        eglCreateImageKHR_ =
60
 
            reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(eglGetProcAddress("eglCreateImageKHR"));
61
 
        eglDestroyImageKHR_ =
62
 
            reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(eglGetProcAddress("eglDestroyImageKHR"));
63
 
    }
64
 
 
 
59
    eglCreateImageKHR_ =
 
60
        reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(
 
61
            glProxyGetExtProcAddr("EGL_KHR_image_pixmap", "eglCreateImageKHR"));
 
62
    eglDestroyImageKHR_ =
 
63
        reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(
 
64
            glProxyGetExtProcAddr("EGL_KHR_image_pixmap", "eglDestroyImageKHR"));
65
65
    if (!eglCreateImageKHR_ || !eglDestroyImageKHR_)
66
66
    {
67
67
        Log::info("** EGL does not support EGL_KHR_image_pixmap!\n");
74
74
    }
75
75
 
76
76
    Log::debug("==== GL extensions ====\n%s\n", extString.c_str());
77
 
    if (!glEGLImageTargetTexture2DOES)
 
77
    glEGLImageTargetTexture2DOES_ = reinterpret_cast<PFNPROXYEGLIMAGETARGETTEXTURE2DOESPROC>(
 
78
        glProxyGetExtProcAddr("GL_OES_EGL_image", "glEGLImageTargetTexture2DOES"));
 
79
    if (!glEGLImageTargetTexture2DOES_)
78
80
    {
79
81
        Log::info("** OpenGL ES2.0 does not support GL_OES_EGL_image!\n");
80
82
        have_exts = false;