module Graphics.LambdaCube.HardwareOcclusionQuery where -- | This is a abstract class that that provides the interface for the query class for hardware occlusion. class HardwareOcclusionQuery a where {-| Starts the hardware occlusion query @Remarks Simple usage: Create one or more OcclusionQuery object one per outstanding query or one per tested object OcclusionQuery* m_pOcclusionQuery; createOcclusionQuery( &m_pOcclusionQuery ); In the rendering loop: Draw all occluders m_pOcclusionQuery->startOcclusionQuery(); Draw the polygons to be tested m_pOcclusionQuery->endOcclusionQuery(); Results must be pulled using: UINT m_uintNumberOfPixelsVisable; pullOcclusionQuery( &m_dwNumberOfPixelsVisable ); -} beginOcclusionQuery :: a -> IO () endOcclusionQuery :: a -> IO () -- ^ Ends the hardware occlusion test {-| Pulls the hardware occlusion query. @note Waits until the query result is available; use isStillOutstanding if just want to test if the result is available. @retval NumOfFragments will get the resulting number of fragments. @return True if success or false if not. -} pullOcclusionQuery :: a -> IO Int {-| Let's you get the last pixel count with out doing the hardware occlusion test @return The last fragment count from the last test. Remarks This function won't give you new values, just the old value. -} -- getLastQuerysPixelcount :: a -> IO Int {-| Lets you know when query is done, or still be processed by the Hardware @return true if query isn't finished. -} isStillOutstanding :: a -> IO Bool