GLUTDISPLAYFUNC(3)

πŸ“¦
version 3.8.0 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

✨ NAME ✨

Okay so glutDisplayFunc β€” Sets the Display callback for the current window. This page is GLUTDISPLAYFUNC(3), and it's giving window-callback realness, fr fr. πŸ¦‹

πŸ“š LIBRARY πŸ“š

OpenGLUT - windowcallback. That's the whole library vibe, bestie.

✨ SYNOPSIS ✨

#include <openglut.h>

void
glutDisplayFunc(void( *callback )( void ));

πŸŽ€ PARAMETERS πŸŽ€

  • callback β€” the client function for the normal redisplay event. That's your main-character plug-in, no cap. πŸ’…

πŸ’– DESCRIPTION πŸ’–

Sets the display callback for the current window. The way that this works? All windows, including subwindows, must have a display callback registered. Like, literally all of them. OpenGLUT will call the callback function whenever it thinks the window may require updating. ✨

This callback is bound to the current window. So it's not out here doing side quests for other windows β€” it's loyal, periodt. πŸ’–

⚠️ CAVEATS ⚠️

Unlike most callbacks, it is illegal to try to disable the display callback by setting it to NULL. Bestie, do not do that. That's not a vibe. 😭

Multiple redisplays may be coalesced into a single event for invoking callback only once. So if you're spamming redisplay, OpenGLUT might be like, "one event, bestie." πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

Also go read glutPostRedisplay(3) and glutOverlayDisplayFunc(3). Slay. πŸ”₯


mwah πŸ’… this page is stamped UNDATED with source/version UNTITLED(), and that's the whole sign-off. 🫢