damiendr

glBeginQuery(GL_PRIMITIVES_GENERATED,...) always return zero

Discussion created by damiendr on Oct 27, 2010
Latest reply on Oct 29, 2010 by 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

Outcomes