Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBTimerQuery

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Native bindings to the ARB_timer_query extension.

Applications can benefit from accurate timing information in a number of different ways. During application development, timing information can help identify application or driver bottlenecks. At run time, applications can use timing information to dynamically adjust the amount of detail in a scene to achieve constant frame rates. OpenGL implementations have historically provided little to no useful timing information. Applications can get some idea of timing by reading timers on the CPU, but these timers are not synchronized with the graphics rendering pipeline. Reading a CPU timer does not guarantee the completion of a potentially large amount of graphics work accumulated before the timer is read, and will thus produce wildly inaccurate results. Finish can be used to determine when previous rendering commands have been completed, but will idle the graphics pipeline and adversely affect application performance.

This extension provides a query mechanism that can be used to determine the amount of time it takes to fully complete a set of GL commands, and without stalling the rendering pipeline. It uses the query object mechanisms first introduced in the occlusion query extension, which allow time intervals to be polled asynchronously by the application.

Promoted to core in OpenGL 3.3.

Field Summary

Modifier and TypeField and Description
public static final int
GL_TIME_ELAPSED

Accepted by the target parameter of BeginQuery, EndQuery, and GetQueryiv.

public static final int
GL_TIMESTAMP

Accepted by the target parameter of GetQueryiv and QueryCounter.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
glGetQueryObjecti64(int
the name of a query object
id
,
int
the symbolic name of a query object parameter. One of:
QUERY_RESULTQUERY_RESULT_AVAILABLE
pname
)

Returns the 64bit integer value of query object parameter.

public static void
glGetQueryObjecti64v(int
the name of a query object
id
,
int
the symbolic name of a query object parameter. One of:
QUERY_RESULTQUERY_RESULT_AVAILABLE
pname
,
LongBuffer
the requested data
params
)

Returns the 64bit integer value of query object parameter.

public static void
glGetQueryObjecti64v(int
the name of a query object
id
,
int
the symbolic name of a query object parameter. One of:
QUERY_RESULTQUERY_RESULT_AVAILABLE
pname
,
long
the requested data
params
)

Returns the 64bit integer value of query object parameter.

public static void
glGetQueryObjecti64v(int id, int pname, long[] params)

Array version of: GetQueryObjecti64v

public static long
glGetQueryObjectui64(int
the name of a query object
id
,
int
the symbolic name of a query object parameter
pname
)

Unsigned version of GetQueryObjecti64v.

public static void
glGetQueryObjectui64v(int
the name of a query object
id
,
int
the symbolic name of a query object parameter
pname
,
LongBuffer
the requested data
params
)

Unsigned version of GetQueryObjecti64v.

public static void
glGetQueryObjectui64v(int
the name of a query object
id
,
int
the symbolic name of a query object parameter
pname
,
long
the requested data
params
)

Unsigned version of GetQueryObjecti64v.

public static void
glGetQueryObjectui64v(int id, int pname, long[] params)

Array version of: GetQueryObjectui64v

public static void
glQueryCounter(int
the name of a query object into which to record the GL time
id
,
int
the counter to query. Must be:
TIMESTAMP
target
)

Records the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed.

public static void
nglGetQueryObjecti64v(int id, int pname, long params)

Unsafe version of: GetQueryObjecti64v

public static void
nglGetQueryObjectui64v(int id, int pname, long params)

Unsafe version of: GetQueryObjectui64v

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_TIME_ELAPSEDback to summary
public static final int GL_TIME_ELAPSED

Accepted by the target parameter of BeginQuery, EndQuery, and GetQueryiv.

GL_TIMESTAMPback to summary
public static final int GL_TIMESTAMP

Accepted by the target parameter of GetQueryiv and QueryCounter. Accepted by the value parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.

Constructor Detail

ARBTimerQueryback to summary
protected ARBTimerQuery()

Method Detail

glGetQueryObjecti64back to summary
public static long glGetQueryObjecti64(int id, int pname)

Returns the 64bit integer value of query object parameter.

Parameters
id:int

the name of a query object

pname:int

the symbolic name of a query object parameter. One of:

QUERY_RESULTQUERY_RESULT_AVAILABLE
Annotations
@NativeType:void
glGetQueryObjecti64vback to summary
public static void glGetQueryObjecti64v(int id, int pname, LongBuffer params)

Returns the 64bit integer value of query object parameter.

Parameters
id:int

the name of a query object

pname:int

the symbolic name of a query object parameter. One of:

QUERY_RESULTQUERY_RESULT_AVAILABLE
params:LongBuffer

the requested data

glGetQueryObjecti64vback to summary
public static void glGetQueryObjecti64v(int id, int pname, long params)

Returns the 64bit integer value of query object parameter.

Parameters
id:int

the name of a query object

pname:int

the symbolic name of a query object parameter. One of:

QUERY_RESULTQUERY_RESULT_AVAILABLE
params:long

the requested data

glGetQueryObjecti64vback to summary
public static void glGetQueryObjecti64v(int id, int pname, long[] params)

Array version of: GetQueryObjecti64v

glGetQueryObjectui64back to summary
public static long glGetQueryObjectui64(int id, int pname)

Unsigned version of GetQueryObjecti64v.

Parameters
id:int

the name of a query object

pname:int

the symbolic name of a query object parameter

Annotations
@NativeType:void
glGetQueryObjectui64vback to summary
public static void glGetQueryObjectui64v(int id, int pname, LongBuffer params)

Unsigned version of GetQueryObjecti64v.

Parameters
id:int

the name of a query object

pname:int

the symbolic name of a query object parameter

params:LongBuffer

the requested data

glGetQueryObjectui64vback to summary
public static void glGetQueryObjectui64v(int id, int pname, long params)

Unsigned version of GetQueryObjecti64v.

Parameters
id:int

the name of a query object

pname:int

the symbolic name of a query object parameter

params:long

the requested data

glGetQueryObjectui64vback to summary
public static void glGetQueryObjectui64v(int id, int pname, long[] params)

Array version of: GetQueryObjectui64v

glQueryCounterback to summary
public static void glQueryCounter(int id, int target)

Records the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed.

Parameters
id:int

the name of a query object into which to record the GL time

target:int

the counter to query. Must be:

TIMESTAMP
nglGetQueryObjecti64vback to summary
public static void nglGetQueryObjecti64v(int id, int pname, long params)

Unsafe version of: GetQueryObjecti64v

nglGetQueryObjectui64vback to summary
public static void nglGetQueryObjectui64v(int id, int pname, long params)

Unsafe version of: GetQueryObjectui64v