• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3<!-- saved from url=(0013)about:internet -->
4<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" xmlns:xlink="http://www.w3.org/1999/xlink" pref:renderer="mathplayer-dl">
5  <head>
6    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7    <style xmlns="" type="text/css">
8    /* This style sets a margin around the entire page */
9        html, body {
10            margin: 10px;
11        }
12
13        p {
14            font: normal 16px verdana, sans-serif;
15            margin: 0;
16            padding-bottom:12px;
17        }
18
19        h1 {
20            font: bold 25px verdana, sans-serif;
21            margin-top: 0;
22            margin-bottom: 3px;
23            padding-top: 0;
24            padding-bottom: 0;
25        }
26
27        h2 {
28            font: bold 19px verdana, sans-serif;
29            margin-top: 28px;
30            margin-bottom: 3px;
31            padding-top: 0;
32            padding-bottom: 0;
33        }
34
35        h3 {
36            font: bold 19px verdana, sans-serif !important;
37            margin-top: 28px;
38            margin-bottom: 3px;
39            padding-top: 0;
40            padding-bottom: 0;
41        }
42
43        li {
44            font: normal 16px verdana, sans-serif;
45            margin-top: 0;
46            margin-bottom: 18px;
47            padding-top: 0;
48            padding-bottom: 0;
49        }
50
51        .pdparam {
52            font: italic 16px verdana, sans-serif;
53        }
54
55                .term {
56                        font: italic 16px verdana, sans-serif;
57                        font-weight: normal;
58                }
59
60                .type {
61                        font: normal 16px verdana, sans-serif !important;
62                }
63
64                .parameter {
65                        font-style: italic;
66                        }
67
68        a:link, a:visited {
69            color: blue;
70            text-decoration: none;
71            font: normal 16px;
72        }
73
74        a:hover {
75            background-color: #FFFF99;
76            font: normal 16px;
77        }
78
79        div.funcsynopsis {
80            text-align: left;
81            background-color: #e6e6e6;
82            font: normal 16px verdana, sans-serif;
83                        padding-top: 10px;
84                        padding-bottom: 10px;
85        }
86
87        div.funcsynopsis table {
88            border-collapse: separate;
89            font: normal 16px verdana, sans-serif;
90        }
91
92        div.funcsynopsis td {
93            background-color: #e6e6e6;
94            border: 0 solid #000;
95            padding: 1px;
96            font: normal 16px verdana, sans-serif;
97        }
98
99        div.refsect1 {
100            font-family: verdana, sans-serif;
101            font-size: 16px;
102        }
103
104        code.constant {
105            font: normal 16px courier new, monospace !important;
106        }
107
108                span.errorname {
109            font: normal 16px verdana, sans-serif !important;
110        }
111
112        code.function {
113            font: bold 16px verdana, sans-serif !important;
114        }
115
116        b.fsfunc {
117            font: bold 16px verdana, sans-serif !important;
118        }
119
120        code.varname {
121            font: italic 16px verdana, sans-serif;
122        }
123
124        code.replaceable {
125            font: italic 16px courier new, monospace;
126        }
127
128        code.funcdef {
129            font: normal 16px verdana, sans-serif !important;
130        }
131
132        .citerefentry {
133            font: normal 16px verdana, sans-serif !important;
134        }
135
136        .parameter {
137            font-style: italic;
138        }
139
140        code.fsfunc {
141            font: normal 16px verdana, sans-serif !important;
142        }
143
144        /* PARAMETER: This style controls spacing between the terms in Parameter section */
145        dt {
146            margin-top: 15px;
147        }
148
149        /* TABLES: These styles apply to all tables OTHER than the Synopsis and Example tables */
150        div.refsect1 table {
151            width: 100%;
152                        margin-top: 10px;
153            background-color: #FFF;
154                        border-collapse: collapse;
155                        border-color: #000;
156            border-width: 1px;
157                        font: normal 16px verdana, sans-serif;
158        }
159
160        div.refsect1 th {
161                        border-collapse: collapse;
162                        border-color: #000;
163            border-width: 1px;
164            font: bold 16px verdana, sans-serif;
165        }
166
167        div.refsect1 td {
168            background-color: #FFF;
169            padding: 5px;
170            vertical-align: text-top;
171                        border-collapse: collapse;
172                        border-color: #000;
173            border-width: 1px;
174            font: normal 16px verdana, sans-serif;
175        }
176
177                  div.refsect1 p{
178            font: normal 16px verdana, sans-serif;
179            margin-top: 8px;
180            margin-bottom: 8px;
181            padding-top: 0;
182            padding-bottom: 0;
183        }
184
185
186        /* EXAMPLE: These styles apply only to the Example section */
187        div.refsect2 {
188            font: normal 16px courier new, monospace !important;
189        }
190
191        div.refsect2 table {
192            margin-top: 0;
193            background-color: #e6e6e6;
194            width: 100%;
195            border: 0 solid #000;
196            padding: 2px;
197            font: normal 16px courier new, monospace !important;
198        }
199
200        div.refsect2 td {
201            background-color: #e6e6e6;
202            font: normal 16px courier new, monospace !important;
203                        white-space:pre;
204        }
205
206        /* COPYRIGHT: This style formats the text of the copyright statement at the bottom of the page */
207        div.refsect3 {
208            font: normal 11px verdana, sans-serif;
209            margin-top: 50px;
210            margin-bottom: 20px;
211            padding-top: 0;
212            padding-bottom: 0;
213        }
214
215</style>
216    <title>eglCreateWindowSurface</title>
217    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
218  </head>
219  <body>
220    <div class="refentry">
221      <a id="eglCreateWindowSurface"></a>
222      <div class="titlepage"></div>
223      <div xmlns="" class="refnamediv">
224        <h1>eglCreateWindowSurface</h1>
225        <p>
226            create a new <acronym xmlns="http://www.w3.org/1999/xhtml" class="acronym">EGL</acronym> window surface
227        </p>
228      </div>
229      <div class="refsynopsisdiv">
230        <h2>C Specification</h2>
231        <div class="funcsynopsis">
232          <table xmlns="" border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
233            <tr valign="bottom">
234              <td>
235                <code xmlns="http://www.w3.org/1999/xhtml" class="funcdef">EGLSurface <strong class="fsfunc">eglCreateWindowSurface</strong>(</code>
236                <td>EGLDisplay  <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">display</var>, </td>
237              </td>
238            </tr>
239            <tr valign="top">
240              <td> </td>
241              <td>EGLConfig  <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">config</var>, </td>
242            </tr>
243            <tr valign="top">
244              <td> </td>
245              <td>NativeWindowType  <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">native_window</var>, </td>
246            </tr>
247            <tr valign="top">
248              <td> </td>
249              <td>EGLint const *  <var xmlns="http://www.w3.org/1999/xhtml" class="pdparam">attrib_list</var><code>)</code></td>
250            </tr>
251          </table>
252        </div>
253      </div>
254      <div class="refsect1">
255        <a id="parameters"></a>
256        <h2>Parameters</h2>
257        <div class="variablelist">
258          <dl class="variablelist">
259            <dt>
260              <span class="term">
261                <em class="parameter">
262                  <code>display</code>
263                </em>
264              </span>
265            </dt>
266            <dd>
267              <p>Specifies the EGL display connection.</p>
268            </dd>
269            <dt>
270              <span class="term">
271                <em class="parameter">
272                  <code>config</code>
273                </em>
274              </span>
275            </dt>
276            <dd>
277              <p>Specifies the EGL frame buffer configuration that defines the
278                    frame buffer resource available to the surface.</p>
279            </dd>
280            <dt>
281              <span class="term">
282                <em class="parameter">
283                  <code>native_window</code>
284                </em>
285              </span>
286            </dt>
287            <dd>
288              <p>Specifies the native window.</p>
289            </dd>
290            <dt>
291              <span class="term">
292                <em class="parameter">
293                  <code>attrib_list</code>
294                </em>
295              </span>
296            </dt>
297            <dd>
298              <p>
299                    Specifies window surface attributes.
300                    May be <code class="constant">NULL</code> or empty
301                    (first attribute is <code class="constant">EGL_NONE</code>).
302                </p>
303            </dd>
304          </dl>
305        </div>
306      </div>
307      <div class="refsect1">
308        <a id="description"></a>
309        <h2>Description</h2>
310        <p>
311            <code class="function">eglCreateWindowSurface</code> creates an EGL
312            window surface and returns its handle. If
313            <code class="function">eglCreateWindowSurface</code> fails to create
314            a window surface, <code class="constant">EGL_NO_SURFACE</code> is
315            returned.
316        </p>
317        <p>
318            Surface attributes are specified as a list of
319            attribute-value pairs, terminated with
320            <code class="constant">EGL_NONE</code>. Accepted attributes
321            are:
322        </p>
323        <div class="variablelist">
324          <dl class="variablelist">
325            <dt>
326              <span class="term">
327                <code class="constant">EGL_RENDER_BUFFER</code>
328              </span>
329            </dt>
330            <dd>
331              <p>
332                    Specifies which buffer should be used for client API
333                    rendering to the window. If its value is
334                    <code class="constant">EGL_SINGLE_BUFFER</code>, then client
335                    APIs should render directly into the visible window.
336                    If its value is
337                    <code class="constant">EGL_BACK_BUFFER</code>, then client
338                    APIs should render into the back buffer. The default
339                    value of <code class="constant">EGL_RENDER_BUFFER</code> is
340                    <code class="constant">EGL_BACK_BUFFER</code>.
341                </p>
342              <p>
343                    Client APIs may not be able to respect the requested
344                    rendering buffer. To determine the actual buffer
345                    being rendered to by a context, call
346                    <a class="citerefentry" href="eglQueryContext.html"><span class="citerefentry"><span class="refentrytitle">eglQueryContext</span></span></a>.
347                </p>
348            </dd>
349            <dt>
350              <span class="term">
351                <code class="constant">EGL_VG_ALPHA_FORMAT</code>
352              </span>
353            </dt>
354            <dd>
355              <p>
356                    Specifies how alpha values are interpreted by OpenVG
357                    when rendering to the surface. If its value is
358                    <code class="constant">EGL_VG_ALPHA_FORMAT_NONPRE</code>,
359                    then alpha values are not premultipled. If its value
360                    is <code class="constant">EGL_VG_ALPHA_FORMAT_PRE</code>,
361                    then alpha values are premultiplied. The default
362                    value of <code class="constant">EGL_VG_ALPHA_FORMAT</code> is
363                    <code class="constant">EGL_VG_ALPHA_FORMAT_NONPRE</code>.
364                </p>
365            </dd>
366            <dt>
367              <span class="term">
368                <code class="constant">EGL_VG_COLORSPACE</code>
369              </span>
370            </dt>
371            <dd>
372              <p>
373                    Specifies the color space used by OpenVG when
374                    rendering to the surface. If its value is
375                    <code class="constant">EGL_VG_COLORSPACE_sRGB</code>, then a
376                    non-linear, perceptually uniform color space is
377                    assumed, with a corresponding
378                    <span class="type">VGImageFormat</span> of form
379                    <code class="constant">VG_s*</code>. If its value is
380                    <code class="constant">EGL_VG_COLORSPACE_LINEAR</code>, then
381                    a linear color space is assumed, with a
382                    corresponding <span class="type">VGImageFormat</span> of form
383                    <code class="constant">VG_l*</code>. The default value of
384                    <code class="constant">EGL_VG_COLORSPACE</code> is
385                    <code class="constant">EGL_VG_COLORSPACE_sRGB</code>.
386                </p>
387            </dd>
388          </dl>
389        </div>
390        <p>
391            Any EGL rendering context that was created with respect to
392            <em class="parameter"><code>config</code></em> can be used to render into the
393            surface. Use
394            <a class="citerefentry" href="eglMakeCurrent.html"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a>
395            to attach an EGL rendering context to the surface.
396        </p>
397        <p>
398            Use
399            <a class="citerefentry" href="eglQuerySurface.html"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a>
400            to retrieve the ID of <em class="parameter"><code>config</code></em>.
401        </p>
402        <p>
403            Use
404            <a class="citerefentry" href="eglDestroySurface.html"><span class="citerefentry"><span class="refentrytitle">eglDestroySurface</span></span></a>
405            to destroy the surface.
406        </p>
407      </div>
408      <div class="refsect1">
409        <a id="notes"></a>
410        <h2>Notes</h2>
411        <p>
412            Attributes <code class="constant">EGL_RENDER_BUFFER</code>,
413            <code class="constant">EGL_VG_ALPHA_FORMAT</code>, and
414            <code class="constant">EGL_VG_COLORSPACE</code>, and the
415            corresponding attribute values, are supported only if the
416            EGL version is 1.2 or greater.
417        </p>
418        <p>
419            The <code class="constant">EGL_VG_ALPHA_FORMAT</code> and
420            <code class="constant">EGL_VG_COLORSPACE</code> attributes are used
421            only by OpenVG. EGL itself, and other client APIs such as
422            OpenGL and OpenGL ES , do not distinguish multiple
423            colorspace models. Refer to section 11.2 of the OpenVG 1.0
424            specification for more information. The native window
425            system's use and interpretation of alpha values is outside
426            the scope of EGL, although the preferred behavior is for the
427            window system to ignore the value of
428            <code class="constant">EGL_VG_ALPHA_FORMAT</code> when compositing
429            window surfaces.
430        </p>
431      </div>
432      <div class="refsect1">
433        <a id="errors"></a>
434        <h2>Errors</h2>
435        <p>
436            <code class="constant">EGL_NO_SURFACE</code> is returned if creation of
437            the context fails.
438        </p>
439        <p>
440            <code class="constant">EGL_BAD_DISPLAY</code> is generated if
441            <em class="parameter"><code>display</code></em> is not an EGL display connection.
442        </p>
443        <p>
444            <code class="constant">EGL_NOT_INITIALIZED</code> is generated if
445            <em class="parameter"><code>display</code></em> has not been initialized.
446        </p>
447        <p>
448            <code class="constant">EGL_BAD_CONFIG</code> is generated if
449            <em class="parameter"><code>config</code></em> is not an EGL frame buffer configuration.
450        </p>
451        <p>
452            <code class="constant">EGL_BAD_NATIVE_WINDOW</code> may be generated if
453            <em class="parameter"><code>native_window</code></em> is not a valid native window.
454        </p>
455        <p>
456            <code class="constant">EGL_BAD_ATTRIBUTE</code> is generated if
457            <em class="parameter"><code>attrib_list</code></em> contains an invalid window attribute
458            or if an attribute value is not recognized or is out of range.
459        </p>
460        <p>
461            <code class="constant">EGL_BAD_ALLOC</code> is generated if there are not
462            enough resources to allocate the new surface.
463        </p>
464        <p>
465            <code class="constant">EGL_BAD_MATCH</code> is generated if the attributes of
466            <em class="parameter"><code>native_window</code></em> do not correspond to
467            <em class="parameter"><code>config</code></em> or if
468            <em class="parameter"><code>config</code></em> does not support rendering to windows
469            (the <code class="constant">EGL_SURFACE_TYPE</code> attribute does not contain
470            <code class="constant">EGL_WINDOW_BIT</code>).
471        </p>
472        <p>
473            <code class="constant">EGL_BAD_MATCH</code> is generated if
474            <em class="parameter"><code>config</code></em> does not support the specified
475            OpenVG alpha format attribute (the value of
476            <code class="constant">EGL_VG_ALPHA_FORMAT</code> is
477            <code class="constant">EGL_VG_ALPHA_FORMAT_PRE</code> and the
478            <code class="constant">EGL_VG_ALPHA_FORMAT_PRE_BIT</code> is not set
479            in the <code class="constant">EGL_SURFACE_TYPE</code> attribute of
480            <em class="parameter"><code>config</code></em>) or colorspace attribute (the
481            value of <code class="constant">EGL_VG_COLORSPACE</code> is
482            <code class="constant">EGL_VG_COLORSPACE_LINEAR</code> and the
483            <code class="constant">EGL_VG_COLORSPACE_LINEAR_IT</code> is not set
484            in the <code class="constant">EGL_SURFACE_TYPE</code> attribute of
485            <em class="parameter"><code>config</code></em>).
486        </p>
487      </div>
488      <div class="refsect1">
489        <a id="seealso"></a>
490        <h2>See Also</h2>
491        <p>
492            <a class="citerefentry" href="eglDestroySurface.html"><span class="citerefentry"><span class="refentrytitle">eglDestroySurface</span></span></a>,
493            <a class="citerefentry" href="eglChooseConfig.html"><span class="citerefentry"><span class="refentrytitle">eglChooseConfig</span></span></a>,
494            <a class="citerefentry" href="eglGetConfigs.html"><span class="citerefentry"><span class="refentrytitle">eglGetConfigs</span></span></a>,
495            <a class="citerefentry" href="eglMakeCurrent.html"><span class="citerefentry"><span class="refentrytitle">eglMakeCurrent</span></span></a>,
496            <a class="citerefentry" href="eglQuerySurface.html"><span class="citerefentry"><span class="refentrytitle">eglQuerySurface</span></span></a>
497        </p>
498      </div>
499      <div xmlns="" class="refsect3" lang="en" xml:lang="en"><a xmlns="http://www.w3.org/1999/xhtml" id="Copyright"></a><h4 xmlns="http://www.w3.org/1999/xhtml"></h4><img xmlns="http://www.w3.org/1999/xhtml" src="KhronosLogo.jpg" /><p xmlns="http://www.w3.org/1999/xhtml"></p>
500Copyright © 2003-2014 The Khronos Group Inc.
501Permission is hereby granted, free of charge, to any person obtaining a
502copy of this software and/or associated documentation files (the
503"Materials"), to deal in the Materials without restriction, including
504without limitation the rights to use, copy, modify, merge, publish,
505distribute, sublicense, and/or sell copies of the Materials, and to
506permit persons to whom the Materials are furnished to do so, subject to
507the condition that this copyright notice and permission notice shall be included
508in all copies or substantial portions of the Materials.
509</div>
510    </div>
511  </body>
512</html>
513