There are many way’s in which to create the effect you want, but depending on what you want to program to do in the future. How you are doing it now will limit you options.
GLUT is the simplest way to create an openGL program. If you are having trouble with using GLUT, then you may want to study more.
I think that a better understanding of how openGL and programming in general would help you with this.
Start with nehe’s tutor 1 and work your way up, to get a better understanding of programming openGL.