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:

  1. i receive 140 points each second.
  2. 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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -