waffle_context, waffle_context_create, waffle_context_destroy, waffle_context_get_native - class
Contents
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.
Description
structwaffle_context
An opaque type.
waffle_context_create()
Create a context for OpenGL rendering with the properties specified by config.
The returned context's actual properties may differ from, but are guaranteed to be compatible with,
the properties specified by config. See the section called “VERSION PROMOTION” below for details.
If share_ctx is not null, then the newly created context is added to the share group of share_ctx.
Some data, such as display lists, are shared among all contexts that belong to the same share group.
For details on what data is shared, see the specification for the relevant native platform: the GLX1.4Specification[1], the EGL1.4Specification[2], or the CGLReference[3].
waffle_context_destroy()
Destroy the context and release its memory.
waffle_context_get_native()
Get the context's underlying native objects. Use free(3) to deallocate the returned pointer. See
waffle_native(3) for the definition of unionwaffle_native_context.
Errors
See waffle_error(3) for the complete list of waffle's error codes.
No errors are specific to the waffle_context functions.
Issues
Please report bugs or and feature requests to https://gitlab.freedesktop.org/mesa/waffle/issues.
Name
waffle_context, waffle_context_create, waffle_context_destroy, waffle_context_get_native - class
waffle_context
Notes
1. GLX 1.4 Specification
http://www.opengl.org/registry/doc/glx1.4.pdf
2. EGL 1.4 Specification
http://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf
3. CGL Reference
https://developer.apple.com/library/mac/#documentation/graphicsimaging/reference/CGL_OpenGL/Reference/reference.html
waffle 08/09/2024 WAFFLE_CONTEXT(3)
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) waffle_config_choose(3)
Synopsis
#include<waffle.h>structwaffle_context;structwaffle_context*waffle_context_create(structwaffle_config*config,structwaffle_context*shared_ctx);boolwaffle_context_destroy(structwaffle_context*self);unionwaffle_native_context*waffle_context_get_native(structwaffle_context*self);
Version Promotion
The context's requested version and profile is given by the config attributes
WAFFLE_CONTEXT_MAJOR_VERSION, WAFFLE_CONTEXT_MINOR_VERSION, WAFFLE_CONTEXT_PROFILE. The context returned
by waffle_context_create may implement any version and profile that is backwards compatible with that
requested, as described below.
• If the chosen API is WAFFLE_OPENGL_ES1, WAFFLE_OPENGL_ES2, or WAFFLE_OPENGL_ES3, then the returned
context may implement any of:
* The requested version.
* Any later version, so long as no features have been from that later version.
• If the chosen API is WAFFLE_CONTEXT_OPENGL and version 3.0 or less is requested, then the returned
context may implement any of:
* Any version no less than that requested and no greater than 3.0.
* Version 3.1, if the GL_ARB_compatibility extension is also implemented.
* The compatibility profile of version 3.2 or greater.
• If the chosen API is WAFFLE_CONTEXT_OPENGL and version 3.1 is requested, then the returned context
may implement any of:
* Version 3.1, with or without the GL_ARB_compatibility extension.
* The core profile of version 3.2 or greater.
• If the chosen API is WAFFLE_CONTEXT_OPENGL and version 3.2 or greater is requested, then the returned
context may implement any of:
* The requested profile and version.
* The requested profile of any later version, so long as no features have been from that later
version and profile.
