I am trying to set an image (.rgb) as a background of a window, and have a dynamic texture mapped 3D object (torus) rotate in front of it.
I have a QUAD set up the same size as my widow, but it is rotating with the torus, infact, it is `slicing' the torus right through the middle.
I have a feeling that I am rotating everything in the window, or the viewpoint, instead of just the torus.
Does anyone know how to fix this?
I have a snip-it of code below.
Any help would be greatly appreciated.
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glTexCoord2f(0.0,0.0) ; glVertex2f(-15.0,-15.0) ;
glTexCoord2f(0.0,1.0) ; glVertex2f(-15.0, 15.0) ;
glTexCoord2f(1.0,1.0) ; glVertex2f( 15.0, 15.0) ;
glTexCoord2f(1.0,0.0) ; glVertex2f( 15.0,-15.0) ;
glRotatef(5.0, 1.0, 1.0, 1.0);
glutSolidTorus(2.0, 5.0, 50, 50);