You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Transform Feedback to write the data of GPU operations to the buffer and obtain the number of generated entities through glGetQueryObjectuiv. However, unlike the example you provided in the following website, the number of vertices generated each time in the geometric shader is different. For example, I will add some if filtering conditions in the code, which results in a maximum of 3 vertices, but only 2 directly emitted vertices. So when I want to copy data from memory, how to fetch the number of vertices of each primitive to determine the size of the buffer is a very troublesome problem.
Therefore, I try not to filter vertices in the conditions, but instead return the default vertex. At the same time, I add a flag (Valid) for each vertex to determine whether the vertexe is valid or not. This method ensures that the maximum number of returned vertices is 3, so it can accurately calculate the buffer data size. However, this can lead to excessive data space for fetching copied data, and increasing the time consumed when re-filtering on the CPU.
So, I would like to inquire if there is a simpler way to fetch the number of vertices for each primitive, so that I can create a space of appropriate size to copy the data from the buffer. Thank you very much!
The text was updated successfully, but these errors were encountered:
I am using Transform Feedback to write the data of GPU operations to the buffer and obtain the number of generated entities through glGetQueryObjectuiv. However, unlike the example you provided in the following website, the number of vertices generated each time in the geometric shader is different. For example, I will add some if filtering conditions in the code, which results in a maximum of 3 vertices, but only 2 directly emitted vertices. So when I want to copy data from memory, how to fetch the number of vertices of each primitive to determine the size of the buffer is a very troublesome problem.
Therefore, I try not to filter vertices in the conditions, but instead return the default vertex. At the same time, I add a flag (Valid) for each vertex to determine whether the vertexe is valid or not. This method ensures that the maximum number of returned vertices is 3, so it can accurately calculate the buffer data size. However, this can lead to excessive data space for fetching copied data, and increasing the time consumed when re-filtering on the CPU.
So, I would like to inquire if there is a simpler way to fetch the number of vertices for each primitive, so that I can create a space of appropriate size to copy the data from the buffer. Thank you very much!
The text was updated successfully, but these errors were encountered: