GFXOcclusionQuery
Engine/source/gfx/gfxOcclusionQuery.h
A geometry visibility query object.
Public Types
OcclusionQueryStatus { Unset Waiting Error Occluded NotOccluded }
The states returned by getStatus() If you modify this enum you should also modify statusToString()
Protected Functions
GFXOcclusionQuery(GFXDevice * device)
Public Functions
bool
begin()
Prepares the query returning true if the last query has been processed and more geometry can be issued.
The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer.
Public Static Functions
statusToString(OcclusionQueryStatus status)
Returns a status string.
Detailed Description
A geometry visibility query object.
Public Types
OcclusionQueryStatus
Enumerator
- Unset
- Waiting
- Error
- Occluded
- NotOccluded
The states returned by getStatus() If you modify this enum you should also modify statusToString()
Protected Attributes
GFXDevice * mDevice
Protected Functions
GFXOcclusionQuery(GFXDevice * device)
Public Functions
~GFXOcclusionQuery()
begin()
Prepares the query returning true if the last query has been processed and more geometry can be issued.
Reimplemented by: GFXD3D11OcclusionQuery, GFXGLOcclusionQuery
describeSelf()
Reimplemented from: GFXResource
Reimplemented by: GFXD3D11OcclusionQuery, GFXGLOcclusionQuery
end()
Called after your geometry is drawn to submit the query for processing.
Reimplemented by: GFXD3D11OcclusionQuery, GFXGLOcclusionQuery
getStatus(bool block, U32 * data)
Returns the status of the last submitted query.
In general you should avoid blocking for the result until the frame following your query to keep from stalling the CPU.
Status
block | If true CPU will block until the query finishes. |
data | Number of pixels rendered, valid only if status returned is NotOccluded. |
Reimplemented by: GFXD3D11OcclusionQuery, GFXGLOcclusionQuery
resurrect()
Reimplemented from: GFXResource
Reimplemented by: GFXD3D11OcclusionQuery, GFXGLOcclusionQuery
zombify()
Reimplemented from: GFXResource
Reimplemented by: GFXD3D11OcclusionQuery, GFXGLOcclusionQuery