Class OcclusionQuery
Used to perform an occlusion query against the latest drawn objects.
public class OcclusionQuery : GraphicsResource, IDisposable
  - Inheritance
 - 
      
      
      OcclusionQuery
 
- Implements
 
- Inherited Members
 
Constructors
OcclusionQuery(GraphicsDevice)
Initializes a new instance of the OcclusionQuery class.
public OcclusionQuery(GraphicsDevice graphicsDevice)
  Parameters
graphicsDeviceGraphicsDeviceThe graphics device.
Exceptions
- ArgumentNullException
 graphicsDeviceis null.- NotSupportedException
 The current graphics profile does not support occlusion queries.
Properties
IsComplete
Gets a value indicating whether the occlusion query has completed.
public bool IsComplete { get; }
  Property Value
PixelCount
Gets the number of visible pixels.
public int PixelCount { get; }
  Property Value
- int
 The number of visible pixels.
Exceptions
- InvalidOperationException
 The occlusion query has not yet completed. Check IsComplete before reading the result!
Methods
Begin()
Begins the occlusion query.
public void Begin()
  Exceptions
Dispose(bool)
protected override void Dispose(bool disposing)
  Parameters
disposingbool
End()
Ends the occlusion query.
public void End()