
You can copy the files into the project directory in the workspace if you want by selecting one of the boxes. Open Eclipse, select File > Import > Android > Existing Android Code into Workspace*, and browse into the Root Directory ( /tutorials/SimpleNativeGL). Start by importing /tutorials/SimpleNativeGL project. Let's start the first GL application by importing an existing project to Eclipse. For the latter, we will follow similar steps to those described in Creating a NativeActivity, in case you need a more in-depth overview.

We first show how to import an existing native GL project into your workspace, and then we show you how to create the same project from scratch. We also cover how to handle various Android events in a native program. From now on, we'll use GL as a shorthand for OpenGL ES 2.0. For 3D graphics, there are other tutorials available, as well as the NativeGlobe example provided in CodeWorks for Android. In this section, we only cover 2D graphics using OpenGL ES 2.0. Desktop OpenGL does not support this.OpenGL ES provides a fast way to display the camera images, possibly after some image processing, and allows building simple user interfaces. OpenGL ES 2.0 requires the specification of precision modifiers for attributes, uniforms and locals. On Web, the graphic stuff is handled by WebGL. Please note that support for OpenGL ES 3.0 is experimental on iOS. To prevent your application from being shown to unsupported devices in the Play Store, add one of the following lines to your Android Manifest:

On Android Open GL ES 2.0 and 3.0 can be used. OpenGL 4.5 should be able to fully emulate GL ES 3.1. GL ES 3.1 & 3.2 have done a lot of work to bring the API’s functionality significantly closer to it’s desktop counterpart. Please note that MacOS only supports the OpenGL 3.2 core profile. For mimicking GL ES 3.0 on desktop, one can specify the exact OpenGL version, that should be used. On desktop, OpenGL 4.3 provides full compatibility with OpenGL ES 3.0. GL ES 3.0 is the successor of OpenGL ES 2.0. To mimic GL ES 2.0, libGDX does not request any specific OpenGL version, so the driver will be more forgiving. GL ES 2.0 is roughly based on Open GL 2.0, however, there are some incompatibilities that weren’t resolved until Open GL 4.1. On Desktop, libGDX is mapping all its graphics calls to OpenGL.

Platform specificities Desktop (Windows, Mac, Linux)
