com.threerings.opengl.renderer
Class Query

java.lang.Object
  extended by com.threerings.opengl.renderer.Query
Direct Known Subclasses:
Query.SamplesPassed

public abstract class Query
extends Object

An OpenGL occlusion query object.


Nested Class Summary
static class Query.SamplesPassed
          Queries the number of samples passed.
 
Field Summary
protected  int _id
          The OpenGL identifier for this query.
protected  Renderer _renderer
          The renderer responsible for this query.
protected  IntBuffer _result
          Stores results.
protected  int _target
          The query target.
 
Constructor Summary
Query(Renderer renderer, int target)
          Creates a new query for the specified renderer.
 
Method Summary
protected  void finalize()
           
 int getId()
          Returns this query's OpenGL identifier.
 int getResult()
          Retrieves and returns the result of this query.
 int getTarget()
          Returns the query's target.
 boolean isResultAvailable()
          Determines whether the result of the query would be available without blocking.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_renderer

protected Renderer _renderer
The renderer responsible for this query.


_id

protected int _id
The OpenGL identifier for this query.


_target

protected int _target
The query target.


_result

protected IntBuffer _result
Stores results.

Constructor Detail

Query

public Query(Renderer renderer,
             int target)
Creates a new query for the specified renderer.

Method Detail

getId

public final int getId()
Returns this query's OpenGL identifier.


getTarget

public final int getTarget()
Returns the query's target.


isResultAvailable

public boolean isResultAvailable()
Determines whether the result of the query would be available without blocking.


getResult

public int getResult()
Retrieves and returns the result of this query.


finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable