|
Represents a GL query object in Glf. More...
#include <diagnostic.h>
Public Member Functions | |
GLF_API void | Begin (GLenum target) |
Begin query for the given target target has to be one of GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN GL_TIME_ELAPSED, GL_TIMESTAMP. | |
GLF_API void | BeginSamplesPassed () |
equivalent to Begin(GL_SAMPLES_PASSED). | |
GLF_API void | BeginPrimitivesGenerated () |
equivalent to Begin(GL_PRIMITIVES_GENERATED). | |
GLF_API void | BeginTimeElapsed () |
equivalent to Begin(GL_TIME_ELAPSED). | |
GLF_API void | End () |
End query. | |
GLF_API int64_t | GetResult () |
Return the query result (synchronous) stalls CPU until the result becomes available. | |
GLF_API int64_t | GetResultNoWait () |
Return the query result (asynchronous) returns 0 if the result hasn't been available. | |
GlfGLQueryObject (GlfGLQueryObject const &)=delete | |
GlfGLQueryObject & | operator= (GlfGLQueryObject const &)=delete |
Represents a GL query object in Glf.
Definition at line 115 of file diagnostic.h.
GLF_API void Begin | ( | GLenum | target | ) |
Begin query for the given target
target has to be one of GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN GL_TIME_ELAPSED, GL_TIMESTAMP.
GLF_API void BeginPrimitivesGenerated | ( | ) |
equivalent to Begin(GL_PRIMITIVES_GENERATED).
The number of primitives sent to the rasterizer by the scoped drawing command will be returned.
GLF_API void BeginSamplesPassed | ( | ) |
equivalent to Begin(GL_SAMPLES_PASSED).
The number of samples that pass the depth test for all drawing commands within the scope of the query will be returned.
GLF_API void BeginTimeElapsed | ( | ) |
equivalent to Begin(GL_TIME_ELAPSED).
The time that it takes for the GPU to execute all of the scoped commands will be returned in nanoseconds.
GLF_API void End | ( | ) |
End query.
GLF_API int64_t GetResult | ( | ) |
Return the query result (synchronous) stalls CPU until the result becomes available.
GLF_API int64_t GetResultNoWait | ( | ) |
Return the query result (asynchronous) returns 0 if the result hasn't been available.