Sign in to follow this  
irreversible

Integer buffers and transform feedback

Recommended Posts

irreversible    2862
I'm having serious trouble reading and updating integer buffers when doing transform feedback. My buffer setup follows exactly the same pattern as that of a regular float buffer and I'm getting no errors from GL. However, when accessing the buffer in the shader, I'm getting values that are definitely wrong (as in they bear no similarity to what I initially write into the buffer). The same happens when I update the buffer from the shader. The code itself is pretty sizeable so I thought I'd just post the question first - are there any limitations to using GL_INT with glVertexAttribPointer() or could this possibly be a driver fluke? I mean, there's pretty much zero information on this out on the web and float buffers are working just perfectly.

However, since I need to pack 5 parameters into a single int, I need bit level access to the stream and I don't see any way to reinterpret a float into an int without it being re-cast and transformed in GLSL.

Has anyone had any dealings with this or can verify that/whether int buffers should work at all with transform feedback.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this