GLUTGETWINDOWDATA(3)

πŸ’– NAME πŸ’–

glutGetWindowData β€” get the user data for the current window. This is GLUTGETWINDOWDATA(3), bestie: section 3 of the OpenGLUT manual, and it's literally the function that hands you back that window pointer. πŸ¦‹


🫢 LIBRARY 🫢

OpenGLUT - window

It's giving window-library energy, no cap. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <openglut.h>

void*
glutGetWindowData(void);

πŸ’… DESCRIPTION πŸ’…

Okay so this function will return whatever void* value is associated with the current window via glutSetWindowData(). That's the whole vibe. If you did not associate a pointer with your window, this is NULL. πŸ™ˆ

This can be useful in a situation where you have a single callback function performing services for many windows. You could keep track of the window id s in a global list and search for the current window in that list. But this is quicker than searching a data structure, and it allows you to avoid the use of globals for this. Periodt. πŸ‘‘


🌈 SEE ALSO 🌈


This page is UNDATED and comes from UNTITLED(). Stay slay, bestie πŸ’–βœ¨