1WAFFLE_MAKE_CURRENT(3)           Waffle Manual          WAFFLE_MAKE_CURRENT(3)
2
3
4

NAME

6       waffle_make_current, waffle_get_current_display,
7       waffle_get_current_window, waffle_get_current_context - set and get
8       resources current to the thread
9

SYNOPSIS

11       #include <waffle.h>
12
13
14       bool waffle_make_current(struct waffle_display *display,
15                                struct waffle_window *window,
16                                struct waffle_context *context);
17
18       struct waffle_display *waffle_get_current_display(void);
19
20       struct waffle_window *waffle_get_current_window(void);
21
22       struct waffle_context *waffle_get_current_context(void);
23

DESCRIPTION

25       waffle_make_current()
26           Bind the given window and context for rendering on the current
27           thread.  window and context must both have been created on the
28           given display. To unbind the current context without binding a new
29           one, set window and context to NULL.
30
31           This function is analogous to glXMakeCurrent(3), eglMakeCurrent(3),
32           and [NSOpenGLContext makeCurrentContext].
33
34       waffle_get_current_display()
35           Get the display bound to the current thread, as previously bound by
36           waffle_make_current(). If no display is bound, then return NULL.
37
38           This function is analogous to glXGetCurrentDisplay(3) and
39           eglGetCurrentDisplay(3).
40
41       waffle_get_current_window()
42           Get the window bound to the current thread, as previously bound by
43           waffle_make_current(). If no window is bound, then return NULL.
44
45           This function is analogous to glXGetCurrentDrawable(3) and
46           eglGetCurrentSurface(3).
47
48       waffle_get_current_context()
49           Get the context bound to the current thread, as previously bound by
50           waffle_make_current(). If no context is bound, then return NULL.
51
52           This function is analogous to glXGetCurrentContext(3) and
53           eglGetCurrentContext(3).
54

RETURN VALUE

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

ERRORS

62       See waffle_error(3) for the complete list of waffle's error codes.
63
64       No errors are specific to any functions listed in this manual page.
65

BUGS

67       Mixing calls to waffle_make_current() and the native platform's
68       MakeCurrent() on the same thread do not interact well. After calling
69       the native platform's MakeCurrent(), future Waffle function calls on
70       the same thread are likely to behave incorrectly.
71

ISSUES

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

SEE ALSO

77       waffle(7)
78

AUTHOR

80       Chad Versace <chad.versace@linux.intel.com>
81           Maintainer
82
84       Copyright © 2013 Intel
85
86       This manual page is licensed under the Creative Commons
87       Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0). To
88       view a copy of this license, visit
89       http://creativecommons.org.license/by-sa/3.0/us.
90
91
92
93
94waffle                            01/27/2021            WAFFLE_MAKE_CURRENT(3)
Impressum