KhronosGroup / OpenGL-Registry

OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
677 stars 274 forks source link

`glGetQueryObjectiv` in `EXT_disjoint_timer_query.txt` example code do not exist #619

Open shutaozhenzhen opened 2 months ago

shutaozhenzhen commented 2 months ago

glGetQueryObjectiv are called in line 448 and line 505 in EXT_disjoint_timer_query.txt(also EXT_timer_query.txt and ARB_timer_query.txt and some other files)

        /* Wait for the query result to become available */
        while (!available) {
            glGetQueryObjectiv(queries[1], GL_QUERY_RESULT_AVAILABLE, &available);
        }

But I can't find such a function in header files.

I can only find glGetQueryObjectivEXT in gl2ext.h and glGetQueryObjectuiv in gl32.h gl31.h gl3.h

SunSerega commented 2 months ago

In xml\gl.xml it's defined under GL_VERSION_1_5.

And in headers... I see it in these 2 files:

shutaozhenzhen commented 2 months ago

Strangely, this function cannot be found by github.

I still recommend glGetQueryObjectuiv instead of glGetQueryObjectiv, since these extensions are likely to be implemented in opengles (as in my case), and opengles does not have a glGetQueryObjectiv function

shutaozhenzhen commented 2 months ago

also, line 551:

        glGetIntegerv(GL_TIMESTAMP_EXT, &flushTime);

I recommend use glGetInteger64v, since example code use glGetQueryObjectui64vEXT get 64bit glQueryCounterEXT result.