Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Setting attribute data, randomly returns bad access exception

$
0
0

Hi there,

I'm computing tangent space and setting it to my shader as an attribute like so:

shader.begin();
int location = shader.getAttributeLocation("tangent");
earth.getVbo().setAttributeData(location, &tangents[0], 3, tangents.size(), GL_DYNAMIC_DRAW, sizeof(ofVec3f));
shader.end();

What happens is, it randomly (maybe 1 out in 5) returns a bad access exception, from this function:

glBufferData(this->data->lastTarget, bytes, data, usage);

I've no ideia why, or how to solve this. But when it successfully builds, everything works as expected.

I've tried in master and 0.9. I'm using Mac OS 10.11, but it was also happening in 10.10.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>