'\" t .\" Title: waffle_make_current .\" Author: Chad Versace .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 05/03/2021 .\" Manual: Waffle Manual .\" Source: waffle .\" Language: English .\" .TH "WAFFLE_MAKE_CURRENT" "3" "05/03/2021" "waffle" "Waffle Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" waffle_make_current, waffle_get_current_display, waffle_get_current_window, waffle_get_current_context \- set and get resources current to the thread .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'bool\ waffle_make_current('u .BI "bool waffle_make_current(struct\ waffle_display\ *" "display" ", struct\ waffle_window\ *" "window" ", struct\ waffle_context\ *" "context" ");" .HP \w'struct\ waffle_display\ *waffle_get_current_display('u .BI "struct waffle_display *waffle_get_current_display(void);" .HP \w'struct\ waffle_window\ *waffle_get_current_window('u .BI "struct waffle_window *waffle_get_current_window(void);" .HP \w'struct\ waffle_context\ *waffle_get_current_context('u .BI "struct waffle_context *waffle_get_current_context(void);" .SH "DESCRIPTION" .PP \fBwaffle_make_current()\fR .RS 4 Bind the given \fIwindow\fR and \fIcontext\fR for rendering on the current thread\&. \fIwindow\fR and \fIcontext\fR must both have been created on the given \fIdisplay\fR\&. To unbind the current context without binding a new one, set \fIwindow\fR and \fIcontext\fR to \fBNULL\fR\&. .sp This function is analogous to \fBglXMakeCurrent\fR(3), \fBeglMakeCurrent\fR(3), and \fB[NSOpenGLContext makeCurrentContext]\fR\&. .RE .PP \fBwaffle_get_current_display()\fR .RS 4 Get the display bound to the current thread, as previously bound by \fBwaffle_make_current()\fR\&. If no display is bound, then return NULL\&. .sp This function is analogous to \fBglXGetCurrentDisplay\fR(3) and \fBeglGetCurrentDisplay\fR(3)\&. .RE .PP \fBwaffle_get_current_window()\fR .RS 4 Get the window bound to the current thread, as previously bound by \fBwaffle_make_current()\fR\&. If no window is bound, then return NULL\&. .sp This function is analogous to \fBglXGetCurrentDrawable\fR(3) and \fBeglGetCurrentSurface\fR(3)\&. .RE .PP \fBwaffle_get_current_context()\fR .RS 4 Get the context bound to the current thread, as previously bound by \fBwaffle_make_current()\fR\&. If no context is bound, then return NULL\&. .sp This function is analogous to \fBglXGetCurrentContext\fR(3) and \fBeglGetCurrentContext\fR(3)\&. .RE .SH "RETURN VALUE" .PP Functions whose return type is \fBbool\fR return true on success and false on failure\&. Functions whose return type is a pointer return \fBNULL\fR on failure\&. Use \fBwaffle_error_get_info\fR(3) to get information about any errors\&. .SH "ERRORS" .PP See \fBwaffle_error\fR(3) for the complete list of waffle\*(Aqs error codes\&. .PP No errors are specific to any functions listed in this manual page\&. .SH "BUGS" .PP Mixing calls to \fBwaffle_make_current()\fR and the native platform\*(Aqs \fBMakeCurrent()\fR on the same thread do not interact well\&. After calling the native platform\*(Aqs \fBMakeCurrent()\fR, future Waffle function calls on the same thread are likely to behave incorrectly\&. .SH "ISSUES" .PP Please report bugs or and feature requests to \m[blue]\fB\%https://gitlab.freedesktop.org/mesa/waffle/issues\fR\m[]\&. .SH "SEE ALSO" .PP \fBwaffle\fR(7) .SH "AUTHOR" .PP \fBChad Versace\fR <\&chad\&.versace@linux\&.intel\&.com\&> .RS 4 Maintainer .RE .SH "COPYRIGHT" .br Copyright \(co 2013 Intel .br .PP 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 \m[blue]\fB\%http://creativecommons.org.license/by-sa/3.0/us\fR\m[]\&. .sp