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
graphicsDevice
GraphicsDeviceThe graphics device.
Exceptions
- ArgumentNullException
graphicsDevice
is 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
disposing
bool
End()
Ends the occlusion query.
public void End()