GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android and (early) AmigaOS4.
Clone or download
Latest commit 2014108 Oct 20, 2018
Failed to load latest commit information.
include [PANDORA] Gamma can be set with glHint now Apr 1, 2018
refs Improved Line Stipple, with better handling of stipple+texture (cross… May 26, 2018
spec [GLES2] Added Fog support (probably a bit bugged) Oct 21, 2017
tests Improved LIBGL_FORCENPOT=1, and make it default on GLES2 for hardware… Mar 18, 2018
traces Added PointTrace in regression test suite Oct 29, 2017
.gitignore This file is built, so add it to .gitignore Oct 21, 2017
.travis.yml Update travis to get more modern cmake Jul 4, 2018 Traking glFrontFace and glCullFace May 1, 2018 Start new dev. cycle Oct 20, 2018
CMakeLists.txt Default backend is now GLES2 on all platform expect Pandora Oct 13, 2018
LICENSE Updated Licence Feb 11, 2018 Default backend is now GLES2 on all platform expect Pandora Oct 13, 2018
version.h Start new dev. cycle Oct 20, 2018


gl4es build status

This is a library provide OpenGL 2.x functionality for GLES2.0 accelerated Hardware (and of course also support OpenGL 1.5 function, sometimes better then when using GLES 1.1 backend) There is also support for GLES 1.1 Hardware, emulating OpenGL 1.5, and some OpenGL 2.x+ extensions, but without shaders.

GL4ES is known to work on many platform: OpenPandora, ODroid, RaspberryPI (2 and 3 at least), PocketCHIP, "otherfruit"PI (like the OrangePI), Android, x86 and x86_64 Linux (tested using mesa-egl). There is also some WIP support for AmigaOS4, using experimental GLES2 driver for Warp3D.

This library is based on glshim ( but as now evolved far from it, with different feature set and objectives. Go check this lib if you need things like RemoteGL or TinyGLES (for 100% software rendering).

The focus is on compatibility and speed with a wide selection of game and software.

It has been tested successfully of a large selection of games and software, including: Minecraft, OpenMW, SeriousSam (both First and Second Encounters), RVGL (ReVolt GL), TSMC (The Secret Maryo Chronicles), TORCS, SpeedDreams, GL-117, Foobillard(plus), Blender 2.68 to name just a few. I have also some success with Linux port of XNA games, using either MonoGame or FNA.

Most function of OpenGL up to 1.5 are supported, with some notable exceptions:

  • Reading of Depth or Stencil buffer will not work
  • GL_FEEDBACK mode is not implemented
  • No Accum emulation

Some known general limitations:

  • GL_SELECT as some limitation in its implementation (for exemple, current Depth buffer or binded texture are not taken into account, also custom vertex shader will not work here)
  • NPOT texture are supported, but not with GL_REPEAT / GL_MIRRORED, only GL_CLAMP will work properly (unless the GLES Hardware support NPOT)
  • Multiple Color attachment on Framebuffer are not supported
  • OcclusionQuery is implemented, but with a 0 bits precision
  • Probably many other things

Status of the GLES2 backend

  • The FPE (Fixed Pipeline Emulator) has most OpenGL 1.5 drawing call implemented
  • The Shader Conversion is really crude, so only simple shaders will work (especialy, the implicit conversion float <-> int is not handled)
  • Lighting support double-side and color separation
  • FogCoord are supported, along with secondary color
  • An ES2 context should be usable (usefull for SDL2)
  • OpenGL 2.x games that have been tested include: OpenRA, GZDoom, Danger from the Deep, SuperTuxKart 0.8.1, Hammerwatch, OpenMW, many FNA & MonoGames games (FZE, Towerfall Ascension, Stardew Valley, Dust, Owlboy, and many other)...
  • glxgears works, but FlatShade is not implemented (and will probably never be), so it's slightly different then using GLES1.1 or actuel GL hardware
  • GL_TEXTURE_1D, GL_TEXTURE_3D and GL_TEXTURE_RECTANGLE_ARB are not yet supported in shaders (they are supported in fixed pipeline functions), and texture 3D are just a single 2D layer for now.
  • Program that link only a GL_FRAGMENT or GL_VERTEX shader are not supported yet.

Status of the GLES1.1 backend

  • Framebuffer use FRAMEBUFFER_OES extension (that must be present in the GLES 1.1 stack)
  • Lighting doesn't support double-side or color separation
  • FogCoord or Secondary colors are not supported
  • GL_TEXTURE_3D are just a single 2D layer (the 1st layer).


How to compile and per-platform specific comment can be found here


Standard GLU do works without any issues. You can find a version here if you need one.


Put lib/ in your LD_LIBRARY_PATH. Beware that GL4ES is meant to replace any libGL you can have on your system (like Mesa for example)


There are many environnement variable to control gl4es behavour, also usable at runtime using glHint(...).

See here for all variables and what they do.

Version history

The change log is here