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...
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand