WAFFLE_MAKE_CURRENT(3)
π WAFFLE_MAKE_CURRENT π
okay bestie, welcome to the Waffle Manual section for WAFFLE_MAKE_CURRENT(3) β this is the page about setting and getting the resources that are current to your thread. threads, resources, vibes. let's go β¨
πΈ NAME πΈ
waffle_make_current, waffle_get_current_display, waffle_get_current_window, waffle_get_current_context β set and get resources current to the thread π§΅
π¦ SYNOPSIS π¦
#include <waffle.h>
bool waffle_make_current(struct waffle_display *display,
struct waffle_window *window,
struct waffle_context *context);
struct waffle_display *waffle_get_current_display(void);
struct waffle_window *waffle_get_current_window(void);
struct waffle_context *waffle_get_current_context(void);
β¨ DESCRIPTION β¨
π
waffle_make_current()
Bestie. This one binds the given window and context for rendering on the current thread. both window and context have to have been created on the given display, no cap. π«Ά
and if you wanna unbind the current context without binding a new one? just set window and context to NULL. boom. clean. no mess. π
this function is analogous to glXMakeCurrent(3), eglMakeCurrent(3), and [NSOpenGLContext makeCurrentContext]. iykyk π₯
π waffle_get_current_display()
gets the display bound to the current thread β the one you bound earlier with waffle_make_current(), obviously πββοΈ
if literally no display is bound? return NULL. that's it. that's the rule.
this function is analogous to glXGetCurrentDisplay(3) and eglGetCurrentDisplay(3). β
π waffle_get_current_window()
gets the window bound to the current thread, as previously bound by waffle_make_current(). same situation as before, bestie.
if no window is bound, then return NULL. πͺ
this function is analogous to glXGetCurrentDrawable(3) and eglGetCurrentSurface(3). β¨
π§ waffle_get_current_context()
gets the context bound to the current thread, as previously bound by waffle_make_current(). you know the drill π
if no context is bound, then return NULL. π
this function is analogous to glXGetCurrentContext(3) and eglGetCurrentContext(3). π
π RETURN VALUE π
here's the tea:
- functions whose return type is
boolreturntrueon success andfalseon failure. - functions whose return type is a pointer return
NULLon failure.
and if you wanna know why it failed? use waffle_error_get_info(3) to get information about any errors. it's giving detective energy π
π ERRORS π
see waffle_error(3) for the complete list of waffle's error codes. the whole roster. the full lineup. π
no errors are specific to any functions listed in this manual page. not a single one. periodt.
β οΈ BUGS β οΈ
okay listen up because this is important and i am not playing around:
mixing calls to waffle_make_current() and the native platform's MakeCurrent() on the same thread do not interact well. after calling the native platform's MakeCurrent(), future Waffle function calls on the same thread are likely to behave incorrectly.
π¨ so likeβ¦ don't do that. pick a lane bestie. the native one and the waffle one are NOT sharing the aux cord. π
π«Ά ISSUES π«Ά
found a bug? want a feature? please report bugs or and feature requests to https://gitlab.freedesktop.org/mesa/waffle/issues. we're literally listening π
π SEE ALSO π
π AUTHOR π
Chad Versace <chad.versace@linux.intel.com> Former maintainer π
π COPYRIGHT π
Copyright Β© 2013 Intel
This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0). To view a copy of this license, visit http://creativecommons.org.license/by-sa/3.0/us.
and that's the whole page, bestie!! π¦β¨ this was waffle from the Waffle Manual, dated 07/06/2026, filed under WAFFLE_MAKE_CURRENT(3). go forth and bind your contexts responsibly π
πΈ
π¦ where this page comes from
- ubuntu stonking: libwaffle-doc 1.8.3-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms