X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fopengles.html;h=926482a5284fd156cc81988b594ecd53d19670e5;hb=e0ee790ba7deb54cd4c0216f0f72798fc64747d5;hp=fc41e6771c132c14835f92774d5246f88f5cc6af;hpb=a8238bb08a95e7ea4430450c304a6bee210df1a6;p=mesa.git diff --git a/docs/opengles.html b/docs/opengles.html index fc41e6771c1..926482a5284 100644 --- a/docs/opengles.html +++ b/docs/opengles.html @@ -1,68 +1,58 @@ - - -OpenGL ES State Trackers - - - + + + + + OpenGL ES + + -

OpenGL ES State Trackers

+
+ The Mesa 3D Graphics Library +
+ + +
-

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/.

+

OpenGL ES

-

The OpenGL ES state trackers depends on the Gallium architecture and a -working EGL implementation. Please refer to Mesa EGL -for more information about EGL.

+

Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More information about +OpenGL ES can be found at +https://www.khronos.org/opengles/.

+

OpenGL ES depends on a working EGL implementation. Please refer to +Mesa EGL for more information about EGL.

Build the Libraries

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

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,

- -
-  $ cd progs/es1/xegl
-  $ make
-  $ ./torus
-
- -

Developers

+Alternatively, if XCB-DRI2 is installed on the system, one can use +egl_dri2 EGL driver with OpenGL|ES-enabled DRI drivers -

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

+
    +
  1. Run meson configure with -D gles1=true -D gles2=true.
  2. +
  3. Build and install Mesa as usual.
  4. +
-

Structure

+

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

-

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

+

Run the Demos

- - - - - - - - -
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
+

There are some demos in mesa/demos repository.

-

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

+

Developers

Dispatch Table

-

The ES overlay uses an additional indirection when dispatching fucntions

+

OpenGL ES has an additional indirection when dispatching functions

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

The indirection serves several purposes

@@ -73,7 +63,8 @@ for more information about EGL.

  • When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.
  • -

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

    +

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

    +