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)
- Parameters:
ctx – The context this query object belongs to
samples – Enable counting written samples
time – Enable measuring time elapsed
primitives – Enable counting primitives
- property samples_passed: int
How many samples was written. These are per component (RGBA)
If one RGBA pixel is written, this will be 4.
- property primitives_generated: int
How many primitives a vertex or geometry shader processed.
When using a geometry shader this only counts the primitives actually emitted.