Each time you use glPushMatrix rendering glPushMatrix glRotatef draw a cylinder and end the drawing with glPopMatrix .
Example: glRotatef(yRotationAngle, 0.0f, 1.0f, 0.0f); // Rotate your object around the y axis on yRotationAngle radians glRotatef(yRotationAngle, 0.0f, 1.0f, 0.0f); // Rotate your object around the y axis on yRotationAngle radians
Example: OnRender() function example
 void OnRender() { glClearColor(1.0f, 0.0f, 0.0f, 1.0f);  
Daddym 
source share