Had some issues before with polyvector being slow on the iphone.
specifically I had this code to begin testing with.
Since I'm using a startpoly every increment of the loop things really go slow (I get 5 fps approximately).
I changed the code so that startpoly lies outside the loop and things went a little quicker. But the dealbreaker was when I changed the mode on startpoly to single triangles (instead of the standard 'fan') that it came back to full speed.
So now I use this code instead:
Just wanted to share!
If I find anything more useful with polyvectors and iphone I'll post it here!
specifically I had this code to begin testing with.
Code (glbasic) Select
SETSCREEN 960, 640, FALSE
GLOBAL G_gameloop = TRUE
GLOBAL G_blocksize = 64
GLOBAL G_color
WHILE G_gameloop
FOR x = 0 TO 15
FOR y = 0 TO 10
G_color = RGB(200-(x*12),x*10+RND(50),y*17)
STARTPOLY 0
POLYVECTOR x*64, y*64, 0, 0, G_color
POLYVECTOR x*64, y*64+G_blocksize, 0, 64, G_color
POLYVECTOR x*64+G_blocksize, y*64+G_blocksize, 64, 64, G_color
POLYVECTOR x*64+G_blocksize, y*64, 64, 0, G_color
ENDPOLY
NEXT
NEXT
SHOWSCREEN
WEND
Since I'm using a startpoly every increment of the loop things really go slow (I get 5 fps approximately).
I changed the code so that startpoly lies outside the loop and things went a little quicker. But the dealbreaker was when I changed the mode on startpoly to single triangles (instead of the standard 'fan') that it came back to full speed.
So now I use this code instead:
Code (glbasic) Select
SETSCREEN 960, 640, FALSE
GLOBAL G_gameloop = TRUE
GLOBAL G_blocksize = 64
GLOBAL G_color
WHILE G_gameloop
STARTPOLY 0, 1 // Using single triangles! <--------------------------
FOR x = 0 TO 15
FOR y = 0 TO 10
G_color = RGB(200-(x*12),x*10+RND(50),y*17)
POLYVECTOR x*64, y*64, 0, 0, G_color
POLYVECTOR x*64, y*64+G_blocksize, 0, 64, G_color
POLYVECTOR x*64+G_blocksize, y*64+G_blocksize, 64, 64, G_color
POLYVECTOR x*64+G_blocksize, y*64+G_blocksize, 64, 64, G_color
POLYVECTOR x*64+G_blocksize, y*64, 64, 0, G_color
POLYVECTOR x*64, y*64, 0, 0, G_color
NEXT
NEXT
ENDPOLY
SHOWSCREEN
WEND
Just wanted to share!
If I find anything more useful with polyvectors and iphone I'll post it here!