// Basically, I have two triangle mesh lists - and I'm toggling back and forth to update the
// mesh data using the geometry shader - but want the data
// to remain as triangle-lists? However, it seems to fail - for example, the simple three triangles
// I only have the first triangle and the second two aren't updated?

Thank you for any advice/help

Ben

Alfonse Reinheart

01-19-2015, 08:57 AM

I'm confused by your description of your problem.

Your GS will output 3 vertices for each primitive it receives. That makes for a single triangle. Therefore, your rendering operation will output a sequence of triangles. AKA: a list.

The confusing bit is your "Very basic drawing code" (FYI: transform feedback is not "very basic"). It looks like this code is trying to render the output of a previous feedback operation. But you don't actually show us when you issue that operation.

It seems like you're saying that you are ping-ponging back and forth, rendering from one buffer into another, and then vice-versa. I'm not exactly sure why you're doing that or what you intend to accomplish with it. More importantly, because you didn't show us the initial rendering call, I can't say for certain if ping-ponging will work with that.

For example, you show us that you have built a vertex array and an index list. But you don't show us you rendering with it. And that's kinda the problem. Because, while you can render with an index list, you cannot render the result of a transform feedback operation with one. I don't know if you're trying to do that or not.

Hey Alfonse,
thank you for your reply - I was trying to ping-pong the original tri-mesh data back and forth using the geometry shader (adapting the original vertex data), while keeping the indexes the same, so I could pass it to another shader. Which seems fine for points - but doesn't seem happy with any tri-list models. Hence, I've given up on it and am using CUDA/OpenCL.