Class AMDQueryBufferObject


  • public final class AMDQueryBufferObject
    extends java.lang.Object
    Native bindings to the AMD_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 to a transform feedback buffer may be retrieved from the GL through query objects. The current value of a query object may be retrieved by the application through the OpenGL API. 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 current value of a query result may be retrieved into a buffer object instead of client memory. This allows the query result 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 CPU-GPU synchronization event.

    The result of any query object type supported by the GL implementation may be retrieved 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 Description
      static int GL_QUERY_BUFFER_AMD
      Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, GetBufferParameteriv and GetBufferPointerv.
      static int GL_QUERY_BUFFER_BINDING_AMD
      Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.
      static int GL_QUERY_RESULT_NO_WAIT_AMD
      Accepted by the pname parameter of GetQueryObjectiv, GetQueryObjectuiv, GetQueryObjecti64v and GetQueryObjectui64v.
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GL_QUERY_RESULT_NO_WAIT_AMD

        public static final int GL_QUERY_RESULT_NO_WAIT_AMD
        Accepted by the pname parameter of GetQueryObjectiv, GetQueryObjectuiv, GetQueryObjecti64v and GetQueryObjectui64v.
        See Also:
        Constant Field Values
      • GL_QUERY_BUFFER_AMD

        public static final int GL_QUERY_BUFFER_AMD
        Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, GetBufferParameteriv and GetBufferPointerv.
        See Also:
        Constant Field Values
      • GL_QUERY_BUFFER_BINDING_AMD

        public static final int GL_QUERY_BUFFER_BINDING_AMD
        Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.
        See Also:
        Constant Field Values