PDA

View Full Version : glutKeyboardFunc() causing Access Violation error



weggo
12-17-2010, 08:16 AM
So i've tried to add some input handling to my project, and created new header for that. I made initialization function which calls glutKeyboardFunc() for keyboard handling. As a parameter I used my own made void function: void keyboard_func(unsigned char key, int mouse_x, int mouse_y);, and it shouldn't cause that violation error. So I'm asking, what would cause it? And btw, the initialization function is in .cpp file of course :3

weggo
12-17-2010, 09:15 AM
Ok found the problem which cause that memory error: It probably couldn't initialize the keyboard function before display function, and then causing memory error