From 2e3c4e47842905bc7f3d506e865cc77f7463166b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 7 May 2010 14:13:08 +0800 Subject: [PATCH] docs: Update EGL and OpenGL ES docs. Update to reflect recent gles and mapi works. --- docs/egl.html | 55 ++++++++++++++++++++---------------- docs/opengles.html | 69 +++++++++++++++++++++++----------------------- 2 files changed, 67 insertions(+), 57 deletions(-) diff --git a/docs/egl.html b/docs/egl.html index e960309fc47..ad3b850f2ad 100644 --- a/docs/egl.html +++ b/docs/egl.html @@ -32,13 +32,13 @@ cards.

the Gallium driver for your hardware. For example

-  $ ./configure --with-state-trackers=egl,es,vega --enable-gallium-{swrast,intel}
+  $ ./configure --enable-gles-overlay --with-state-trackers=egl,vega --enable-gallium-{swrast,intel}
 
-

The main library will be enabled by default. The egl state +

The main library and OpenGL is enabled by default. The first option enables +OpenGL ES 1.x and 2.x. The egl state tracker is needed by a number of EGL drivers. EGL drivers will be covered -later. The es state tracker provides OpenGL ES 1.x -and 2.x and the vega state tracker provides OpenVG +later. The vega state tracker provides OpenVG 1.x.

@@ -46,8 +46,8 @@ and 2.x and the vega state tracker provides OpenVG

In the given example, it will build and install libEGL, -libGLESv1_CM, libGLESv2, libOpenVG, and -one or more EGL drivers.

+libGL, libGLESv1_CM, libGLESv2, +libOpenVG, and one or more EGL drivers.

Configure Options

@@ -83,9 +83,26 @@ bare KMS (kernel modesetting).

  • --with-state-trackers

    The argument is a comma separated string. It is usually used to specify the -rendering APIs, like OpenGL ES or OpenVG, to build. But it should be noted -that a number of EGL drivers depend on the egl state tracker. -They will not be built without the egl state tracker.

    +rendering APIs, such as OpenVG, to build. But it should be noted that a number +of EGL drivers depend on the egl state tracker. They will +not be built without the egl state tracker.

    + +
  • + +
  • --enable-gles-overlay + +

    OpenGL and OpenGL ES are not controlled by +--with-state-trackers. OpenGL is always built. To build OpenGL +ES, this option must be explicitly given.

    + +
  • + +
  • --enable-gles1 and --enable-gles2 + +

    Unlike --enable-gles-overlay, which builds one library for each +rendering API, these options enable OpenGL ES support in OpenGL. The result is +one big library that supports multiple APIs. This is used by DRI drivers and +egl_dri2 EGL driver.

  • @@ -99,25 +116,17 @@ software rendering automatically.

    -

    OpenGL

    - -

    The OpenGL state tracker is not built in the above example. It should be -noted that the classic libGL is not a state tracker and cannot be -used with EGL (unless the EGL driver in use is egl_glx). To build -the OpenGL state tracker, one may append glx to ---with-state-trackers and manually build -src/gallium/targets/libgl-xlib/.

    -

    Use EGL

    -

    The demos for OpenGL ES and OpenVG can be found in progs/es1/, -progs/es2/ and progs/openvg/. You can use them to -test your build. For example,

    +

    There are demos for the client APIs supported by EGL. They can be found in +progs/egl/, You can use them to test your build. For example,

    -  $ cd progs/es1/xegl
    +  $ cd progs/egl/eglut
    +  $ make
    +  $ cd ../opengles1
       $ make
    -  $ ./torus
    +  $ ./torus_x11
     

    Environment Variables

    diff --git a/docs/opengles.html b/docs/opengles.html index fc41e6771c1..9984a79b1b2 100644 --- a/docs/opengles.html +++ b/docs/opengles.html @@ -1,68 +1,69 @@ -OpenGL ES State Trackers +OpenGL ES -

    OpenGL ES State Trackers

    +

    OpenGL ES

    -

    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. Please refer to Mesa EGL -for more information about EGL.

    +

    Mesa implements 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 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 configure with --enable-gles-overlay and enable the Gallium driver for your hardware.
    4. +
    5. Build and install Mesa as usual.
    6. +
    + +Alternatively, if XCB-DRI2 is installed on the system, one can use +egl_dri2 EGL driver with OpenGL|ES-enabled DRI drivers + +
      +
    1. Run configure with --enable-gles1 --enable-gles2.
    2. Build and install Mesa as usual.
    -

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

    +

    Both methods 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,

    +

    There are some demos in progs/egl/. You can use them to test +your build. For example,

    -  $ cd progs/es1/xegl
    +  $ cd progs/egl/eglut
    +  $ make
    +  $ cd ../opengles1
       $ make
    -  $ ./torus
    +  $ ./torus_x11
     

    Developers

    -

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

    - -

    Structure

    +

    Internal Libraries

    -

    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
    + + + + +
    Library NameUsed ByEnabledOpenGLOpenGL ES 1.xOpenGL ES 2.x
    src/mesa/libmesa.aClassic DRI driversyy--enable-gles1--enable-gles2
    src/mesa/libmesagallium.aGallium EGL and DRI driversyy--enable-gles1--enable-gles2
    src/mesa/es/libes1gallium.aGallium EGL drivers--enable-gles-overlaynyn
    src/mesa/es/libes2gallium.aGallium EGL drivers--enable-gles-overlaynny
    -

    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

    +

    OpenGL ES has an additional indirection when dispatching fucntions

       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 +74,7 @@ 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.

    -- 2.30.2