logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

waffle_make_current, waffle_get_current_display, waffle_get_current_window, waffle_get_current_context -

Author

ChadVersace <chad.versace@linux.intel.com>
           Former maintainer

Bugs

       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.

Description

waffle_make_current()
           Bind the given window and context for rendering on the current thread.  window and context must both
           have been created on the given display. To unbind the current context without binding a new one, set
           window and context to NULL.

           This function is analogous to glXMakeCurrent(3), eglMakeCurrent(3), and [NSOpenGLContextmakeCurrentContext].

       waffle_get_current_display()
           Get the display bound to the current thread, as previously bound by waffle_make_current(). If no
           display is bound, then return NULL.

           This function is analogous to glXGetCurrentDisplay(3) and eglGetCurrentDisplay(3).

       waffle_get_current_window()
           Get the window bound to the current thread, as previously bound by waffle_make_current(). If no
           window is bound, then return NULL.

           This function is analogous to glXGetCurrentDrawable(3) and eglGetCurrentSurface(3).

       waffle_get_current_context()
           Get the context bound to the current thread, as previously bound by waffle_make_current(). If no
           context is bound, then return NULL.

           This function is analogous to glXGetCurrentContext(3) and eglGetCurrentContext(3).

Errors

       See waffle_error(3) for the complete list of waffle's error codes.

       No errors are specific to any functions listed in this manual page.

Issues

       Please report bugs or and feature requests to https://gitlab.freedesktop.org/mesa/waffle/issues.

Name

       waffle_make_current, waffle_get_current_display, waffle_get_current_window, waffle_get_current_context -
       set and get resources current to the thread

Return Value

       Functions whose return type is bool return true on success and false on failure. Functions whose return
       type is a pointer return NULL on failure. Use waffle_error_get_info(3) to get information about any
       errors.

See Also

waffle(7)

Synopsis

#include<waffle.h>boolwaffle_make_current(structwaffle_display*display,structwaffle_window*window,structwaffle_context*context);structwaffle_display*waffle_get_current_display(void);structwaffle_window*waffle_get_current_window(void);structwaffle_context*waffle_get_current_context(void);

See Also