Hey
I’ve recently came across a bug when there’s an animation on the screen and you press quickly multiple times shift and ctrl. The animation laggs. I suppose that this issue is connected somehow with sticky keys but its undoubtedly not fault of my computer. I’m using Windows XP. Here’s the sample code I’ve made for you to try this bug out (It doesn’t happen on all computers but on many does…):
#include <gl/glut.h>
void InitGL();
void Draw();
int ScrWidth = 800, ScrHeight = 450;
int Window = NULL;
int pos_x = 300;
int main(int argc, char **argv){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize(ScrWidth, ScrHeight);
glutInitWindowPosition(0, 0);
Window = glutCreateWindow("LF BY SAVAIL");
InitGL();
glutDisplayFunc(&Draw);
glutIdleFunc(&Draw);
glutMainLoop();
glutDestroyWindow(Window);
}
void InitGL(){
glViewport(0, 0, ScrWidth, ScrHeight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, ScrWidth, ScrHeight, 0, -1, 1);
glMatrixMode(GL_MODELVIEW);
glShadeModel(GL_SMOOTH);
glClearColor(0, 0, 0, 0);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
}
void Draw(){
glutSetWindow(Window);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glColor3f(1, 0.1, 0);
glBegin(GL_POLYGON);
glVertex3f(100, 100, 0);
glVertex3f(200, 200, 0);
glVertex3f(pos_x, 100, 0);
glEnd();
pos_x++;
glutSwapBuffers();
}
[push quickly shift and ctrl multiple times to cause the animation lagg]
Could I expect this bug to be repaired? I would be very grateful for any advise and reply