user815129
user815129

Reputation: 2314

transform feedback and empty buffer objects

Is it safe to assume that starting transform feedback and issuing a draw* command with 0 primitive count and a bound VAO referencing a 0 byte-sized buffer object, will result in an empty transform feedback object (whatever content its buffer object could have) so that a DrawTransformFeedback will not draw anything? Is it safe to assume that the same would happen starting/ending transform feedback without issuing any draw command?

Upvotes: 0

Views: 474

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 474236

The whole "bound VAO referencing a 0 byte-sized buffer object" part is a non-sequitur. You don't have to put any buffer objects in a VAO; you can shut off all of the attribute arrays by glDisableVertexAttribArray-ing all of them (or just not enabling any).

In any case, the spec is pretty clear on this:

Note that the vertex count is from the number of vertices recorded to the selected vertex stream during the transform feedback operation. If no outputs belonging to the selected vertex stream are recorded, the corresponding vertex count will be zero even if complete primitives were emitted to the selected stream.

If no vertices were recorded, then the vertex count will be zero.

Upvotes: 3

Related Questions