pouët.net

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?
added on the 2016-08-25 13:07:38 by nexor nexor
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?
added on the 2016-08-25 13:31:30 by nexor nexor
Pastebin sounds like a reasonable choice.
added on the 2016-08-25 14:02:12 by Gargaj Gargaj
Here, I've given the relevant parts of the code.

http://pastebin.com/DgeELtmd
added on the 2016-08-25 14:28:04 by nexor nexor

login