17.9. The OcclusionQuery Object
An OcclusionQuery object collects from the GPU how many fragments passed the depth test
from draw commands executed between graphicsDevice.beginOcclusionQuery
and graphicsDevice.endOcclusionQuery for the given OcclusionQuery.
17.9.1. Properties
17.9.1.1. pixelCount
Summary
Number of fragments that passed the depth test.
Syntax
var pixelCount = occlusionQuery.pixelCount;
Calling this property would stall the CPU waiting for the GPU if the query results are not ready.