python - Creating 3D surface [ set_at() VS draw.polygon() ] -


hy!

i have problem understanding why set_at() function in pygame slow. made simple 3d graphic engine wire frame, , want put picture in every frame of object. such thing made algoritem set_at() function. problem joust drawing picture set_at() aproxi. 0.9 second (cprofiler) relative small picture. me run game 30 fps. :/

capture of pygame: http://shrani.si/f/1q/fk/1wnfv61s/capture.png

than replace set_at() function joust draw.polygon(uni colour) , super fast. why diference 2 functions. same result, diferent paths... speed slow down beacuse switching python pygame?

is there way draw single pixel faster way desired speed.


Comments