Cinder  0.9.1
Public Member Functions | Static Public Member Functions | List of all members
cinder::gl::QueryTimeSwapped Class Reference

#include <Query.h>

Public Member Functions

void begin ()
 
void end ()
 
uint64_t getElapsedNanoseconds () const
 
double getElapsedMilliseconds () const
 
double getElapsedSeconds () const
 

Static Public Member Functions

static QueryTimeSwappedRef create ()
 

Detailed Description

Represents a pair of GL_TIME_ELAPSED Query objects, swapped on each end() call.

Member Function Documentation

QueryTimeSwappedRef cinder::gl::QueryTimeSwapped::create ( )
static

Constructs a swap buffer of GL_TIME_ELAPSED queries.

void cinder::gl::QueryTimeSwapped::begin ( )

Begins the time elapsed query.

void cinder::gl::QueryTimeSwapped::end ( )

Ends the time elapsed query and swaps the currently active query buffer.

uint64_t cinder::gl::QueryTimeSwapped::getElapsedNanoseconds ( ) const

Returns the elapsed nano seconds from the previous frame query. This is the native data type of the underlying query object. Throws logic_error if not stopped.

double cinder::gl::QueryTimeSwapped::getElapsedMilliseconds ( ) const

Returns the elapsed Milliseconds from the previous frame query. Converts from what gl returns, which is nano seconds. Throws logic_error if not stopped.

double cinder::gl::QueryTimeSwapped::getElapsedSeconds ( ) const

Returns the elapsed seconds from the previous frame query. Converts from what gl returns, which is nano seconds. Throws logic_error if not stopped.


The documentation for this class was generated from the following files: