Hi all
i am using an OSC sender to send the outline of blobs to another pc.
the relevant code is
void ofApp::sendBlobOutlines(ofxOscMessage *m)
{
m->addIntArg( blobTr.size() );
//for all outlines
for ( unsigned int i = 0 ; i < blobTr.size() ; i++ )
{
//for all points in each outline
vector<ofPoint> ptsInPolyline = blobTr[i].getVertices();
m->addIntArg( ptsInPolyline.size() );
for ( unsigned int k = 0 ; k < ptsInPolyline.size() ; k++ )
{
m->addFloatArg( ptsInPolyline[k].x );
m->addFloatArg( ptsInPolyline[k].y );
}
}
}
this raises an exception:
terminate called after throwing an instance of ‘osc::OutOfBufferMemoryException’
what(): out of buffer memory
and probably the reason is that the outlines are huge vectors of points.
I can simplify the polylines before sending them, but this does not mean i won’t get a crash if one more object comes into view - and so more points will be appended to the msg list that willexceed the buffer size…
Alternatively, i’d prefer to be able to extend the buffer size…
What can i do about this problem?
Thank you very much for your help!