GLUTPASSIVEMOTIONFUNC(3)

✨ NAME ✨

glutPassiveMotionFunc β€” bestie, this one sets the non-dragging (gliding? πŸ‘€) mouse-motion callback. It's the vibe check for your mouse when literally no buttons are pressed.

πŸ“š LIBRARY πŸ“š

OpenGLUT - input πŸ¦‹

πŸŽ€ SYNOPSIS πŸŽ€

#include <openglut.h>

void
glutPassiveMotionFunc(void( *callback )( int x, int y ));

🌸 PARAMETERS 🌸

  • callback β€” your client mouse-glide hook. The little function that gets pinged when the mouse just. glides. πŸ’…

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: if you set this callback on a window, then every single time OpenGLUT detects a change in the mouse position inside that window β€” and no buttons are pressed on that mouse, we're talking strictly vibes-only gliding here β€” OpenGLUT will invoke callback with the window coordinates of the mouse. 🐭✨

the way this works is so iconic honestly, no cap.

and heads up bestie: this callback is bound to the current window. so it's giving very main-character, very "this window only" energy. 🫢

😭 CAVEATS 😭

not me having to tell you this but β€” windows created via glutCreateMenuWindow() always cascade keyboard and mouse events to their parent. always. periodt. so if your menu window is acting like it's passing stuff up the chain, that's not a bug, that's just how it is πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie πŸŽ€ this one's UNDATED and UNTITLED() β€” yeah fr fr, no version stamp, no fancy title, just vibes and a mouse callback. iykyk πŸ’œ