Description

Execution of multiple visibility tests.

Helper for performing visibility tests. OpenGL occlusion queries are used for the visibility tests.

See also: OpenGL constant GL_SAMPLES_PASSED and function glBeginQuery

Author: Benjamin Eikel

Date: 2012-01-16

Functions

   
   
std::deque< std::pair< GeometryNode *, uint32_t > > testNodes( FrameContext & context, const std::deque< GeometryNode * > & nodes)

Documentation

function
MinSG::VisibilityTester::testNodes

public
     
     
std::deque< std::pair< GeometryNode *, uint32_t > > testNodes( FrameContext & context,
  const std::deque< GeometryNode * > & nodes
)    

Test the given nodes for visibility. At first, the bounding box of a node is tested. Afterwards, a node is tested only if its bounding box was determined visible before.

Parameters

context
Frame context that is used for testing
nodes
Array of nodes that will be tested

Returns

Array of visible nodes. The second entry of each pair contains the number of passed samples for the node in the first entry.

Note: The depth buffer has to be filled already. The visibility tests are performned using the current content of the depth buffer.

Defined in MinSG/Helper/VisibilityTester.h:47