We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Framerate hit with vertex
Page Index Toggle Pages: 1
Framerate hit with vertex (Read 395 times)
Framerate hit with vertex
Mar 1st, 2010, 12:42pm
 
What is the best way to use vertices while keeping a decent frameRate?
e.g.
Code:

for (int a= 0;a<width;a++){
  for (int b= 0;b<height;b++){

beginShape();
vertex(a,b,c);
vertex(a-1,b,c);
vertex(a-1,b-1,c);
vertex(a,b-1,c);
endshape();
}
}
}

Re: Framerate hit with vertex
Reply #1 - Mar 1st, 2010, 12:54pm
 
On a  640 x 480 sketch that's 307,200 quads and 1,228,800 vertexes it will take some miracle to get a decent frame rate, and since each quad represents just 1 pixel it seems overkill.

If you are using OpenGL you could try using it directly rather than via Proccessing,
Re: Framerate hit with vertex
Reply #2 - Mar 1st, 2010, 1:08pm
 
but like quark says, it doesnt make much sense. you could also use point() instead and wont see a big difference.
if you tell us what you are trying to do we can maybe think of some other good ways to achieve it
Page Index Toggle Pages: 1