Vectors Error (AddVertices)

I’m quite new to openFrameworks and am trying to get some older OF code running and I don’t understand why it won’t run. The area in which the code has the error and the error has been posted below. Any and all help would be appreciated! Thanks in advance :slight_smile:

In older versions ofPolyline (as well as other OF classes) used vector<ofVec3f> or vector<ofPoint> but now uses vector<glm::vec3> you might need to change your vertices variable to that type for this to work

1 Like

You’ll have to excuse me for not quite understanding. So I should replace all ofPoint cases with vec3?

in the example that you post, you are doing:

p.addVertices(vertices)

that variable, vertices is probably either a vector<ofPoint> or vector<ofVec3f> instead it should be a vector<glm::vec3>

it’s not necessary to change all appearances of ofPoint or ofVec3f by glm::vec3 but vectors of them need to be changed

I just changed it to “vectorglm::vec3 vertices;” and it worked for solving that error but now the program spits out 30 new errors.

It seems you are also using a pretty old window type that is not supported anymore, try changing your main function in main.cpp to:

int main(){
    ofSetupOpenGL(1024,768,OF_WINDOW);
    ofRunApp(new ofApp);
}

It worked! Thanks very much :slight_smile: