orb
orb

Reputation: 1284

Is there a way to programmatically discover specifics about an Android device's GPU?

I have searched the internet including developer.android.com. I have read this Stack Overflow post: how to query android device hardware info. I am aware of System.getProperties().

My question is: is there a way to programmatically discover specific information about the GPU on a particular Android device? Is it at least possible to get the make and model of the GPU on a device?

Or, should I just use the MANUFACTURER and MODEL fields of the Build class to infer the GPU that is used on that particluar device?

My ends in regard to this question is to find a way to identify the graphics processing capability of devices that my apps run on so that I can adjust the graphics processing demands of my apps accordingly.

Thanks, Chris

Upvotes: 7

Views: 2172

Answers (2)

Ags1
Ags1

Reputation: 659

Try this: I put the renderer and vendor info in volatile variables in my GLSurfaceView.Renderer read on the GUI thread:

public volatile static String vendor, renderer;

@Override
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
{
    vendor = GLES20.glGetString(GLES20.GL_VENDOR);
    renderer = GLES20.glGetString(GLES20.GL_RENDERER);

Upvotes: 0

Justin Vartanian
Justin Vartanian

Reputation: 1149

You can use glGetString() with GL_VENDOR to determine the GPU vendor name and GL_RENDERER to determine the GPU name.

Check out the documentation

Upvotes: 5

Related Questions