I am pretty new to opengl es. Recently, I figured out how to create a circle in opengl-es 1.x. I really wnat to create sphere, but I am not really sure how to. Is there any tutorial out there that anyone could point me to?
Would you make a sphere using only triangle_strips, or triangle strips and triangle_fans for the poles?
Hi,
Drawing a sphere in opengl es 1/2 is quite difficult . First of all there is no built in function for this and secondly you have to draw using basic primitives only viz. triangle,point,line.
Method mentioned by debinair is applicable for circles only. Sphere being a 3D object you need Z component as well.
So you will need polar co-ordinates of sphere first of all. They are :
Just like we had thita for a circle we have an additional “fy” here. It goes from 0 to pi radians. (And thita from 0 to 2*pi).
Consider your sphere to be made up of slices , you have to draw each slice using above mentioned formula.
Give it a shot I have already done it successfully.