This was particularly exciting to me because.. i knew glRotatef function takes a vector.. but i just couldn't figure out how to use it till i saw somebody post it in as a solution to the problem i mentioned above.
glTranslatef(objCenterX, ObjCenterY, ObjCenterZ);
//rotate about y axis now the x axis is changed.
glRotatef(angle, 0, 1, 0);
//the new globalX axis is cos(angle *pi/180), 0, sin(angle * pi/180)
glRotatef(angle, cos(angle * pi/180), 0, sin(angle*pi/180));
glTranslatef(-objCenterX, -ObjCenterY, -ObjCenterZ);
... //draw the object
Just in case you are interested in looking at the conversation that helped me figure out the solution.. here you go