Class OcclusionQuery
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)
The method that derived classes should override to implement disposing of managed and native resources.
protected override void Dispose(bool disposing)
Parameters
disposing
boolTrue if managed objects should be disposed.
Remarks
Native resources should always be released regardless of the value of the disposing parameter.
End()
Ends the occlusion query.
public void End()