Setting up OpenGL ES 1.1, and my android environment

249 Views Asked by At

This may be a bit difficult, but I have a fairly complex question:

I'm fixing up an old Android phone I have from 2010 (very crap phone), to play with and experiment on. I want to write some OpenGL ES 1.1 programs (preferably in C) on it, but I have no idea how to set up my development environment.

Specifically, my question is this:

How can I set up my android device to run C code, and then link OpenGL ES 1.1 with it?

Would it be better to replace the OS (Android 2.1) with Ubuntu (or something else entirely)? I'm not sure it could run it very well, but it might simplify the process of getting the C code on it since I can just compile with GCC and run.

I've never really done something like this on a phone before (I've dabbled in the Java side of android), so any advice is appreciated.

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

You will need to setup your device to be able to deploy and debug with your system, which varies from device to device. If you've already got development in Java working on the device, then you shouldn't need to do anything additional to the setup device to develop in C/C++.

For your development machine, you will need to install at a bare-minimum the NDK. The NDK is also bundled as a package from several other sources, such as in the Tegra Android Developer's Pack, and now also Visual Studio 2015 RC. Which package you choose for development is a matter of preference.

In terms of developing for GLES 1.1, as far as I know, there are not any 'official' samples for developing for it, however, there are several tutorials around. In the NDK, you will need to #include <GLES/gl.h> to get the API. You can then take a look at Khronos' specifications on its usage.