Class ARBQueryBufferObject
- java.lang.Object
-
- org.lwjgl.opengl.ARBQueryBufferObject
-
public final class ARBQueryBufferObject extends java.lang.Object
Native bindings to the ARB_query_buffer_object extension.Statistics about the operation of the OpenGL pipeline, such as the number of samples that passed the depth test, the elapsed time between two events or the number of vertices written by transform feedback can be retrieved from the GL through query objects. The result of a query object is acquired by the application through the OpenGL API into a client provided memory location. Should the result returned by the API be required for use in a shader, it must be passed back to the GL via a program uniform or some other mechanism. This requires a round-trip from the GPU to the CPU and back.
This extension introduces a mechanism whereby the result of a query object may be retrieved into a buffer object instead of client memory. This allows the query rsult to be made available to a shader without a round-trip to the CPU for example by subsequently using the buffer object as a uniform buffer, texture buffer or other data store visible to the shader. This functionality may also be used to place the results of many query objects into a single, large buffer and then map or otherwise read back the entire buffer at a later point in time, avoiding a per-query object CPU-GPU synchronization event.
The extension allows acquiring the result of any query object type supported by the GL implementation into a buffer object. The implementation will determine the most efficient method of copying the query result to the buffer.
Requires
OpenGL 1.5
.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
GL_QUERY_BUFFER
Accepted by thetarget
parameter ofBindBuffer
,BufferData
,BufferSubData
,MapBuffer
,UnmapBuffer
,MapBufferRange
,GetBufferSubData
,GetBufferParameteriv
,GetBufferParameteri64v
,GetBufferPointerv
,ClearBufferSubData
, and thereadtarget
andwritetarget
parameters ofCopyBufferSubData
.static int
GL_QUERY_BUFFER_BARRIER_BIT
Accepted in thebarriers
bitfield inMemoryBarrier
.static int
GL_QUERY_BUFFER_BINDING
static int
GL_QUERY_RESULT_NO_WAIT
Accepted by thepname
parameter ofGetQueryObjectiv
,GetQueryObjectuiv
,GetQueryObjecti64v
andGetQueryObjectui64v
.
-
-
-
Field Detail
-
GL_QUERY_RESULT_NO_WAIT
public static final int GL_QUERY_RESULT_NO_WAIT
Accepted by thepname
parameter ofGetQueryObjectiv
,GetQueryObjectuiv
,GetQueryObjecti64v
andGetQueryObjectui64v
.- See Also:
- Constant Field Values
-
GL_QUERY_BUFFER
public static final int GL_QUERY_BUFFER
Accepted by thetarget
parameter ofBindBuffer
,BufferData
,BufferSubData
,MapBuffer
,UnmapBuffer
,MapBufferRange
,GetBufferSubData
,GetBufferParameteriv
,GetBufferParameteri64v
,GetBufferPointerv
,ClearBufferSubData
, and thereadtarget
andwritetarget
parameters ofCopyBufferSubData
.- See Also:
- Constant Field Values
-
GL_QUERY_BUFFER_BINDING
public static final int GL_QUERY_BUFFER_BINDING
- See Also:
- Constant Field Values
-
GL_QUERY_BUFFER_BARRIER_BIT
public static final int GL_QUERY_BUFFER_BARRIER_BIT
Accepted in thebarriers
bitfield inMemoryBarrier
.- See Also:
- Constant Field Values
-
-