Hi, i created a random plant generator.
The plant grows and that can be really really slow, like 0.1 fps (depands on the plant).
[img] http://img215.imageshack.us/img215/3300/plantb.png[/img]
Atm, it draws a segemt, goes to the top of that, pushmatrix, rotate, draw the line, translate(to go to end of line), rotate again etc. till the Branch is done and then a popMatrix to draw the next Branch. (something like that, a bit more complex due the fact it can have more branches but you get the idea).
Anyway, will i gain much speed if i avoid the pushMatrix, rotate, translate and popMatrix and use some math instead to calculate there angles and the xy coordinates of the beginning and ending of a line?
The plant grows and that can be really really slow, like 0.1 fps (depands on the plant).
[img] http://img215.imageshack.us/img215/3300/plantb.png[/img]
Atm, it draws a segemt, goes to the top of that, pushmatrix, rotate, draw the line, translate(to go to end of line), rotate again etc. till the Branch is done and then a popMatrix to draw the next Branch. (something like that, a bit more complex due the fact it can have more branches but you get the idea).
Anyway, will i gain much speed if i avoid the pushMatrix, rotate, translate and popMatrix and use some math instead to calculate there angles and the xy coordinates of the beginning and ending of a line?
1