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
Refactor PShapeOpenGL #1623
Comments
@benfry I will start working on this after 2.1 final is out, feel free to add any notes/comments/suggestions you think are relevant. |
This refactoring could also be an opportunity to reduce the memory footprint of PShapeOpenGL: http://forum.processing.org/two/discussion/1071/point-clouds-in-processing-2-1-with-opengl#Item_2 |
I think it would be interesting to have some kind of basic PShape, something closer to GlGraphics GlModel, where the flexibility of PShape is traded for GlModel’s performance. I would like to move some ongoing projects to Processing 2, but without lowering the number of vertices used. Dealing with the arrays in order to modify vertex properties is worth the performance difference for me. |
sh = createShape();
sh.beginShape();
sh.fill(203, 100, 44);
sh.attrib("fuzziness", 0.5);
sh.vertex(40, 30, 20);
sh.fill(200, 141, 100);
sh.attrib("fuzziness", 0.4);
sh.vertex(30, 20 30);
// .. and so on
sh.endShape(); Implemented in #2963 |
As part of this, I will combine VertexBuffer with PGraphicsOpenGL.VertexAttribute. |
FWIW, I think this is post-3.0, unless there's something serious that's being fixed here. It's not pretty at the moment, but it's not like people are raiding the castle demanding a cleaner internal design for PShapeOpenGL. |
So all the VBO code goes a into a Cache object, like Texture does for PImage.
The text was updated successfully, but these errors were encountered: