<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="Source to the Rust file `C:\Users\Chrilieb\.cargo\registry\src\github.com-1ecc6299db9ec823\cl-sys-0.3.0\src\cl_gl_ext_h.rs`.">
<meta name="keywords" content="rust, rustlang, rust-lang">
<title>cl_gl_ext_h.rs.html -- source</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc source">
<nav class="sidebar">
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10"> 10</span>
<span id="11"> 11</span>
<span id="12"> 12</span>
<span id="13"> 13</span>
<span id="14"> 14</span>
<span id="15"> 15</span>
<span id="16"> 16</span>
<span id="17"> 17</span>
<span id="18"> 18</span>
<span id="19"> 19</span>
<span id="20"> 20</span>
<span id="21"> 21</span>
<span id="22"> 22</span>
<span id="23"> 23</span>
<span id="24"> 24</span>
<span id="25"> 25</span>
<span id="26"> 26</span>
<span id="27"> 27</span>
<span id="28"> 28</span>
<span id="29"> 29</span>
<span id="30"> 30</span>
<span id="31"> 31</span>
<span id="32"> 32</span>
<span id="33"> 33</span>
<span id="34"> 34</span>
<span id="35"> 35</span>
<span id="36"> 36</span>
<span id="37"> 37</span>
<span id="38"> 38</span>
<span id="39"> 39</span>
<span id="40"> 40</span>
<span id="41"> 41</span>
<span id="42"> 42</span>
<span id="43"> 43</span>
<span id="44"> 44</span>
<span id="45"> 45</span>
<span id="46"> 46</span>
<span id="47"> 47</span>
<span id="48"> 48</span>
<span id="49"> 49</span>
<span id="50"> 50</span>
<span id="51"> 51</span>
<span id="52"> 52</span>
<span id="53"> 53</span>
<span id="54"> 54</span>
<span id="55"> 55</span>
<span id="56"> 56</span>
<span id="57"> 57</span>
<span id="58"> 58</span>
<span id="59"> 59</span>
<span id="60"> 60</span>
<span id="61"> 61</span>
<span id="62"> 62</span>
<span id="63"> 63</span>
<span id="64"> 64</span>
<span id="65"> 65</span>
<span id="66"> 66</span>
<span id="67"> 67</span>
<span id="68"> 68</span>
<span id="69"> 69</span>
<span id="70"> 70</span>
<span id="71"> 71</span>
<span id="72"> 72</span>
<span id="73"> 73</span>
<span id="74"> 74</span>
<span id="75"> 75</span>
<span id="76"> 76</span>
<span id="77"> 77</span>
<span id="78"> 78</span>
<span id="79"> 79</span>
<span id="80"> 80</span>
<span id="81"> 81</span>
<span id="82"> 82</span>
<span id="83"> 83</span>
<span id="84"> 84</span>
<span id="85"> 85</span>
<span id="86"> 86</span>
<span id="87"> 87</span>
<span id="88"> 88</span>
<span id="89"> 89</span>
<span id="90"> 90</span>
<span id="91"> 91</span>
<span id="92"> 92</span>
<span id="93"> 93</span>
<span id="94"> 94</span>
<span id="95"> 95</span>
<span id="96"> 96</span>
<span id="97"> 97</span>
<span id="98"> 98</span>
<span id="99"> 99</span>
<span id="100">100</span>
<span id="101">101</span>
<span id="102">102</span>
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
<span id="117">117</span>
<span id="118">118</span>
<span id="119">119</span>
<span id="120">120</span>
<span id="121">121</span>
<span id="122">122</span>
<span id="123">123</span>
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
</pre><pre class="rust ">
<span class="doccomment">//! CGL (Apple) stuff.</span>
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">cl_h</span>::<span class="ident">cl_context_properties</span>;
<span class="comment">// Introduced in Mac OS X 10.6</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE</span>: <span class="ident">cl_context_properties</span> <span class="op">=</span> <span class="number">0x10000000</span>;
<span class="comment">// /*******************************************************************************</span>
<span class="comment">// * Copyright (c) 2008 - 2012 The Khronos Group Inc.</span>
<span class="comment">// *</span>
<span class="comment">// * Permission is hereby granted, free of charge, to any person obtaining a</span>
<span class="comment">// * copy of this software and/or associated documentation files (the</span>
<span class="comment">// * "Materials"), to deal in the Materials without restriction, including</span>
<span class="comment">// * without limitation the rights to use, copy, modify, merge, publish,</span>
<span class="comment">// * distribute, sublicense, and/or sell copies of the Materials, and to</span>
<span class="comment">// * permit persons to whom the Materials are furnished to do so, subject to</span>
<span class="comment">// * the following conditions:</span>
<span class="comment">// *</span>
<span class="comment">// * The above copyright notice and this permission notice shall be included</span>
<span class="comment">// * in all copies or substantial portions of the Materials.</span>
<span class="comment">// *</span>
<span class="comment">// * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span>
<span class="comment">// * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
<span class="comment">// * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</span>
<span class="comment">// * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY</span>
<span class="comment">// * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,</span>
<span class="comment">// * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE</span>
<span class="comment">// * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.</span>
<span class="comment">// ******************************************************************************/</span>
<span class="comment">//</span>
<span class="comment">// #ifndef __OPENCL_CL_GL_EXT_H</span>
<span class="comment">// #define __OPENCL_CL_GL_EXT_H</span>
<span class="comment">//</span>
<span class="comment">// #ifdef __cplusplus</span>
<span class="comment">// extern "C" {</span>
<span class="comment">// #endif</span>
<span class="comment">//</span>
<span class="comment">// #include <OpenCL/cl_gl.h></span>
<span class="comment">//</span>
<span class="comment">// #include <OpenGL/CGLTypes.h></span>
<span class="comment">// #include <OpenGL/CGLDevice.h></span>
<span class="comment">//</span>
<span class="comment">// #ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER</span>
<span class="comment">// #include <IOSurface/IOSurface.h></span>
<span class="comment">// #endif</span>
<span class="comment">//</span>
<span class="comment">// /* Context GL sharing</span>
<span class="comment">// *</span>
<span class="comment">// * Please check for the "cl_APPLE_gl_sharing" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)</span>
<span class="comment">// * before using these extensions.</span>
<span class="comment">//</span>
<span class="comment">// * Apple extension for creating a CL context from a CGL share group</span>
<span class="comment">// *</span>
<span class="comment">// * This enumerated value can be specified as part of the <properties> argument passed to clCreateContext</span>
<span class="comment">// * to allow OpenCL compliant devices in an existing CGL share group to be used as the devices in</span>
<span class="comment">// * the newly created CL context. GL objects that were allocated in the given CGL share group can</span>
<span class="comment">// * now be shared between CL and GL.</span>
<span class="comment">// *</span>
<span class="comment">// * If the <num_devices> and <devices> argument values to clCreateContext are 0 and NULL respectively,</span>
<span class="comment">// * all CL compliant devices in the CGL share group will be used to create the context.</span>
<span class="comment">// * Additional CL devices can also be specified using the <num_devices> and <devices> arguments.</span>
<span class="comment">// * These, however, cannot be GPU devices. On Mac OS X, you can add the CPU to the list of CL devices</span>
<span class="comment">// * (in addition to the CL compliant devices in the CGL share group) used to create the CL context.</span>
<span class="comment">// * Note that if a CPU device is specified, the CGL share group must also include the GL float renderer;</span>
<span class="comment">// * Otherwise CL_INVALID_DEVICE will be returned.</span>
<span class="comment">// *</span>
<span class="comment">// * NOTE: Make sure that appropriate cl_gl.h header file is included separately</span>
<span class="comment">// */</span>
<span class="comment">// #define CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE 0x10000000 /* Introduced in Mac OS X 10.6 */</span>
<span class="comment">//</span>
<span class="comment">// /* Apple extension for retrieving OpenGL context information for a CL context</span>
<span class="comment">// * created via the above method.</span>
<span class="comment">// *</span>
<span class="comment">// * Provides a query mechanism to retrieve OpenGL context specific information</span>
<span class="comment">// * from an OpenCL context to help identify device specific mappings and usage.</span>
<span class="comment">// *</span>
<span class="comment">// * For example, one possible usage would be to allow the client to map a CGL</span>
<span class="comment">// * virtual screen index to an appropriate CL device id to insure that the</span>
<span class="comment">// * rendering device and the compute device are the same, thus guaranteeing</span>
<span class="comment">// * any shared OpenGL memory that is attached o a CL memory object remains</span>
<span class="comment">// * resident on the active device.</span>
<span class="comment">// */</span>
<span class="comment">//</span>
<span class="comment">// cl_int clGetGLContextInfoAPPLE ( cl_context __nonnull /* context */,</span>
<span class="comment">// void * __nonnull /* platform_gl_ctx */,</span>
<span class="comment">// cl_gl_platform_info /* param_name */,</span>
<span class="comment">// size_t /* param_value_size */,</span>
<span class="comment">// void * __nullable /* param_value */,</span>
<span class="comment">// size_t * __nullable /* param_value_size_ret */) CL_EXT_SUFFIX__VERSION_1_0;</span>
<span class="comment">//</span>
<span class="comment">// /* The list of supported param_name values and the information returned in param_value by</span>
<span class="comment">// * clGetContextInfo are listed below:</span>
<span class="comment">//</span>
<span class="comment">// * Returns a cl_device_id for the CL device associated with the virtual screen for</span>
<span class="comment">// * the given CGL context. Return type: cl_device_id</span>
<span class="comment">// */</span>
<span class="comment">// #define CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE 0x10000002 /* Introduced in Mac OS X 10.6 */</span>
<span class="comment">//</span>
<span class="comment">// /* Returns an array of cl_device_ids for the CL device(s) corresponding to</span>
<span class="comment">// * the virtual screen(s) for the given CGL context. Return type: cl_device_id[]</span>
<span class="comment">// */</span>
<span class="comment">// #define CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE 0x10000003 /* Introduced in Mac OS X 10.6 */</span>
<span class="comment">//</span>
<span class="comment">// /* Error code returned by clGetGLContextInfoAPPLE if an invalid platform_gl_ctx is provided */</span>
<span class="comment">// #define CL_INVALID_GL_CONTEXT_APPLE -1000 /* Introduced in Mac OS X 10.6 */</span>
<span class="comment">//</span>
<span class="comment">// /*</span>
<span class="comment">// * cl_khr_gl_event extension</span>
<span class="comment">// * See section 9.9 in the OpenCL 1.1 spec for more information</span>
<span class="comment">// */</span>
<span class="comment">// #define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D</span>
<span class="comment">//</span>
<span class="comment">// extern CL_API_ENTRY cl_event __nullable CL_API_CALL</span>
<span class="comment">// clCreateEventFromGLsyncKHR(cl_context __nonnull /* context */,</span>
<span class="comment">// cl_GLsync __nonnull /* cl_GLsync */,</span>
<span class="comment">// cl_int * __nullable /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;</span>
<span class="comment">//</span>
<span class="comment">// #ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER</span>
<span class="comment">// typedef struct __IOSurface* IOSurfaceRef;</span>
<span class="comment">// #endif</span>
<span class="comment">//</span>
<span class="comment">// cl_mem __nullable clCreateImageFromIOSurface2DAPPLE(cl_context __nonnull /* context */,</span>
<span class="comment">// cl_mem_flags /* flags */,</span>
<span class="comment">// const cl_image_format * __nonnull /* image_format */,</span>
<span class="comment">// size_t /* image_width */,</span>
<span class="comment">// size_t /* image_height */,</span>
<span class="comment">// IOSurfaceRef __nonnull/* iosurface */,</span>
<span class="comment">// cl_int * __nullable /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;</span>
<span class="comment">//</span>
<span class="comment">// typedef intptr_t cl_iosurface_properties_APPLE;</span>
<span class="comment">//</span>
<span class="comment">// /* Specifies the IOSurfaceRef used to create the cl_mem image object. */</span>
<span class="comment">// #define CL_IOSURFACE_REF_APPLE 0x10000019 /* Introduced in Mac OS X 10.9 */</span>
<span class="comment">//</span>
<span class="comment">// /* Specifies the plane of the IOSurface that the cl_mem should be bound. Default 0 */</span>
<span class="comment">// #define CL_IOSURFACE_PLANE_APPLE 0x1000001a /* Introduced in Mac OS X 10.9 */</span>
<span class="comment">//</span>
<span class="comment">// /*</span>
<span class="comment">// * Create a 2D CL image from an IOSurface given a format, optional description, and property list. If</span>
<span class="comment">// * the image_desc argument is NULL, the width and height of the IOSurfaceRef will be used.</span>
<span class="comment">// */</span>
<span class="comment">// cl_mem __nullable clCreateImageFromIOSurfaceWithPropertiesAPPLE(cl_context __nonnull /* context */,</span>
<span class="comment">// cl_mem_flags /* flags */,</span>
<span class="comment">// const cl_image_format * __nonnull /* image_format */,</span>
<span class="comment">// const cl_image_desc * __nonnull /* image_desc */,</span>
<span class="comment">// cl_iosurface_properties_APPLE * __nonnull /* properties */,</span>
<span class="comment">// cl_int * __nullable /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2;</span>
<span class="comment">//</span>
<span class="comment">// /* Query parameter name for clGetImageInfo that returns the IOSurface backing the image (IOSurfaceRef) */</span>
<span class="comment">// #define CL_IMAGE_IOSURFACE_APPLE 0x1000001b /* Introduced in Mac OS X 10.9 */</span>
<span class="comment">//</span>
<span class="comment">// /* Query parameter name for clGetImageInfo that returns the plane of the IOSurface backing the image (cl_uint) */</span>
<span class="comment">// #define CL_IMAGE_IOSURFACE_PLANE_APPLE 0x1000001c /* Introduced in Mac OS X 10.9 */</span>
<span class="comment">//</span>
<span class="comment">// #ifdef __cplusplus</span>
<span class="comment">// }</span>
<span class="comment">// #endif</span>
<span class="comment">//</span>
<span class="comment">// #endif /* __OPENCL_CL_GL_EXT_H */</span>
</pre>
</section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
<dt>+</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "cl_sys";
</script>
<script src="../../jquery.js"></script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>