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.
Number of fragments that passed the depth test.
var pixelCount = occlusionQuery.pixelCount;
Calling this property would stall the CPU waiting for the GPU if the query results are not ready.