diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2010-02-05 12:44:45 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2010-02-05 12:48:49 +0800 |
commit | 1b2b08c5f3a5941151a2f4a8c5da7f214ee979e4 (patch) | |
tree | d9b9e927c6ac367bbb2a7740e72e5b05244ea809 | |
parent | 5f08eff2a769e27df37fc00e46797e70a54727bb (diff) |
docs: Update the developer section of egl.html.
Mainly to add a subsection about EGL_RENDER_BUFFER.
-rw-r--r-- | docs/egl.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/egl.html b/docs/egl.html index cdfae044a8..9eba402411 100644 --- a/docs/egl.html +++ b/docs/egl.html @@ -267,6 +267,41 @@ uninitialized display.</p> resources. The drivers are responsible to the correct behavior as defined by EGL.</p> +<h3><code>EGL_RENDER_BUFFER</code></h3> + +<p>In EGL, the color buffer a context should try to render to is decided by the +binding surface. It should try to render to the front buffer if the binding +surface has <code>EGL_RENDER_BUFFER</code> set to +<code>EGL_SINGLE_BUFFER</code>; If the same context is later bound to a +surface with <code>EGL_RENDER_BUFFER</code> set to +<code>EGL_BACK_BUFFER</code>, the context should try to render to the back +buffer. However, the context is allowed to make the final decision as to which +color buffer it wants to or is able to render to.</p> + +<p>For pbuffer surfaces, the render buffer is always +<code>EGL_BACK_BUFFER</code>. And for pixmap surfaces, the render buffer is +always <code>EGL_SINGLE_BUFFER</code>. Unlike window surfaces, EGL spec +requires their <code>EGL_RENDER_BUFFER</code> values to be honored. As a +result, a driver should never set <code>EGL_PIXMAP_BIT</code> or +<code>EGL_PBUFFER_BIT</code> bits of a config if the contexts created with the +config won't be able to honor the <code>EGL_RENDER_BUFFER</code> of pixmap or +pbuffer surfaces.</p> + +<p>It should also be noted that pixmap and pbuffer surfaces are assumed to be +single-buffered, in that <code>eglSwapBuffers</code> has no effect on them. It +is desirable that a driver allocates a private color buffer for each pbuffer +surface created. If the window system the driver supports has native pbuffers, +or if the native pixmaps have more than one color buffers, the driver should +carefully attach the native color buffers to the EGL surfaces, re-route them if +required.</p> + +<p>There is no defined behavior as to, for example, how +<code>glDrawBuffer</code> interacts with <code>EGL_RENDER_BUFFER</code>. Right +now, it is desired that the draw buffer in a client API be fixed for pixmap and +pbuffer surfaces. Therefore, the driver is responsible to guarantee that the +client API renders to the specified render buffer for pixmap and pbuffer +surfaces.</p> + <h3>TODOs</h3> <ul> |