Before trying to make use of this function, you need to verify that the GL context you’ve created provides QCOM_framebuffer_foveated extension support first. If it doesn’t, you should not query for any function pointers defined in that extension, much less try to call them.
Though you could instead use a loop over each extension to do the same:
GLint n, i;
bool found = false;
glGetIntegerv( GL_NUM_EXTENSIONS, &n );
for ( GLint i = 0; i < n && !found; i++ )
{
unsigned char *ext = glGetStringi( GL_EXTENSIONS, i );
found = ( strstr( extensions, "QCOM_framebuffer_foveated" ) != NULL );
}
To your possible next question:
Why does my libGLESv2.so contain the function symbol glFramebufferFoveationParametersQCOM if calling it fails?
For a GL-ES extension to be supported in an application requires appropriate: 1) GPU hardware, 2) CPU graphics drivers (including EGL/GL-ES libraries), and 3) GL-ES context support. So it could be your GPU doesn’t support the extension. Or that your graphics drivers/libraries are too old or misinstalled. Or the GL-ES context you’ve created doesn’t properly support the minimum GL-ES version required for the extension you’ve tried to use.
So if you haven’t properly created an OpenGL ES 2.0 (or later) capable context, then the graphics driver will probably disable use of that extension in your context. For other tips on dealing with called unimplemented OpenGL ES API errors on Android, search stackoverflow:
SEARCH STRING:
“called unimplemented OpenGL ES API” site:stackoverflow.com
For example (relates to setEGLContextClientVersion()):