1 Reply Latest reply on Oct 29, 2010 1:18 PM by damiendr

    glBeginQuery(GL_PRIMITIVES_GENERATED,...) always return zero

    damiendr

      Hi,

       Can anybody explain me why the following code always print 0 ?

       (there is no active shader)


        GLint queryResult = 0;

        GLuint query;

        glGenQueries(1, &query);

        glBeginQuery(GL_PRIMITIVES_GENERATED, query);

        glBegin(GL_TRIANGLES);
          glVertex3f(1.0f, 1.0f, 1.0f);
          glVertex3f(1.0f, 10.0f, 1.0f);
          glVertex3f(10.0f, 1.0f, 1.0f);

        glEnd();

        glEndQuery(GL_PRIMITIVES_GENERATED);

        glGetQueryObjectiv(query, GL_QUERY_RESULT, &queryResult);

        printf("Primitives count: %d\n", queryResult);


      On NVIDIA hardware I have 1, but on Mobility Radeon HD4670, driver 10.10, I have zero...

      Thank you,

      Damien