README.md 4.57 KB
Newer Older
1
2
![logo](gl4es.png "gl4es logo")

3
GL4ES - OpenGL for GLES Hardware
Ryan Hileman's avatar
Ryan Hileman committed
4
5
====

Sebastien Chevalier's avatar
Sebastien Chevalier committed
6
![gl4es build status](https://api.travis-ci.org/ptitSeb/gl4es.png "gl4es build status")
7

Sebastien Chevalier's avatar
Sebastien Chevalier committed
8
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 than when using GLES 1.1 backend)
Sebastien Chevalier's avatar
Sebastien Chevalier committed
9
There is also support for GLES 1.1 Hardware, emulating OpenGL 1.5, and some OpenGL 2.x+ extensions.
10

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

Sebastien Chevalier's avatar
Sebastien Chevalier committed
13
This library is based on glshim (https://github.com/lunixbochs/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 software rendering).
14

Sebastien Chevalier's avatar
Sebastien Chevalier committed
15
The focus is on compatibility and speed with a wide selection of game and software.
Ryan Hileman's avatar
Ryan Hileman committed
16

abasgames's avatar
abasgames committed
17
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), half life 1&2, Blender 2.68 to name just a few. I have also some success with Linux port of XNA games, using either MonoGame or FNA.
Sebastien Chevalier's avatar
Sebastien Chevalier committed
18

19
20
21
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
22
 * No Accum emulation
Li Linfeng's avatar
Li Linfeng committed
23

24
Some known general limitations:
Philippe Coval's avatar
Philippe Coval committed
25
 * GL_SELECT as some limitation in its implementation (for example, current Depth buffer or bounded texture are not taken into account, also custom vertex shader will not work here)
Sebastien Chevalier's avatar
Sebastien Chevalier committed
26
 * NPOT texture are supported, but not with GL_REPEAT / GL_MIRRORED, only GL_CLAMP will work properly (unless the GLES Hardware support NPOT)
27
 * Multiple Color attachment on Framebuffer are not supported
28
 * OcclusionQuery is implemented, but with a 0 bits precision
29
30
 * Probably many other things

31
Status of the GLES2 backend
Sebastien Chevalier's avatar
Sebastien Chevalier committed
32
 * The FPE (Fixed Pipeline Emulator) has most OpenGL 1.5 drawing call implemented
Philippe Coval's avatar
Philippe Coval committed
33
 * The Shader Conversion is really crude, so only simple shaders will work (especially, the implicit conversion float <-> int is not handled)
Sebastien Chevalier's avatar
Sebastien Chevalier committed
34
 * ARB_program are supported (converted on-the-fly to glsl shaders)
35
 * Lighting support double-side and color separation
Sebastien Chevalier's avatar
Sebastien Chevalier committed
36
 * FogCoord are supported, along with secondary color
Philippe Coval's avatar
Philippe Coval committed
37
 * An ES2 context should be usable (useful for SDL2)
abasgames's avatar
abasgames committed
38
 * OpenGL 2.x games that have been tested include: OpenRA, GZDoom, Danger from the Deep, SuperTuxKart 0.8.1, Hammerwatch, OpenMW, half life 2, many FNA & MonoGames games (FEZ, Towerfall Ascension, Stardew Valley, Dust, Owlboy, and many other), even some Unity3D games (Teslagrad, Colin McRea Rally remake and other)...
Sebastien Chevalier's avatar
Sebastien Chevalier committed
39
 * glxgears works, but FlatShade is not implemented (and will probably never be), so it's slightly different than using GLES1.1 or actual GL hardware
40
 * 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.
Sebastien Chevalier's avatar
Sebastien Chevalier committed
41
 * Program that link only a GL_FRAGMENT or GL_VERTEX shader are not supported yet.
42
 * Some VBO are used.
43

44
45
46
47
48
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).
49
 * VBO are supported, but they are emulated, even if VBO if supported in GLES1.1 driver
Li Linfeng's avatar
Li Linfeng committed
50

51
If you use gl4es in your project (as a static or dynamic link), please mention gl4es in you readme / about / whatever.
Li Linfeng's avatar
Li Linfeng committed
52

Ryan Hileman's avatar
Ryan Hileman committed
53
54
----

55
Compiling
Ryan Hileman's avatar
Ryan Hileman committed
56
----
Sebastien Chevalier's avatar
Sebastien Chevalier committed
57
How to compile and per-platform specific comment can be found [here](COMPILE.md)
Ryan Hileman's avatar
Ryan Hileman committed
58
59
60
61
62
63

----

GLU
----

Sebastien Chevalier's avatar
Sebastien Chevalier committed
64
Standard GLU do works without any issues. You can find a version [here](https://github.com/ptitSeb/GLU) if you need one.
Ryan Hileman's avatar
Ryan Hileman committed
65
66
67
68
69
70

----

Installation
----

71
Put lib/libGL.so.1 in your `LD_LIBRARY_PATH`.
Sebastien Chevalier's avatar
Sebastien Chevalier committed
72
Beware that GL4ES is meant to replace any libGL you can have on your system (like Mesa for example)
73
74
75
76
77
78

----

Usage
----

Philippe Coval's avatar
Philippe Coval committed
79
There are many environment variable to control gl4es behavior, also usable at runtime using `glHint(...)`.
80

Sebastien Chevalier's avatar
Sebastien Chevalier committed
81
See [here](USAGE.md) for all variables and what they do.
82

Sebastien Chevalier's avatar
Sebastien Chevalier committed
83
84
----

85
86
87
88
89
90
91
Media (what is working already)
----

Some screenshot and youtube links of stuffs that works [here](MEDIA.md)

----

Sebastien Chevalier's avatar
Sebastien Chevalier committed
92
93
Version history
----
Sebastien Chevalier's avatar
Sebastien Chevalier committed
94

Sebastien Chevalier's avatar
Sebastien Chevalier committed
95
The change log is [here](CHANGELOG.md)