PDA

View Full Version : TransformFeedback + GeometryShader: how to query amount of captured data?



john_connor
06-30-2016, 03:07 PM
hi, i'm currently using transformfeedback to capture some data from the geometryshader
the geometryshader doesnt create each invocation the same amount of primitives (points)

how can i query the amount of data that's been captured ?

GClements
06-30-2016, 03:26 PM
how can i query the amount of data that's been captured ?
glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRIT TEN)

Alfonse Reinheart
06-30-2016, 03:35 PM
More explicitly, you wrap your use of feedback in a query object (https://www.opengl.org/wiki/Query_Object). A GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN query (https://www.opengl.org/wiki/Query_Object#Primitive_queries) will store the number of primitives generated by any feedback operation within the query's scope (https://www.opengl.org/wiki/Query_Object#Query_scope).

john_connor
07-01-2016, 05:29 AM
ok, thanks, it works :)