Running into trouble with GLUT.
So I've been using GLUT as my window power for OpenGL, in some huge project I'm working on.
Two problems I have run into thus far:
1) GLUT doesn't give mouse motion callback outside the window, and I don't see a way to fix this. I need to make sure that mouse_x and mouse_y are relatively consistently accurate. Otherwise, should a game be designed where mouse motion is tracked, it could be cheated by having the mouse leave the window.
2) Window positioning. I devised three functions. window_set_position(), window_get_x(), and window_get_y(). GLUT_WINDOW_X/Y return the location of the drawing are of the window, not the corner of the border. On the other hand, the positioning function does work according to the border origin. Meaning that calling window_set_position(window_get_x(),window_get_y()) causes fail. I came up with a temporary, or permanent, solution. At the beginning, I set the initial window position to (100,100). On the initialize callback, I set __window_borderh and __window_borderw to glutGet(WINDOW_GET_X) - 100 and glutGet(WINDOW_GET_Y) - 100. This allows me to call those vars in the window_get_x/y functions to make it in sync.
3) Cursors hate me. I'm assuming there's something I should have enabled, but didn't, and will look into that in a minute here. But only like eight cursor settings do anything, and only three are accurate.
If you know a solution to any of those, or would like to suggest some other API with all the power of GLUT (especially in the window area. I need those window functions for the project to succeed) please let me know. If somehow you've heard about the project (VERY unlikely) and you'd like to help (even less likely), or you'd just like to see what the hell I'm doing, feel free to drop me an email. Or whatever.
Thanks, and Merry Christmas (or just happy holidays)