GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WAFFLE_INIT(3) Waffle Manual WAFFLE_INIT(3)

waffle_init - Initialize waffle's per-process global state

#include <waffle.h>

bool waffle_init(const int32_t attrib_list[]);

waffle_init() initializes the per-process global state of the waffle library with the attributes specified in attrib_list. The set of attributes is documented below. attrib_list consists of a zero-terminated sequence of name/value pairs.

Most waffle functions emit an error if called when waffle is unitialized. The small set of functions that can be successfully called before initialization are explicitly documented as such.

If a call to waffle_init() fails, no global state is initialized and the caller may safely attempt to call waffle_init() again. If waffle has already been initialized by a successful call to waffle_init() one has to call waffle_teardown() to clear the global state. Otherwise calling waffle_init() again emits the error WAFFLE_ERROR_ALREADY_INITIALIZED.

WAFFLE_PLATFORM

This attribute is required. Possible values are:

WAFFLE_PLATFORM_ANDROID

[Android] Use EGL on Android.

WAFFLE_PLATFORM_GBM

[Linux] Use EGL with GBM, the "Generic Buffer Manager" provided by libgbm. This platform is capable of OpenGL rendering without a display manager.

WAFFLE_PLATFORM_CGL

[MacOS] Use CGL to create the waffle_config(3) and waffle_context(3). Use Cocoa to create the waffle_window(3).

WAFFLE_PLATFORM_GLX

[Linux only, MacOS not yet supported]

WAFFLE_PLATFORM_NACL

[Linux only, other systems not yet supported]

WAFFLE_PLATFORM_SURFACELESS_EGL

[Linux] Use EGL's "surfaceless" platform, EGL_MESA_platform_surfaceless[1].

WAFFLE_PLATFORM_WAYLAND

[Linux] Use EGL with the Wayland display server.

WAFFLE_PLATFORM_WGL

[Windows] Use WGL on Windows.

WAFFLE_PLATFORM_X11_EGL

[Linux] Use EGL with the X11 display server.

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 waffle_error(3) for the complete list of waffle's error codes.

Listed are the errors specific to waffle_init().

WAFFLE_ERROR_ALREADY_INITIALIZED

Waffle has already been initialized with a successfull call to waffle_init().

WAFFLE_ERROR_BAD_ATTRIBUTE

An item in attrib_list is unrecognized or has an invalid value, or a required attribute is missing.

WAFFLE_ERROR_BUILT_WITHOUT_SUPPORT

Waffle was built without support for the requested attribute.

Initialize waffle for X11/EGL.

#include <waffle.h>
static const int32_t init_attrib_list[] = {

WAFFLE_PLATFORM, WAFFLE_PLATFORM_X11_EGL,
0, }; int main() {
bool ok = waffle_init(init_attrib_list);
if (ok)
return EXIT_SUCCESS;
else
return EXIT_FAILURE; }

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

waffle(7)

Chad Versace <chad.versace@linux.intel.com>

Maintainer

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.

1.
EGL_MESA_platform_surfaceless
https://www.khronos.org/registry/egl/extensions/MESA/EGL_MESA_platform_surfaceless.txt
07/17/2025 waffle

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.