Query#

class arcade.gl.Query(ctx: Context, samples=True, time=True, primitives=True)[source]#

Bases:

A query object to perform low level measurements of OpenGL rendering calls.

The best way to create a program instance is through arcade.gl.Context.query()

Example usage:

query = ctx.query()
with query:
    geometry.render(..)

print('samples_passed:', query.samples_passed)
print('time_elapsed:', query.time_elapsed)
print('primitives_generated:', query.primitives_generated)
ctx#

The context this query object belongs to

Type:

arcade.gl.Context

samples_passed#

How many samples was written. These are per component (RGBA)

Type:

int

time_elapsed#

The time elapsed in nanoseconds

Type:

int

primitives_generated#

How many primitives a vertex or geometry shader processed. When using a geometry shader this only counts the primitives actually emitted.

Type:

int

delete()[source]#

Destroy the underlying OpenGL resource. Don’t use this unless you know exactly what you are doing.

static delete_glo(ctx, glos) None[source]#

Delete this query object. This is automatically called when the object is garbage collected.