OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition
by Dave Shreiner, Graham Sellers, John M. Kessenich, Bill M. Licea-Kane
Using Transform Feedback Results
Now that the number of vertices recorded into a transform feedback buffer is known, it is possible to pass that vertex count into a function like glDrawArrays() to use it as the source of vertex data in subsequent rendering. However, to retrieve this count requires the CPU to read information generated by the GPU, which is generally detrimental to performance. In this case, the CPU will wait for the GPU to finish rendering anything that might contribute to the primitive count, and then the GPU will wait for the CPU to send a new rendering command using that count. Ideally, the count would never make the round trip from the GPU to the CPU and back again. To achieve this, the OpenGL commands glDrawTransformFeedback() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access