I am working on an engineering visualization program using OpenTK. I should display the amount of model rotation around x,y and z axes in every output that I get from my program. I am using the following sample code as the text and model renderer (both is done in the same function):
private void glControl1_Paint(object sender, PaintEventArgs e)
if (!loaded) return;
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
// When the user presses the arrow keys, zRot changes relevantly //
GL.Rotate(zRot, 0.0f, 0.0f, 1.0f);
ITextPrinter printer = new TextPrinter();
TextureFont font = new TextureFont(new Font(FontFamily.GenericSansSerif, 10f));
TextHandle handle = new TextHandle;
GL.Color3(0f, 1f, 0f);
printer.Prepare(zRot.ToString(), font, out handle);
// ... Creating my simple models ...
The program , works fine, but after some rotation, the model stops rotating but the counter goes on counting. How I can solve the problem.
Thanks in forward.