03-11-2003, 11:18 AM
Hi, I'm new to learning openGL and have a problem.
I'v drawn a basic polygon and am trying to rotate it (around an axis). It rotates just fine but when it does there are 2 polygons.
There is one polygon which is stable and the other rotates.
I want to know how I can blank out the stationary polygon.......any help with this would be great.
I'm rotating it with the code below: which is in my display method
gl.glPushMatrix();
gl.glRotated(Rot, 0,0,1);
DrawPoly();
gl.glPopMatrix();
Rot++;
and have defined Rot in my Render canvas class
I'v drawn a basic polygon and am trying to rotate it (around an axis). It rotates just fine but when it does there are 2 polygons.
There is one polygon which is stable and the other rotates.
I want to know how I can blank out the stationary polygon.......any help with this would be great.
I'm rotating it with the code below: which is in my display method
gl.glPushMatrix();
gl.glRotated(Rot, 0,0,1);
DrawPoly();
gl.glPopMatrix();
Rot++;
and have defined Rot in my Render canvas class