iphone - Performance issue, drawing app on iOS with OpenGL ES 2.0 -
i’m developing drawing app on ios, opengl es 2.0 (i begin using it). reproduce textured brushes on app. that, decided use shaders (best choice?). @ stage, have textured brushes, unfortunately, have performance problems after few seconds…
 
here overview of app process:
- i receive 140 points each second.
 - each time, on draw function, browse of points (points of contained on stroke class, contained on layer) , redraw it.
 
code:
for (int strokeid = 0; strokeid < layer->strokeslist.size(); strokeid++) {     stroke* stroke = layer->strokeslist.at(strokeid);      […]      glvertexattribpointer(mainprogram.positionslot, 2, gl_float, gl_false, 0, stroke->vertices.position);     glvertexattribpointer(mainprogram.colorslot, 4, gl_float, gl_false, 0, stroke->vertices.color);      gldrawarrays(gl_triangles, 0, (int)(stroke->nbvertices));      […] }   i opened suggestion improve drawing method, thank you!
 
 
Comments
Post a Comment