From d8299af4ab6fe4b334292e3b6e69e4331c05d86f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 11 Jan 2010 18:25:03 +0800 Subject: docs: Add documentation for OpenGL ES. Signed-off-by: Chia-I Wu --- docs/opengles.html | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 docs/opengles.html (limited to 'docs/opengles.html') diff --git a/docs/opengles.html b/docs/opengles.html new file mode 100644 index 0000000000..d460bccf6c --- /dev/null +++ b/docs/opengles.html @@ -0,0 +1,78 @@ + + +OpenGL ES State Trackers + + + + + +

OpenGL ES State Trackers

+ +

The current version of the OpenGL ES state trackers implement OpenGL ES 1.1 and OpenGL ES 2.0. +More informations about OpenGL ES can be found at +http://www.khronos.org/opengles/.

+ +

The OpenGL ES state trackers depends on the Gallium architecture and a +working EGL implementation.

+ + +

Build the Libraries

+
    +
  1. Run configure with --with-state-trackers=egl_g3d,es and enable the Gallium driver for your hardware.
  2. +
  3. Build and install Mesa as usual.
  4. +
+ +

It will install libGLESv1_CM, libGLESv2, libEGL, and one or more EGL drivers for your hardware.

+

Run the Demos

+ +

There are some demos in progs/es1/ and progs/es2/. You can use them to test your build. For example,

+ +
+  $ export EGL_DRIVER=/usr/local/lib/dri/egl_x11_i915.so # specify the EGL driver
+  $ cd progs/es1/xegl
+  $ make
+  $ ./torus
+
+ +

Developers

+ +

The core of OpenGL ES state trackers is the ES overlay. It is located in +src/mesa/es/.

+ +

Structure

+ +

The ES overlay uses as much code as possible from Mesa. It has its own glapi XMLs to describe the APIs of OpenGL ES. The ES overlay can be built parallelly with Mesa, and they will give

+ + + + + + + + + +
Library NameUsageSource
libmesagallium.aOpenGL state trackerMesa
libes1gallium.aOpenGL ES 1.x state trackerES overlay
libes2gallium.aOpenGL ES 2.x state trackerES overlay
libglapi.aOpenGL APIMesa
libes1api.aOpenGL ES 1.x APIES overlay
libes2api.aOpenGL ES 2.x APIES overlay
+ +

The OpenGL ES state trackers and APIs are then used by src/gallium/state_trackers/es/ to create the final libraries.

+ +

Dispatch Table

+ +

The ES overlay uses an additional indirection when dispatching fucntions

+ +
+  Mesa:       glFoo() --> _mesa_Foo()
+  ES overlay: glFoo() --> _es_Foo() --> _mesa_Foo()
+
+ +

The indirection serves several purposes

+ + + +

Other than the last case, the ES overlay uses APIspec.xml to generate functions to check and/or converts the arguments.

+ + + -- cgit v1.2.3