Skip to content Skip to sidebar Skip to footer

Get GPU Info On Android Without SurfaceView

On Android, is there a way to get GPU information without creating a SurfaceView? I'm not looking to draw anything using OpenGL, but I just need to get hardware information like ve

Solution 1:

I am sorry I am not sure how to do that with Android but the function glGetString allows you to access the OpenGL information. Here is a sample C++ style code that will output the extensions supported by your hardware that I hope you'll be able to 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 parameter of glGetString you can also access the Vendor, renderer and version. Please see:

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


Post a Comment for "Get GPU Info On Android Without SurfaceView"