2010-01-11 18:25:03 +08:00
< html >
2010-05-07 14:13:08 +08:00
< title > OpenGL ES< / title >
2010-01-11 18:25:03 +08:00
< head > < link rel = "stylesheet" type = "text/css" href = "mesa.css" > < / head >
< body >
2010-05-07 14:13:08 +08:00
< h1 > OpenGL ES< / h1 >
2010-01-11 18:25:03 +08:00
2010-05-07 14:13:08 +08:00
< p > Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More informations about
OpenGL ES can be found at < a href = "http://www.khronos.org/opengles/"
target="_parent"> http://www.khronos.org/opengles/< / a > .< / p >
2010-01-11 18:25:03 +08:00
2010-05-07 14:13:08 +08:00
< p > OpenGL ES depends on a working EGL implementation. Please refer to
< a href = "egl.html" > Mesa EGL< / a > for more information about EGL.< / p >
2010-01-11 18:25:03 +08:00
< h2 > Build the Libraries< / h2 >
< ol >
2010-05-07 14:13:08 +08:00
< li > Run < code > configure< / code > with < code > --enable-gles-overlay< / code > and enable the Gallium driver for your hardware.< / li >
< li > Build and install Mesa as usual.< / li >
< / ol >
Alternatively, if XCB-DRI2 is installed on the system, one can use
< code > egl_dri2< / code > EGL driver with OpenGL|ES-enabled DRI drivers
< ol >
< li > Run < code > configure< / code > with < code > --enable-gles1 --enable-gles2< / code > .< / li >
2010-01-11 18:25:03 +08:00
< li > Build and install Mesa as usual.< / li >
< / ol >
2010-05-07 14:13:08 +08:00
< p > Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more
EGL drivers for your hardware.< / p >
2010-01-11 18:25:03 +08:00
< h2 > Run the Demos< / h2 >
2010-05-07 14:13:08 +08:00
< p > There are some demos in < code > progs/egl/< / code > . You can use them to test
your build. For example,< / p >
2010-01-11 18:25:03 +08:00
< pre >
2010-05-07 14:13:08 +08:00
$ cd progs/egl/eglut
$ make
$ cd ../opengles1
2010-01-11 18:25:03 +08:00
$ make
2010-05-07 14:13:08 +08:00
$ ./torus_x11
2010-01-11 18:25:03 +08:00
< / pre >
< h2 > Developers< / h2 >
2010-05-07 14:13:08 +08:00
< h3 > Internal Libraries< / h3 >
2010-01-11 18:25:03 +08:00
2010-05-07 14:13:08 +08:00
< table border = "1" style = "text-align: center;" >
< tr > < td > Library Name< / td > < td > Used By< / td > < td > Enabled< / td > < td > OpenGL< / td > < td > OpenGL ES 1.x< / td > < td > OpenGL ES 2.x< / td > < / tr >
< tr > < td > < code > src/mesa/libmesa.a< / td > < td > Classic DRI drivers< / td > < td > y< / td > < td > y< / td > < td > --enable-gles1< / td > < td > --enable-gles2< / td > < / tr >
< tr > < td > < code > src/mesa/libmesagallium.a< / td > < td > Gallium EGL and DRI drivers< / td > < td > y< / td > < td > y< / td > < td > --enable-gles1< / td > < td > --enable-gles2< / td > < / tr >
< tr > < td > < code > src/mesa/es/libes1gallium.a< / td > < td > Gallium EGL drivers< / td > < td > --enable-gles-overlay< / td > < td > n< / td > < td > y< / td > < td > n< / td > < / tr >
< tr > < td > < code > src/mesa/es/libes2gallium.a< / td > < td > Gallium EGL drivers< / td > < td > --enable-gles-overlay< / td > < td > n< / td > < td > n< / td > < td > y< / td > < / tr >
2010-01-11 18:25:03 +08:00
< / table >
< h3 > Dispatch Table< / h3 >
2010-05-07 14:13:08 +08:00
< p > OpenGL ES has an additional indirection when dispatching fucntions< / p >
2010-01-11 18:25:03 +08:00
< pre >
Mesa: glFoo() --> _mesa_Foo()
2010-05-07 14:13:08 +08:00
OpenGL ES: glFoo() --> _es_Foo() --> _mesa_Foo()
2010-01-11 18:25:03 +08:00
< / pre >
< p > The indirection serves several purposes< / p >
< ul >
< li > When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.< / li >
< li > When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.< / li >
< li > When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.< / li >
< / ul >
2010-05-07 14:13:08 +08:00
< p > Other than the last case, OpenGL ES uses < code > APIspec.xml< / code > to generate functions to check and/or converts the arguments.< / p >
2010-01-11 18:25:03 +08:00
< / body >
< / html >