Opengl not as portable as they say?Keyboard bug

What this means is that every time a key is hit the screen is redrawn.

Actually, it doesn’t. Thanks to the “default” clause of the switch statement returning, and the non-default clause exiting directly, that function will never be called.

Also, glutPostRedisplay does not immediately redraw the screen. It simply sets a flag in GLUT that will cause it to redraw the screen the next time it has the chance to do so.

ok guys realy thanks for your answers, I appreciate your time and wills but I’m afraid its real bug… The bug still remains even after deleting glutPostredisplay in the key function. I’m really fed up with this, have been trying to solve this since a month… If you have no more ideas where can I report the bug and is there any possibility to repair it? I’m just sure that its a problem with windows XP sticky keys which are shift ctrl and alt, they are not properly handled in glut, opengl whatever…
EDIT: Btw have you tried the bug on your own computers? It doesn’t have to cause laggs on all computers what is next prove of the bug and that the code above is fine. Just press shift and ctrl quickly multiple times and see if the rotation laggs

I’m afraid its real bug…

Here’s an example. It is not Microsoft’s fault if the OS is not very responsive if I run 3 multi-threaded x264s that are all encoding HD streams. That’s not a bug; it’s simply what happens when you have a lot of applications contending for processing resources.

Similarly, whatever combination of WindowsXP settings, sticky-keys, and so forth on your machine causes applications to update slower. That’s not the fault of the application, nor is it something they could correct. It simply is what it is.

have been trying to solve this since a month…

This may sound crazy, but have you considered… not pressing “quickly multiple times shift and ctrl?” You don’t have to do that, you know.

where can I report the bug and is there any possibility to repair it?

Not if you’re only using GLUT. FreeGLUT is actually being worked on, but GLUT is a decade old. Also, there’s the fact that there’s nothing to fix…

Btw have you tried the bug on your own computers?

Yes. Windows pops up a dialog asking if I want to turn on sticky keys. And the animation is just fine.

Granted, I’m running one of my tutorials rather than the code you posted.