OpenGL 4.4 xfb layout problem
category: code [glöplog]
I'm having problems using Transform Feedback buffers with OpenGL version 4.4.
I'm using geometry shader output for capturing and drawing triangles.
The triangles will be culled by some algorithm and I want to capture the resulting triangles.
So the result triangle count should be less than the input count.
When I specify the in-shader layout specifiers(xfb_buffer,etc.), no primitive is captured.
I changed it back to glTransformFeedbackVaryings, and now primitives are being captured but instead of 3 vertices per triangle it captures less as the resulting buffer's size is not dividible by 3.
What can be the solution?
I'm using geometry shader output for capturing and drawing triangles.
The triangles will be culled by some algorithm and I want to capture the resulting triangles.
So the result triangle count should be less than the input count.
When I specify the in-shader layout specifiers(xfb_buffer,etc.), no primitive is captured.
I changed it back to glTransformFeedbackVaryings, and now primitives are being captured but instead of 3 vertices per triangle it captures less as the resulting buffer's size is not dividible by 3.
What can be the solution?
Upload your code somewhere... In OpenGL it's almost always down to arbitrary mistakes resulting in an incorrect state.
Can I post my code here? Or should I try other sites like stackoverflow?
Pastebin sounds like a reasonable choice.
Here, I've given the relevant parts of the code.
http://pastebin.com/DgeELtmd
http://pastebin.com/DgeELtmd