Henrik
Henrik

Reputation: 1995

Measure device performance to set level of detail in app

I have a 3d app created using libgdx. On some older devices the FPS drops significantly when having objects containing a large amount of vertices.

I would like to be able to automatically set an initial level of detail (which the user can change in options if desired) where I load a objects with reduced number of vertices.

Is there any lib or a good methodology examine performance on the device BEFORE displaying the 3d scene?

(I am not using continuous rendering in my app).

Upvotes: 0

Views: 93

Answers (1)

Columbo
Columbo

Reputation: 6766

In my experience this is a horrible rabbit-hole. Even if you implement a sophisticated solution like doing some off-screen rendering to measure the device's capabilities, the results can be confounded by the device being temporarily underclocked due to battery saving techniques or heat reduction measures or by resources being diverted to some other running process.

The overwhelming amount of hardware variation on Android makes any sort of database of device capability impractical unless you have a lot of resources to throw at the problem.

I think the least worst approach is to use a few simple proxies to get a general picture of whether a device is high-end or not. I have used the following:

  • Android OS version
  • Number of CPU cores
  • Supported graphics API (OpenGLES version and possibly whether Vulkan is supported)
  • Amount of RAM available
  • Device resolution
  • Whether highp is supported in fragment shaders

Upvotes: 1

Related Questions