Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4358 Serge 1
2
3
4
  
5
  OpenGL ES
6
  
7
8
9
 
10
11
  

The Mesa 3D Graphics Library

12
13
 
14
15
16
 
17

OpenGL ES

18
 
19

Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More informations about

20
OpenGL ES can be found at 
21
http://www.khronos.org/opengles/.

22
 
23

OpenGL ES depends on a working EGL implementation. Please refer to

24
Mesa EGL for more information about EGL.

25
 
26

Build the Libraries

27
    28
  1. Run configure with --enable-gles1 --enable-gles2 and enable the Gallium driver for your hardware.
  2. 29
  3. Build and install Mesa as usual.
  4. 30
    31
     
    32
    Alternatively, if XCB-DRI2 is installed on the system, one can use
    33
    egl_dri2 EGL driver with OpenGL|ES-enabled DRI drivers
    34
     
    35
      36
    1. Run configure with --enable-gles1 --enable-gles2.
    2. 37
    3. Build and install Mesa as usual.
    4. 38
      39
       
      40

      Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more

      41
      EGL drivers for your hardware.

      42
       
      43

      Run the Demos

      44
       
      45

      There are some demos in mesa/demos repository.

      46
       
      47

      Developers

      48
       
      49

      Dispatch Table

      50
       
      51

      OpenGL ES has an additional indirection when dispatching fucntions

      52
       
      53
      54
        Mesa:       glFoo() --> _mesa_Foo()
      55
        OpenGL ES:  glFoo() --> _es_Foo() --> _mesa_Foo()
      56
      57
       
      58

      The indirection serves several purposes

      59
       
      60
        61
      • When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.
      • 62
      • When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.
      • 63
      • When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.
      • 64
        65
         
        66

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

        67
         
        68
        69
        70