Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] ofPolyline addVertex accepting glm::vec2 #7831

Open
dimitre opened this issue Dec 20, 2023 · 2 comments
Open

[feature request] ofPolyline addVertex accepting glm::vec2 #7831

dimitre opened this issue Dec 20, 2023 · 2 comments

Comments

@dimitre
Copy link
Member

dimitre commented Dec 20, 2023

it should just work, as ofPolyline is usually a 2d drawing.
some related discussion here:

@artificiel
Copy link
Contributor

definitely. I've skimmed through #5440 and TLDR is that ofPolyline is templated and things are not simple because T may == glm::vec2. this branch has work to support compile-time enabling by checking the types:

https://github.com/arturoc/openFrameworks/blob/1a2c94bfa52abf4f1f42ce934e0249746332a1f4/libs/openFrameworks/graphics/ofPolyline.h#L65-L69

then enabling the correct interpretation on the different glm::vec2 inputs such as:

https://github.com/arturoc/openFrameworks/blob/1a2c94bfa52abf4f1f42ce934e0249746332a1f4/libs/openFrameworks/graphics/ofPolyline.h#L90C1-L94C1

(but the branch has many other things going; perhaps the relevant bits can be pulled?)

@dimitre
Copy link
Member Author

dimitre commented Dec 23, 2023

a new pr with relevant changes would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants