Emscripten is capable of compiling C/C++ code that uses either OpenGL ES 2.0 or OpenGL ES 3.0 by mapping those calls to WebGL or WebGL 2 calls, respectively. Because of this, Emscripten only supports a subset of the OpenGL ES commands that correspond to the commands available inside of the WebGL library you use. For instance, if you would like to use OpenGL ES 3.0, you will need to include WebGL 2 when compiling by passing the -s USE_WEBGL2=1 parameter to the Emscripten compiler. In this chapter, we will be using OpenGL ES 2.0 in combination with SDL to render sprites using shaders, and later we will be using SDL to render an icon that represents the location of a light source in our application. SDL provides many features that are absent from OpenGL, such as an audio library, an image loading library, and mouse and keyboard input libraries. In many...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia