Litherum
Litherum

Reputation: 23344

GL_TIME_ELAPSED equivalent for OpenGL ES (2 or 3)

I'm interested in the amount of time it takes the OpenGL ES server to asynchronously run some sequence of commands. The way you solve this with regular OpenGL is to create a query object with the target GL_TIME_ELAPSED; however, OpenGL ES doesn't have the glBeginQuery family of functions. Is there a platform independent way of getting this information accurately with OpenGL ES 2 or 3?

Upvotes: 3

Views: 2250

Answers (2)

AndreyVK_D3D
AndreyVK_D3D

Reputation: 31

You can use OpenGL ES extensions GL_EXT_disjoint_timer_query, for OpenGL ES 2.0.

Upvotes: 1

Trax
Trax

Reputation: 1910

No, I'm afraid there is no portable way for performance counters in OpenGL ES 2.0. You will need to relay on the tools available for each vendor.

For OpenGLES 3.0 that family of functions have been added. Unfortunately, GL_TIME_ELAPSED is not a valid target for this version.

Please refer to section 2.13 Asynchronous Queries (3.02 April 8, 2013): http://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.2.pdf

Upvotes: 2

Related Questions