Torque3D Documentation / _generateds / GFXOcclusionQuery

GFXOcclusionQuery

Engine/source/gfx/gfxOcclusionQuery.h

A geometry visibility query object.

More...

Public Types

enum
OcclusionQueryStatus {
  Unset 
  Waiting 
  Error 
  Occluded 
  NotOccluded 
}

The states returned by getStatus() If you modify this enum you should also modify statusToString()

Protected Attributes

Protected Functions

Public Functions

bool

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.

end()

Called after your geometry is drawn to submit the query for processing.

getStatus(bool block, U32 * data)

Returns the status of the last submitted query.

When called the resource should restore all device sensitive information destroyed by zombify()

When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.

Public Static Functions

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.

return:

Status

Parameters:
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

Public Static Functions

statusToString(OcclusionQueryStatus status)

Returns a status string.