Get GPU info on Android without SurfaceView

On Android, is there a way to get GPU information without creating a SurfaceView? I donโ€™t want to draw anything with OpenGL, but I just need to get information about the hardware, such as the provider, version of OpenGL ES, extensions, etc.

+4
source share
1 answer

I'm sorry I'm not sure how to do this with Android, but the glGetString function allows you to access OpenGL information. Here is an example C ++ style code that will output the extensions supported by your hardware, and I hope you can adapt to Android:

void PrettyPrintExtensions(){ std::string extensions = (const char*) glGetString(GL_EXTENSIONS); char* extensionStart = &extensions[0]; char** extension = &extensionStart; std::cout << "Supported OpenGL ES Extensions:" << std::endl; while (*extension) std::cout << '\t' << strsep(extension, " ") << std::endl; std::cout << std::endl; } 

By changing the glGetString parameter, you can also access the provider, visualizer, and version. Please look:

http://www.khronos.org/opengles/sdk/1.1/docs/man/glGetString.xml

+1
source

Source: https://habr.com/ru/post/1385491/


All Articles