ofxCv Flow Distort example compiling errort


I’m trying to compile the ‘example-flow-distort’ from ofxCv; https://github.com/kylemcdonald/ofxCv/tree/master/example-flow-distort

But I’m receiving this error;
No viable conversion from ‘ofVec2f’ to ‘const glm::vec<3, float, glm::packed_highp>’

How would I go about solving this problem?

Thank youuuu

ofMesh::addVertex() accepts a glm::vec3 as parameter

so in your first nested for loop, you can do :

mesh.addVertex(glm::vec3(x * stepSize, y * stepSize, 0));
mesh.addTexCoord(glm::vec2(x * stepSize, y * stepSize));

and in the last loop :

glm::vec3 position {x * stepSize, y * stepSize, 0};
ofRectangle area(position - glm::vec3(stepSize, stepSize, 0) / 2, stepSize, stepSize);
glm::vec2 offset {flow.getAverageFlowInRegion(area)};

mesh.setVertex(i, position + distortionStrength * offset);

Ahhh okay

It worked! Thank you very much