cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

damiendr
Journeyman III

glBeginQuery(GL_PRIMITIVES_GENERATED,...) always return zero

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

0 Likes
1 Reply
damiendr
Journeyman III

Hi,

 Nobody can help me with this issue ?

 I tried with some buffer objects and I even checked the status of the query using GL_QUERY_RESULT_AVAILABLE (It says that the result is available).

 Do I have to use EXT or any other version to make it work as expected ?

 Eveything is working as expected on NVIDIA so why I cannot make it work on my AMD device ?

Regards,

Damien

0 Likes