7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-DC8BFEF5-DA50-52DA-8CE2-5729A4A005F6" xml:lang="en"><title>EGL |
12 <concept id="GUID-DC8BFEF5-DA50-52DA-8CE2-5729A4A005F6" xml:lang="en"><title>EGL Collection |
13 Collection Overview</title><shortdesc>EGL is an interface between EGL client APIs (such as OpenGL ES |
13 Overview</title><shortdesc>EGL is an interface between EGL client APIs (such as OpenGL ES |
14 and OpenVG) and an underlying native platform window system. EGL is independent |
14 and OpenVG) and an underlying native platform window system. EGL is independent |
15 of definitions and concepts specific to any native window system or rendering |
15 of definitions and concepts specific to any native window system or rendering |
16 API. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
16 API. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
17 <p>EGL is an open standard developed by the Khronos Group, which is a member-funded |
17 <p>EGL is an open standard developed by the Khronos Group, which is a member-funded |
18 industry consortium. Khronos creates open standard, royalty-free APIs to help |
18 industry consortium. Khronos creates open standard, royalty-free APIs to help |
19 write and execute dynamic media on a wide variety of platforms and devices. |
19 write and execute dynamic media on a wide variety of platforms and devices. |
20 For more information about EGL operations, functions, errors, versions and |
20 For more information about EGL operations, functions, errors, versions and |
21 header files, see <xref href="http://www.khronos.org/egl/" scope="external">http://www.khronos.org/egl/</xref>. </p> |
21 header files, see <xref href="http://www.khronos.org/egl/" scope="external">http://www.khronos.org/egl/</xref>. </p> |
22 <p>In this documentation the term <b>EGL client API</b> is used to mean a |
22 <p>In this documentation the term <b>EGL client API</b> is used to mean a |
23 rendering API, such as OpenGL ES or OpenVG, that is a client of EGL. </p> |
23 rendering API, such as OpenGL ES or OpenVG, that is a client of EGL. </p> |
24 <section id="GUID-D214F4FF-FB17-4427-A301-B4ADE03DE261"><title>Introduction to EGL on the Symbian platform</title> <p>EGL |
24 <section id="GUID-D214F4FF-FB17-4427-A301-B4ADE03DE261"><title>Introduction |
25 provides: </p> <ul> |
25 to EGL on the Symbian platform</title> <p>EGL provides: </p> <ul> |
26 <li id="GUID-DEBBBE4F-8B61-58EF-A4FE-CFC3C63B0223"><p>Mechanisms that create |
26 <li id="GUID-DEBBBE4F-8B61-58EF-A4FE-CFC3C63B0223"><p>Mechanisms that create |
27 rendering surfaces onto which EGL client APIs can draw and which they can |
27 rendering surfaces onto which EGL client APIs can draw and which they can |
28 share. </p> </li> |
28 share. </p> </li> |
29 <li id="GUID-1D0D4366-D8B7-50B1-9D5B-1C7BFAC11C94"><p>Methods that create |
29 <li id="GUID-1D0D4366-D8B7-50B1-9D5B-1C7BFAC11C94"><p>Methods that create |
30 and manage graphics contexts for EGL client APIs. </p> </li> |
30 and manage graphics contexts for EGL client APIs. </p> </li> |
64 and <codeph>eglWaitNative</codeph>, as well as synchronization commands present |
64 and <codeph>eglWaitNative</codeph>, as well as synchronization commands present |
65 in the Symbian APIs. The EGL client API and Symbian API rendering can be done |
65 in the Symbian APIs. The EGL client API and Symbian API rendering can be done |
66 in parallel if the client does not prevent it with explicit synchronization |
66 in parallel if the client does not prevent it with explicit synchronization |
67 calls. Some performance degradation may be experienced when there is unnecessary |
67 calls. Some performance degradation may be experienced when there is unnecessary |
68 switching between EGL client APIs and Symbian API rendering. </p> </section> |
68 switching between EGL client APIs and Symbian API rendering. </p> </section> |
69 <section id="GUID-483A8427-D740-477D-9357-957C755E053D"><title>Architectural relationships</title> <p>The following diagram |
69 <section id="GUID-483A8427-D740-477D-9357-957C755E053D"><title>Architectural |
70 shows the key EGL relationships and dependencies within the Symbian platform. |
70 relationships</title> <p>The following diagram shows the key EGL relationships |
71 On the Symbian platform, OpenGL ES, OpenVG and EGL all have a component (shown |
71 and dependencies within the Symbian platform. On the Symbian platform, OpenGL |
72 in blue) that declares the interface, and all require an implementation that |
72 ES, OpenVG and EGL all have a component (shown in blue) that declares the |
73 implements that interface (shown in green). </p> <fig id="GUID-BF9F0E84-F1DA-5D9D-9D4B-14AA55C7DA07"> |
73 interface, and all require an implementation that implements that interface |
|
74 (shown in green). </p> <fig id="GUID-BF9F0E84-F1DA-5D9D-9D4B-14AA55C7DA07"> |
74 <title> Key EGL relationships and dependencies </title> |
75 <title> Key EGL relationships and dependencies </title> |
75 <image href="GUID-CBF1D046-92D4-5936-9946-71BB8FC51AB2_d0e210493_href.png" placement="inline"/> |
76 <image href="GUID-CBF1D046-92D4-5936-9946-71BB8FC51AB2_d0e205483_href.png" placement="inline"/> |
76 </fig> <p>The <xref href="GUID-D252E75C-C8CA-5C51-8DA3-95B937A1295C.dita">EGL Interface |
77 </fig> <p>The <xref href="GUID-D252E75C-C8CA-5C51-8DA3-95B937A1295C.dita">EGL Interface |
77 component</xref> provides a consistent interface to EGL on the Symbian platform, |
78 component</xref> provides a consistent interface to EGL on the Symbian platform, |
78 enabling cross-device compatibility. The component includes the Khronos-released |
79 enabling cross-device compatibility. The component includes the Khronos-released |
79 header files (which incorporate some minor changes, such as to the comments). |
80 header files (which incorporate some minor changes, such as to the comments). |
80 It also provides some Symbian-specific header files and some other files (such |
81 It also provides some Symbian-specific header files and some other files (such |
81 as LIB, DEF and MMP files) and UIDs. It does not provide any implementations |
82 as LIB, DEF and MMP files) and UIDs. It does not provide any implementations |
82 of the APIs. </p> <p>The EGL Interface component includes the header files |
83 of the APIs. </p> <p>Symbian^3 introduces <xref href="GUID-D93978BE-11A3-5CE3-B110-1DEAA5AD566C.dita">ScreenPlay</xref>, |
83 for EGL 1.2, 1.3 and 1.4 (which is used by default). The main advantage of |
84 the new graphics architecture. This has a composition engine, which enables |
84 EGL 1.4 over previous versions is the introduction of a <b>preserve buffer</b> flag. |
85 composition surfaces to be arranged in layers and to be composed together |
85 When supported by the implementation, an EGL window surface can have its color |
86 to produce the final output on the display. All native Symbian drawing (such |
86 buffer preserved from one frame to the next. This means that the client does |
87 as the application UI) is rendered to a special composition surface called |
87 not need to send the entire drawing instructions for each frame. Instead the |
88 the UI surface, which is the topmost layer and can be semi-transparent. </p> <p>In |
88 client can simply send the drawing operations for what changes in each frame |
89 a ScreenPlay environment, EGL window surfaces are implemented as composition |
89 compared to the previous one. This can reduce the memory footprint and the |
90 surfaces. This means that it is possible to use the native Symbian drawing |
90 CPU overhead when an EGL client API renders successive frames. </p> </section> |
91 APIs (<codeph>CWindowGc</codeph>) to create semi-transparent UI content over |
|
92 the EGL window surface onto which the OpenVG and OpenGL ES content is rendered. |
|
93 See the <xref href="GUID-53707903-9A88-409B-80F8-FDF7EF47ACBF.dita">Coverflow; |
|
94 using ScreenPlay</xref> application for an example of this.</p> <p>In the |
|
95 non-ScreenPlay environment, it is not possible to use the native Symbian APIs |
|
96 to create semi-transparent UI content over the EGL window surface. A different |
|
97 solution must therefore be used; for example, using Khronos rendering APIs |
|
98 to create the UI content and direct it onto the EGL window surface or using |
|
99 the Symbian APIs to create opaque child windows.</p> <p>The EGL Interface |
|
100 component includes the header files for EGL 1.2, 1.3 and 1.4 (which is used |
|
101 by default). The main advantage of EGL 1.4 over previous versions is the introduction |
|
102 of a <b>preserve buffer</b> flag. When supported by the implementation, an |
|
103 EGL window surface can have its color buffer preserved from one frame to the |
|
104 next. This means that the client does not need to send the entire drawing |
|
105 instructions for each frame. Instead the client can simply send the drawing |
|
106 operations for what changes in each frame compared to the previous one. This |
|
107 can reduce the memory footprint and the CPU overhead when an EGL client API |
|
108 renders successive frames. </p> </section> |
91 </conbody><related-links> |
109 </conbody><related-links> |
92 <link href="GUID-8C6D4350-A38D-57A1-8C8D-C777EA7E8A3E.dita"><linktext>EGL |
110 <link href="GUID-8C6D4350-A38D-57A1-8C8D-C777EA7E8A3E.dita"><linktext>EGL |
93 Collection</linktext></link> |
111 Collection</linktext></link> |
94 <link href="GUID-1B1C6D35-FFDF-55B3-BCE2-DD0295858E49.dita"><linktext>OpenVG Collection</linktext> |
112 <link href="GUID-1B1C6D35-FFDF-55B3-BCE2-DD0295858E49.dita"><linktext>OpenVG Collection</linktext> |
95 </link> |
113 </link> |
96 <link href="GUID-AB93B01C-B6C2-5B24-ADEF-95706584D625.dita"><linktext>OpenGLES |
114 <link href="GUID-AB93B01C-B6C2-5B24-ADEF-95706584D625.dita"><linktext>OpenGLES |
97 Collection</linktext></link> |
115 Collection</linktext></link> |
|
116 <link href="GUID-859CAA08-59C9-5FD3-98DE-6BDD0D6ED50B.dita"><linktext>Graphics |
|
117 Composition</linktext></link> |
98 </related-links></concept> |
118 </related-links></concept> |