18 glGenVertexArrays(1, &s->
vao);
D;
24 glDeleteVertexArrays(1, &s->
vao);
D;
29 glBindVertexArray(s->
vao);
D;
30 glBindBuffer(GL_ARRAY_BUFFER, vbo);
D;
31 glVertexAttribLPointer(s->
cne0, 4, GL_DOUBLE, (
DE ? 9 : 7) *
sizeof(GLdouble), 0);
D;
32 glVertexAttribLPointer(s->
zdz0,
DE ? 4 : 2, GL_DOUBLE, (
DE ? 9 : 7) *
sizeof(GLdouble), ((GLbyte *)0)+(4*
sizeof(GLdouble)));
D;
33 glVertexAttribLPointer(s->
err0, 1, GL_DOUBLE, (
DE ? 9 : 7) *
sizeof(GLdouble), ((GLbyte *)0)+((
DE ? 8 : 6)*
sizeof(GLdouble)));
D;
34 glEnableVertexAttribArray(s->
cne0);
D;
35 glEnableVertexAttribArray(s->
zdz0);
D;
36 glEnableVertexAttribArray(s->
err0);
D;
37 glBindBuffer(GL_ARRAY_BUFFER, 0);
D;
38 glBindVertexArray(0);
D;
43 glBindVertexArray(s->
vao);
D;
45 glEnable(GL_RASTERIZER_DISCARD);
D;
46 glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, vbo);
D;
47 glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, query);
D;
48 glBeginTransformFeedback(GL_POINTS);
D;
49 glDrawArrays(GL_POINTS, 0, active_count);
D;
50 glEndTransformFeedback();
D;
51 glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);
D;
52 int before = active_count;
53 glGetQueryObjectuiv(query, GL_QUERY_RESULT, unescaped);
D;
54 int after = *unescaped;
55 debug_message(
"unescaped active_count: %d -> %d\n", before, after);
56 glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, 0);
D;
57 glDisable(GL_RASTERIZER_DISCARD);
D;
59 glBindVertexArray(0);
D;