All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GlfGLQueryObject Class Reference

Represents a GL query object in Glf. More...

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. More...
 
GLF_API void BeginSamplesPassed ()
 equivalent to Begin(GL_SAMPLES_PASSED). More...
 
GLF_API void BeginPrimitivesGenerated ()
 equivalent to Begin(GL_PRIMITIVES_GENERATED). More...
 
GLF_API void BeginTimeElapsed ()
 equivalent to Begin(GL_TIME_ELAPSED). More...
 
GLF_API void End ()
 End query. More...
 
GLF_API int64_t GetResult ()
 Return the query result (synchronous) stalls CPU until the result becomes available. More...
 
GLF_API int64_t GetResultNoWait ()
 Return the query result (asynchronous) returns 0 if the result hasn't been available. More...
 
 GlfGLQueryObject (GlfGLQueryObject const &)=delete
 
GlfGLQueryObjectoperator= (GlfGLQueryObject const &)=delete
 

Detailed Description

Represents a GL query object in Glf.

Definition at line 115 of file diagnostic.h.

Member Function Documentation

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.


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