i need program for glutSolidCube(1) texturing

hai friends
give me one example program how i can texture the glutWireCube(1); glutSolidSphere(1,30,30);objectS . guide me.
i want one example program friends.

very much thanks NiCo for gave that GLuObject texturing program