GLGraphics - loading a PShape into GLModel?
in
Contributed Library Questions
•
2 years ago
Hello
I'm writing a thingy using GLgraphics, and I'm trying to load an SVG an display it several times. As long as its only a few repetitions of a very simple shape it's all good, but as soon as the shape becomes more than a few verts or number of repetitions gets above 20-50 it all slows down dramatically. I'm guessing PShape goes through curve list every time for each object which is redundand as the shape will not change in runtime.
I'd love to be able to put the shape in the GPU as GLModel and request drawing it in different positions, but I must admit my opengl knowledge is poor and I'm having trouble fully understanding the glmodel examples, and so far I have failed guessing a way to do it (there's verts[] but also glmode and I am not sure how would triangulation of the shape work and do I have to do it on my end using geometrative or something).
It would be great if someone would point me to a right direction. Thanks
I'm writing a thingy using GLgraphics, and I'm trying to load an SVG an display it several times. As long as its only a few repetitions of a very simple shape it's all good, but as soon as the shape becomes more than a few verts or number of repetitions gets above 20-50 it all slows down dramatically. I'm guessing PShape goes through curve list every time for each object which is redundand as the shape will not change in runtime.
I'd love to be able to put the shape in the GPU as GLModel and request drawing it in different positions, but I must admit my opengl knowledge is poor and I'm having trouble fully understanding the glmodel examples, and so far I have failed guessing a way to do it (there's verts[] but also glmode and I am not sure how would triangulation of the shape work and do I have to do it on my end using geometrative or something).
It would be great if someone would point me to a right direction. Thanks
1