From 726e621000582e4de7c9ce0f7e9950c3af4e5d9b Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Fri, 23 Aug 2013 20:55:46 +0000 Subject: Use indexed extensions on ES3. R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/23359002 git-svn-id: http://skia.googlecode.com/svn/trunk@10899 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/gpu/gl/android') diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp index 5ad867c4d7..05c93a32a8 100644 --- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp +++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp @@ -21,7 +21,14 @@ const GrGLInterface* GrGLCreateNativeInterface() { static SkAutoTUnref glInterface; if (!glInterface.get()) { GrGLExtensions extensions; - if (!extensions.init(kES_GrGLBinding, glGetString, NULL, glGetIntegerv)) { + GrGLGetStringiProc getStringi; +#if GL_ES_VERSION_3_0 + getStringi = glGetStringi; +#else + getStringi = (GrGLGetStringiProc) eglGetProcAddress("glGetStringi"); +#endif + + if (!extensions.init(kES_GrGLBinding, glGetString, getStringi, glGetIntegerv)) { return NULL; } const char* verStr = reinterpret_cast(glGetString(GR_GL_VERSION)); @@ -80,6 +87,7 @@ const GrGLInterface* GrGLCreateNativeInterface() { interface->fGetShaderInfoLog = glGetShaderInfoLog; interface->fGetShaderiv = glGetShaderiv; interface->fGetString = glGetString; + interface->fGetStringi = getStringi; // located above interface->fGetUniformLocation = glGetUniformLocation; interface->fLineWidth = glLineWidth; interface->fLinkProgram = glLinkProgram; -- cgit v1.2.3