what are GLUT's disadvantages?

Started by
12 comments, last by a2k 24 years ago
quote:Original post by Bad Monkey

This is sort of related... does anyone know if you can get relative mouse coords from GLUT, or set the mouse coords? (I can''t find a way, and I''ve been looking for ages)
Just curious.


Note - I have no idea what actual GLUT function calls are, so this is just pseudocode.

// Vars to store the last frame''s mouse position
static int last_X = GetAbsMousePosX();
static int last_Y = GetAbsMousePosY();
// Get the current frame''s mouse position
int curr_X = GetAbsMousePosX();
int curr_Y = GetAbsMousePosY();
// Calculate the relative motion
int rel_X = curr_X - last_X;
int rel_Y = curr_Y - last_Y;
// Store this frame''s mouse position for next time
last_X = curr_X;
last_Y = curr_Y;

Hope that helps.
Advertisement
Thanks Kylotan, but I was already using that method. What I actually meant was I just needed a way of getting the change in mouse position (in the real world) with no regard to the actual position of the pointer on the screen (kind of like with Direct Input, I guess...).

Anyway, its not that important to me

BTW, I was looking through the glut source last night (accidentally threw out the documentation... d''oh), and I found some functions that sounded interesting:
glutEnterGameMode(), glutLeaveGameMode()... oh shit, I forgot the other ones, but they were for initialising ''game mode'' and setting resolution, colour depth, and monitor refresh rate... interesting, no? Maybe you can use it for games...

-------------
squirrels are a remarkable source of protein...
You can use glutWarpPointer to move it the the centre of the screen again.

Paul Groves.
http://home.clara.net/paulyg/ogl.htm
OpenGL for Beginners
Paul Grovespauls opengl page
glut..gamemode(), huh? sounds interesting. time to investigate, mulder.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k

This topic is closed to new replies.

Advertisement